diff options
author | Olivier Deprez <olivier.deprez@arm.com> | 2020-02-26 08:35:10 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2020-02-26 08:35:10 +0000 |
commit | 7b36a7e961b51c9325985954705c5767001bd24f (patch) | |
tree | 8760d7a57ccabbff8f8164924445e9761f3113a0 /plat | |
parent | cf92be2939fcfcc47ff7a7d493963da3ce213c99 (diff) | |
parent | 57b3663239fbe4deeecfbc9388691dc694649f3c (diff) | |
download | platform_external_arm-trusted-firmware-7b36a7e961b51c9325985954705c5767001bd24f.tar.gz platform_external_arm-trusted-firmware-7b36a7e961b51c9325985954705c5767001bd24f.tar.bz2 platform_external_arm-trusted-firmware-7b36a7e961b51c9325985954705c5767001bd24f.zip |
Merge "allwinner: Reserve and map space for the SCP firmware" into integration
Diffstat (limited to 'plat')
-rw-r--r-- | plat/allwinner/common/include/platform_def.h | 9 | ||||
-rw-r--r-- | plat/allwinner/common/sunxi_common.c | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/plat/allwinner/common/include/platform_def.h b/plat/allwinner/common/include/platform_def.h index 6f2274473..1b660e151 100644 --- a/plat/allwinner/common/include/platform_def.h +++ b/plat/allwinner/common/include/platform_def.h @@ -14,7 +14,12 @@ #include <sunxi_mmap.h> #define BL31_BASE (SUNXI_SRAM_A2_BASE + 0x4000) -#define BL31_LIMIT (SUNXI_SRAM_A2_BASE + SUNXI_SRAM_A2_SIZE) +#define BL31_LIMIT (SUNXI_SRAM_A2_BASE + \ + SUNXI_SRAM_A2_SIZE - SUNXI_SCP_SIZE) + +/* The SCP firmware is allocated the last 16KiB of SRAM A2. */ +#define SUNXI_SCP_BASE BL31_LIMIT +#define SUNXI_SCP_SIZE 0x4000 /* Overwrite U-Boot SPL, but reserve the first page for the SPL header. */ #define BL31_NOBITS_BASE (SUNXI_SRAM_A1_BASE + 0x1000) @@ -51,7 +56,7 @@ #define PLATFORM_CORE_COUNT (PLATFORM_CLUSTER_COUNT * \ PLATFORM_MAX_CPUS_PER_CLUSTER) #define PLATFORM_MAX_CPUS_PER_CLUSTER U(4) -#define PLATFORM_MMAP_REGIONS 4 +#define PLATFORM_MMAP_REGIONS 5 #define PLATFORM_STACK_SIZE (0x1000 / PLATFORM_CORE_COUNT) #ifndef SPD_none diff --git a/plat/allwinner/common/sunxi_common.c b/plat/allwinner/common/sunxi_common.c index 45e415460..0ca18adc3 100644 --- a/plat/allwinner/common/sunxi_common.c +++ b/plat/allwinner/common/sunxi_common.c @@ -21,6 +21,8 @@ static const mmap_region_t sunxi_mmap[PLATFORM_MMAP_REGIONS + 1] = { MAP_REGION_FLAT(SUNXI_SRAM_BASE, SUNXI_SRAM_SIZE, MT_RW_DATA | MT_SECURE), + MAP_REGION_FLAT(SUNXI_SCP_BASE, SUNXI_SCP_SIZE, + MT_DEVICE | MT_RW | MT_SECURE | MT_EXECUTE_NEVER), MAP_REGION_FLAT(SUNXI_DEV_BASE, SUNXI_DEV_SIZE, MT_DEVICE | MT_RW | MT_SECURE | MT_EXECUTE_NEVER), MAP_REGION(SUNXI_DRAM_BASE, SUNXI_DRAM_VIRT_BASE, SUNXI_DRAM_SEC_SIZE, |