From 382ddb3dd46ada0d7439d2d95bb0de3b3abb6d9d Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Fri, 20 Sep 2019 08:40:54 +0800 Subject: [PATCH 1/2] rockchip: Fix typo for TF content text The 'txet' should be 'text'. Change-Id: I2217a1adf50c3b86f3087b83c77d9291b280627c Signed-off-by: Kever Yang --- plat/rockchip/px30/include/platform_def.h | 2 +- plat/rockchip/rk3288/include/shared/bl32_param.h | 2 +- plat/rockchip/rk3328/include/platform_def.h | 2 +- plat/rockchip/rk3368/include/platform_def.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plat/rockchip/px30/include/platform_def.h b/plat/rockchip/px30/include/platform_def.h index c101cdc81..8e70a7031 100644 --- a/plat/rockchip/px30/include/platform_def.h +++ b/plat/rockchip/px30/include/platform_def.h @@ -69,7 +69,7 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -/* TF txet, ro, rw, Size: 512KB */ +/* TF text, ro, rw, Size: 512KB */ #define TZRAM_BASE (0x0) #define TZRAM_SIZE (0x80000) diff --git a/plat/rockchip/rk3288/include/shared/bl32_param.h b/plat/rockchip/rk3288/include/shared/bl32_param.h index 743dad41b..950e41d66 100644 --- a/plat/rockchip/rk3288/include/shared/bl32_param.h +++ b/plat/rockchip/rk3288/include/shared/bl32_param.h @@ -10,7 +10,7 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -/* TF txet, ro, rw, Size: 2MB */ +/* TF text, ro, rw, Size: 2MB */ #define TZRAM_BASE (0x0) #define TZRAM_SIZE (0x200000) diff --git a/plat/rockchip/rk3328/include/platform_def.h b/plat/rockchip/rk3328/include/platform_def.h index 3104d9fcb..1120fb84c 100644 --- a/plat/rockchip/rk3328/include/platform_def.h +++ b/plat/rockchip/rk3328/include/platform_def.h @@ -66,7 +66,7 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -/* TF txet, ro, rw, Size: 512KB */ +/* TF text, ro, rw, Size: 512KB */ #define TZRAM_BASE (0x0) #define TZRAM_SIZE (0x80000) diff --git a/plat/rockchip/rk3368/include/platform_def.h b/plat/rockchip/rk3368/include/platform_def.h index 7b3cc6eba..6c2cffa8c 100644 --- a/plat/rockchip/rk3368/include/platform_def.h +++ b/plat/rockchip/rk3368/include/platform_def.h @@ -67,7 +67,7 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -/* TF txet, ro, rw, Size: 512KB */ +/* TF text, ro, rw, Size: 512KB */ #define TZRAM_BASE (0x0) #define TZRAM_SIZE (0x80000) From 0aad563c74807195cc7fe2208d17e2d889157f1e Mon Sep 17 00:00:00 2001 From: Kever Yang Date: Thu, 19 Sep 2019 10:37:36 +0800 Subject: [PATCH 2/2] rockchip: Update BL31_BASE to 0x40000 Rockchip platform is using the first 1MB of DRAM as secure ram space, and there is a vendor loader who loads and runs the BL31/BL32/BL33, this loader is usually load by SoC BootRom to the start addres of DRAM, we need to reserve enough space for this loader so that it doesn't need to do the relocate when loading the BL31. eg. We use U-Boot SPL to load ATF BL31 and U-Boot proper as BL33, the SPL TEXT BASE is offset 0 of DRAM which is decide by Bootrom; if we update the BL31_BASE to offset 0x40000(256KB), then the 0~0x40000 should be enough for SPL and no need to do the relocate while the space size 0x10000(64KB) may not enough for SPL. After this update, the BL31 can use the rest 768KB of the first 1MB, which is also enough, and the loader who is using BL31 elf file can support this update without any change. Change-Id: I66dc685594d77f10f9a49c3be015fd6729250ece Signed-off-by: Kever Yang --- plat/rockchip/px30/include/platform_def.h | 2 +- plat/rockchip/rk3288/include/shared/bl32_param.h | 6 +++--- plat/rockchip/rk3328/include/platform_def.h | 2 +- plat/rockchip/rk3368/include/platform_def.h | 2 +- plat/rockchip/rk3399/include/shared/bl31_param.h | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plat/rockchip/px30/include/platform_def.h b/plat/rockchip/px30/include/platform_def.h index 8e70a7031..9dccab82b 100644 --- a/plat/rockchip/px30/include/platform_def.h +++ b/plat/rockchip/px30/include/platform_def.h @@ -79,7 +79,7 @@ /* * Put BL3-1 at the top of the Trusted RAM */ -#define BL31_BASE (TZRAM_BASE + 0x10000) +#define BL31_BASE (TZRAM_BASE + 0x40000) #define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) /******************************************************************************* diff --git a/plat/rockchip/rk3288/include/shared/bl32_param.h b/plat/rockchip/rk3288/include/shared/bl32_param.h index 950e41d66..ffdb2f38c 100644 --- a/plat/rockchip/rk3288/include/shared/bl32_param.h +++ b/plat/rockchip/rk3288/include/shared/bl32_param.h @@ -10,9 +10,9 @@ /******************************************************************************* * Platform memory map related constants ******************************************************************************/ -/* TF text, ro, rw, Size: 2MB */ +/* TF text, ro, rw, Size: 1MB */ #define TZRAM_BASE (0x0) -#define TZRAM_SIZE (0x200000) +#define TZRAM_SIZE (0x100000) /******************************************************************************* * BL32 specific defines. @@ -20,7 +20,7 @@ /* * Put BL32 at the top of the Trusted RAM */ -#define BL32_BASE (TZRAM_BASE + 0x100000) +#define BL32_BASE (TZRAM_BASE + 0x40000) #define BL32_LIMIT (TZRAM_BASE + TZRAM_SIZE) #endif /* BL32_PARAM_H */ diff --git a/plat/rockchip/rk3328/include/platform_def.h b/plat/rockchip/rk3328/include/platform_def.h index 1120fb84c..baac12d3b 100644 --- a/plat/rockchip/rk3328/include/platform_def.h +++ b/plat/rockchip/rk3328/include/platform_def.h @@ -76,7 +76,7 @@ /* * Put BL3-1 at the top of the Trusted RAM */ -#define BL31_BASE (TZRAM_BASE + 0x10000) +#define BL31_BASE (TZRAM_BASE + 0x40000) #define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) /******************************************************************************* diff --git a/plat/rockchip/rk3368/include/platform_def.h b/plat/rockchip/rk3368/include/platform_def.h index 6c2cffa8c..9334a83ae 100644 --- a/plat/rockchip/rk3368/include/platform_def.h +++ b/plat/rockchip/rk3368/include/platform_def.h @@ -77,7 +77,7 @@ /* * Put BL3-1 at the top of the Trusted RAM */ -#define BL31_BASE (TZRAM_BASE + 0x10000) +#define BL31_BASE (TZRAM_BASE + 0x40000) #define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) /******************************************************************************* diff --git a/plat/rockchip/rk3399/include/shared/bl31_param.h b/plat/rockchip/rk3399/include/shared/bl31_param.h index e7f2226cd..6e7e8ba09 100644 --- a/plat/rockchip/rk3399/include/shared/bl31_param.h +++ b/plat/rockchip/rk3399/include/shared/bl31_param.h @@ -20,7 +20,7 @@ /* * Put BL31 at the top of the Trusted RAM */ -#define BL31_BASE (TZRAM_BASE + 0x1000) +#define BL31_BASE (TZRAM_BASE + 0x40000) #define BL31_LIMIT (TZRAM_BASE + TZRAM_SIZE) #endif /* BL31_PARAM_H */