From aeff14640a91f6d33bfdbc0dc7b0e920f6d14b91 Mon Sep 17 00:00:00 2001 From: Jacky Bai Date: Fri, 27 Mar 2020 20:28:19 +0800 Subject: [PATCH] feat(imx8mp): enable BL32 fdt overlay support on imx8mp Allow OP-TEE to generate a device-tree overlay binary that will be applied by u-boot on the regular dtb. Signed-off-by: Jacky Bai Change-Id: Idfd268cdd8b7ba321f8e1b9b85c2bba7ffdeddf0 --- plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c | 5 +++++ plat/imx/imx8m/imx8mp/include/platform_def.h | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c index 13724fbef..57e5c5167 100644 --- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c +++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c @@ -163,6 +163,11 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, #ifdef SPD_trusty bl32_image_ep_info.args.arg0 = BL32_SIZE; bl32_image_ep_info.args.arg1 = BL32_BASE; +#else + /* Make sure memory is clean */ + mmio_write_32(BL32_FDT_OVERLAY_ADDR, 0); + bl33_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR; + bl32_image_ep_info.args.arg3 = BL32_FDT_OVERLAY_ADDR; #endif #endif diff --git a/plat/imx/imx8m/imx8mp/include/platform_def.h b/plat/imx/imx8m/imx8mp/include/platform_def.h index 486c1eec5..8807f5d2d 100644 --- a/plat/imx/imx8m/imx8mp/include/platform_def.h +++ b/plat/imx/imx8m/imx8mp/include/platform_def.h @@ -1,5 +1,5 @@ /* - * Copyright 2020 NXP + * Copyright 2020-2022 NXP * * SPDX-License-Identifier: BSD-3-Clause */ @@ -62,6 +62,8 @@ #define PLAT_NS_IMAGE_OFFSET U(0x40200000) #define PLAT_NS_IMAGE_SIZE U(0x00200000) +#define BL32_FDT_OVERLAY_ADDR (PLAT_NS_IMAGE_OFFSET + 0x3000000) + /* GICv3 base address */ #define PLAT_GICD_BASE U(0x38800000) #define PLAT_GICR_BASE U(0x38880000) -- 2.39.5