mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-25 22:35:42 +00:00
plat: marvell: armada: a8k: change CCU LLC SRAM mapping
The LLC SRAM will be enabled in OP-TEE OS for usage as secure storage. The CCU have to prepare SRAM window, but point to the DRAM-0 target until the SRAM is actually enabled. This patch changes CCU SRAM window target to DRAM-0 Remove dependence between LLC_SRAM and LLC_ENABLE and update the build documentation. The SRAМ base moved to follow the OP-TEE SHMEM area (0x05400000) Change-Id: I85c2434a3d515ec37da5ae8eb729e3280f91c456 Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
This commit is contained in:
parent
0eb3d1fc75
commit
0a977b9b8b
7 changed files with 25 additions and 19 deletions
|
@ -79,10 +79,12 @@ There are several build options:
|
||||||
|
|
||||||
- LLC_SRAM
|
- LLC_SRAM
|
||||||
|
|
||||||
Flag defining the LLC (L3) cache SRAM support. The feature is
|
Flag enabling the LLC (L3) cache SRAM support. The LLC SRAM is activated and used
|
||||||
disabled by default (``LLC_ENABLE=0``).
|
by Trusted OS (OP-TEE OS, BL32). The TF-A only prepares CCU address translation windows
|
||||||
When LLC SRAM is enabled, the secure payload (BL32) is loaded into this
|
for SRAM address range at BL31 execution stage with window target set to DRAM-0.
|
||||||
SRAM area instead of the DRAM.
|
When Trusted OS activates LLC SRAM, the CCU window target is changed to SRAM.
|
||||||
|
There is no reason to enable this feature if OP-TEE OS built with CFG_WITH_PAGER=n.
|
||||||
|
Only set LLC_SRAM=1 if OP-TEE OS is built with CFG_WITH_PAGER=y.
|
||||||
|
|
||||||
- MARVELL_SECURE_BOOT
|
- MARVELL_SECURE_BOOT
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,10 @@ struct addr_map_win ccu_memory_map[] = { /* IO window */
|
||||||
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
||||||
#else
|
#else
|
||||||
#if LLC_SRAM
|
#if LLC_SRAM
|
||||||
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
|
/* This entry is prepared for OP-TEE OS that enables the LLC SRAM
|
||||||
|
* and changes the window target to SRAM_TID.
|
||||||
|
*/
|
||||||
|
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, DRAM_0_TID},
|
||||||
#endif
|
#endif
|
||||||
{0x00000000f2000000, 0xe000000, IO_0_TID},
|
{0x00000000f2000000, 0xe000000, IO_0_TID},
|
||||||
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
||||||
|
|
|
@ -94,7 +94,10 @@ struct addr_map_win ccu_memory_map[] = {
|
||||||
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
||||||
#else
|
#else
|
||||||
#if LLC_SRAM
|
#if LLC_SRAM
|
||||||
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
|
/* This entry is prepared for OP-TEE OS that enables the LLC SRAM
|
||||||
|
* and changes the window target to SRAM_TID.
|
||||||
|
*/
|
||||||
|
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, DRAM_0_TID},
|
||||||
#endif
|
#endif
|
||||||
{0x00000000f2000000, 0xe000000, IO_0_TID},
|
{0x00000000f2000000, 0xe000000, IO_0_TID},
|
||||||
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
||||||
|
|
|
@ -132,7 +132,10 @@ struct addr_map_win ccu_memory_map[] = {
|
||||||
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
||||||
#else
|
#else
|
||||||
#if LLC_SRAM
|
#if LLC_SRAM
|
||||||
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
|
/* This entry is prepared for OP-TEE OS that enables the LLC SRAM
|
||||||
|
* and changes the window target to SRAM_TID.
|
||||||
|
*/
|
||||||
|
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, DRAM_0_TID},
|
||||||
#endif
|
#endif
|
||||||
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
|
||||||
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
||||||
|
|
|
@ -166,7 +166,10 @@ struct addr_map_win ccu_memory_map[] = {
|
||||||
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0x4000000, IO_0_TID}, /* IO window */
|
||||||
#else
|
#else
|
||||||
#if LLC_SRAM
|
#if LLC_SRAM
|
||||||
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, SRAM_TID},
|
/* This entry is prepared for OP-TEE OS that enables the LLC SRAM
|
||||||
|
* and changes the window target to SRAM_TID.
|
||||||
|
*/
|
||||||
|
{PLAT_MARVELL_LLC_SRAM_BASE, PLAT_MARVELL_LLC_SRAM_SIZE, DRAM_0_TID},
|
||||||
#endif
|
#endif
|
||||||
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
|
{0x00000000f2000000, 0xe000000, IO_0_TID}, /* IO window */
|
||||||
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
{0x00000000c0000000, 0x30000000, IO_0_TID}, /* IO window */
|
||||||
|
|
|
@ -96,13 +96,13 @@
|
||||||
#define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR
|
#define PLAT_MARVELL_TRUSTED_ROM_BASE PLAT_MARVELL_ATF_LOAD_ADDR
|
||||||
/* 4 MB for FIP image */
|
/* 4 MB for FIP image */
|
||||||
#define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x00400000
|
#define PLAT_MARVELL_TRUSTED_ROM_SIZE 0x00400000
|
||||||
/* Reserve 12M for SCP (Secure PayLoad) Trusted RAM
|
/* Reserve 12MB for SCP (Secure PayLoad) Trusted RAM
|
||||||
* OP-TEE SHMEM follows this region
|
* OP-TEE 4MB SHMEM follows this region
|
||||||
*/
|
*/
|
||||||
#define PLAT_MARVELL_TRUSTED_RAM_BASE 0x04400000
|
#define PLAT_MARVELL_TRUSTED_RAM_BASE 0x04400000
|
||||||
#define PLAT_MARVELL_TRUSTED_RAM_SIZE 0x00C00000 /* 12 MB DRAM */
|
#define PLAT_MARVELL_TRUSTED_RAM_SIZE 0x00C00000 /* 12 MB DRAM */
|
||||||
|
|
||||||
#define PLAT_MARVELL_LLC_SRAM_BASE PLAT_MARVELL_TRUSTED_RAM_BASE
|
#define PLAT_MARVELL_LLC_SRAM_BASE 0x05400000
|
||||||
#define PLAT_MARVELL_LLC_SRAM_SIZE 0x00100000 /* 1 MB SRAM */
|
#define PLAT_MARVELL_LLC_SRAM_SIZE 0x00100000 /* 1 MB SRAM */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -22,15 +22,7 @@ LLC_SRAM := 0
|
||||||
$(eval $(call add_define,LLC_SRAM))
|
$(eval $(call add_define,LLC_SRAM))
|
||||||
|
|
||||||
# Enable/Disable LLC
|
# Enable/Disable LLC
|
||||||
ifeq (${LLC_SRAM}, 0)
|
|
||||||
LLC_ENABLE := 1
|
LLC_ENABLE := 1
|
||||||
else
|
|
||||||
# When LLC_SRAM=1, the entire LLC converted to SRAM and enabled at BL1.
|
|
||||||
# All existing cases activating LLC at BL31 stage should be disabled.
|
|
||||||
# The below assignment does not allow changing the LLC_ENABLE
|
|
||||||
# value in the command line.
|
|
||||||
LLC_ENABLE = 0
|
|
||||||
endif
|
|
||||||
$(eval $(call add_define,LLC_ENABLE))
|
$(eval $(call add_define,LLC_ENABLE))
|
||||||
|
|
||||||
include lib/xlat_tables_v2/xlat_tables.mk
|
include lib/xlat_tables_v2/xlat_tables.mk
|
||||||
|
|
Loading…
Add table
Reference in a new issue