mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-07 11:45:36 +02:00
90 lines
3 KiB
Diff
90 lines
3 KiB
Diff
From 1b65be5943fc4f6a0382d03a4ed7393b383e56a4 Mon Sep 17 00:00:00 2001
|
|
From: Jacky Bai <ping.bai@nxp.com>
|
|
Date: Thu, 17 Oct 2024 17:56:41 +0800
|
|
Subject: [PATCH] fix(imx8m): fix imx8mq build break
|
|
|
|
Fix the build break for i.MX8MQ to make it boot
|
|
with basic function enabled.
|
|
|
|
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
|
|
Change-Id: I2ff7976e3fb7960d6876d26fe0b4a78e51219ae2
|
|
---
|
|
plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c | 6 ++++++
|
|
plat/imx/imx8m/imx8mq/include/platform_def.h | 12 +++++++-----
|
|
plat/imx/imx8m/imx8mq/platform.mk | 2 ++
|
|
3 files changed, 15 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
|
|
index 735f5dba4f..fdaf9fd22e 100644
|
|
--- a/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
|
|
+++ b/plat/imx/imx8m/imx8mq/imx8mq_bl31_setup.c
|
|
@@ -209,13 +209,19 @@ void bl31_plat_arch_setup(void)
|
|
MT_MEMORY | MT_RW | MT_SECURE),
|
|
MAP_REGION_FLAT(BL_CODE_BASE, BL_CODE_END - BL_CODE_BASE,
|
|
MT_MEMORY | MT_RO | MT_SECURE),
|
|
+#if SEPARATE_NOBITS_REGION
|
|
+ MAP_REGION_FLAT(BL_NOBITS_BASE, BL_NOBITS_END - BL_NOBITS_BASE,
|
|
+ MT_RW_DATA | MT_SECURE),
|
|
+#endif
|
|
#if USE_COHERENT_MEM
|
|
MAP_REGION_FLAT(BL_COHERENT_RAM_BASE,
|
|
BL_COHERENT_RAM_END - BL_COHERENT_RAM_BASE,
|
|
MT_DEVICE | MT_RW | MT_SECURE),
|
|
#endif
|
|
+#if defined(SPD_opteed) || defined(SPD_trusty)
|
|
/* Map TEE memory */
|
|
MAP_REGION_FLAT(BL32_BASE, BL32_SIZE, MT_MEMORY | MT_RW),
|
|
+#endif
|
|
{0},
|
|
};
|
|
|
|
diff --git a/plat/imx/imx8m/imx8mq/include/platform_def.h b/plat/imx/imx8m/imx8mq/include/platform_def.h
|
|
index c8289894b8..34bd77e87e 100644
|
|
--- a/plat/imx/imx8m/imx8mq/include/platform_def.h
|
|
+++ b/plat/imx/imx8m/imx8mq/include/platform_def.h
|
|
@@ -37,6 +37,12 @@
|
|
#define BL31_SIZE SZ_64K
|
|
#define BL31_LIMIT (BL31_BASE + BL31_SIZE)
|
|
|
|
+#define OCRAM_S_BASE U(0x180000)
|
|
+#define OCRAM_S_SIZE SZ_32K
|
|
+#define OCRAM_S_LIMIT (OCRAM_S_BASE + OCRAM_S_SIZE)
|
|
+#define BL31_NOBITS_BASE OCRAM_S_BASE
|
|
+#define BL31_NOBITS_LIMIT (BL31_NOBITS_BASE + SZ_32K)
|
|
+
|
|
/* non-secure uboot base */
|
|
#ifndef PLAT_NS_IMAGE_OFFSET
|
|
#define PLAT_NS_IMAGE_OFFSET U(0x40200000)
|
|
@@ -54,7 +60,7 @@
|
|
#define MAX_XLAT_TABLES 5
|
|
#define MAX_MMAP_REGIONS 15
|
|
#else
|
|
-#define MAX_XLAT_TABLES 4
|
|
+#define MAX_XLAT_TABLES 3
|
|
#define MAX_MMAP_REGIONS 14
|
|
#endif
|
|
|
|
@@ -144,10 +150,6 @@
|
|
#define GPR_TZASC_EN BIT(0)
|
|
#define GPR_TZASC_EN_LOCK BIT(16)
|
|
|
|
-#define OCRAM_S_BASE U(0x00180000)
|
|
-#define OCRAM_S_SIZE U(0x8000)
|
|
-#define OCRAM_S_LIMIT (OCRAM_S_BASE + OCRAM_S_SIZE)
|
|
-
|
|
#define COUNTER_FREQUENCY 8333333 /* 25MHz / 3 */
|
|
|
|
#define IMX_WDOG_B_RESET
|
|
diff --git a/plat/imx/imx8m/imx8mq/platform.mk b/plat/imx/imx8m/imx8mq/platform.mk
|
|
index d3d213268c..76fc071070 100644
|
|
--- a/plat/imx/imx8m/imx8mq/platform.mk
|
|
+++ b/plat/imx/imx8m/imx8mq/platform.mk
|
|
@@ -64,6 +64,8 @@ ifeq (${IMX_DRAM_RETENTION},1)
|
|
BL31_SOURCES += ${IMX_DRAM_SOURCES}
|
|
endif
|
|
|
|
+SEPARATE_NOBITS_REGION := 1
|
|
+
|
|
ifneq (${PRELOADED_BL33_BASE},)
|
|
$(eval $(call add_define_val,PLAT_NS_IMAGE_OFFSET,${PRELOADED_BL33_BASE}))
|
|
endif
|