mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
feat(rmm): add support for the 2nd DRAM bank
This patch adds support for RMM granules allocation in FVP 2nd DRAM 2GB bank at 0x880000000 base address. For ENABLE_RME = 1 case it also removes "mem=1G" Linux kernel command line option in fvp-base-psci-common.dsti to allow memory layout discovery from the FVP device tree. FVP parameter 'bp.dram_size' - size of main memory in gigabytes documented in docs/components/realm-management-extension.rst is changed from 2 to 4. Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com> Change-Id: I174da4416ad5a8d41bf0ac89f356dba7c0cd3fe7
This commit is contained in:
parent
d3d2a5a484
commit
346cfe2b46
4 changed files with 26 additions and 11 deletions
|
@ -196,7 +196,7 @@ and run the default tests including Realm world tests.
|
|||
-C bp.refcounter.use_real_time=0 \
|
||||
-C bp.ve_sysregs.exit_on_shutdown=1 \
|
||||
-C cache_state_modelled=1 \
|
||||
-C bp.dram_size=2 \
|
||||
-C bp.dram_size=4 \
|
||||
-C bp.secure_memory=1 \
|
||||
-C pci.pci_smmuv3.mmu.SMMU_ROOT_IDR0=3 \
|
||||
-C pci.pci_smmuv3.mmu.SMMU_ROOT_IIDR=0x43B \
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#size-cells = <2>;
|
||||
|
||||
#if (ENABLE_RME == 1)
|
||||
chosen { bootargs = "mem=1G console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=on";};
|
||||
chosen { bootargs = "console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=on";};
|
||||
#else
|
||||
chosen {};
|
||||
#endif
|
||||
|
|
|
@ -21,24 +21,30 @@
|
|||
* ============================================================================
|
||||
* 0GB | 1GB |L0 GPT|ANY |TBROM (EL3 code) |Fixed mapping
|
||||
* | | | |TSRAM (EL3 data) |
|
||||
* | | | |IO (incl.UARTs & GIC) |
|
||||
* 00000000 | | | |IO (incl.UARTs & GIC) |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 1GB | 1GB |L0 GPT|ANY |IO |Fixed mapping
|
||||
* 40000000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 2GB | 1GB |L1 GPT|NS |DRAM (NS Kernel) |Use T.Descrip
|
||||
* 2GB |2GB-64MB |L1 GPT|NS |DRAM (NS Kernel) |Use T.Descrip
|
||||
* 80000000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 3GB |1GB-64MB |L1 GPT|NS |DRAM (NS Kernel) |Use T.Descrip
|
||||
* ----------------------------------------------------------------------------
|
||||
* 4GB-64MB |64MB-32MB | | | |
|
||||
* | -4MB |L1 GPT|SECURE|DRAM TZC |Use T.Descrip
|
||||
* 4GB-64MB |64MB-32MB-4MB|L1 GPT|SECURE|DRAM TZC |Use T.Descrip
|
||||
* FC000000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 4GB-32MB | | | | |
|
||||
* -3MB-1MB |32MB |L1 GPT|REALM |RMM |Use T.Descrip
|
||||
* FDC00000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 4GB-3MB | | | | |
|
||||
* -1MB |3MB |L1 GPT|ROOT |EL3 DRAM data |Use T.Descrip
|
||||
* FFC00000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 4GB-1MB |1MB |L1 GPT|ROOT |DRAM (L1 GPTs, SCP TZC) |Fixed mapping
|
||||
* FFF00000 | | | | |
|
||||
* ----------------------------------------------------------------------------
|
||||
* 34GB |2GB |L1 GPT|NS |DRAM (NS Kernel) |Use T.Descrip
|
||||
* 880000000| | | | |
|
||||
* ============================================================================
|
||||
*
|
||||
* - 4KB of L0 GPT reside in TSRAM, on top of the CONFIG section.
|
||||
|
@ -55,7 +61,7 @@
|
|||
|
||||
/* Device memory 0 to 2GB */
|
||||
#define ARM_PAS_1_BASE (U(0))
|
||||
#define ARM_PAS_1_SIZE ((ULL(1)<<31)) /* 2GB */
|
||||
#define ARM_PAS_1_SIZE ((ULL(1) << 31)) /* 2GB */
|
||||
|
||||
/* NS memory 2GB to (end - 64MB) */
|
||||
#define ARM_PAS_2_BASE (ARM_PAS_1_BASE + ARM_PAS_1_SIZE)
|
||||
|
@ -69,9 +75,14 @@
|
|||
#define ARM_PAS_3_BASE (ARM_AP_TZC_DRAM1_BASE)
|
||||
#define ARM_PAS_3_SIZE (ARM_AP_TZC_DRAM1_SIZE)
|
||||
|
||||
/* NS memory 2GB */
|
||||
#define ARM_PAS_4_BASE ARM_DRAM2_BASE
|
||||
#define ARM_PAS_4_SIZE ((ULL(1) << 31)) /* 2GB */
|
||||
|
||||
#define ARM_PAS_GPI_ANY MAP_GPT_REGION(ARM_PAS_1_BASE, \
|
||||
ARM_PAS_1_SIZE, \
|
||||
GPT_GPI_ANY)
|
||||
|
||||
#define ARM_PAS_KERNEL GPT_MAP_REGION_GRANULE(ARM_PAS_2_BASE, \
|
||||
ARM_PAS_2_SIZE, \
|
||||
GPT_GPI_NS)
|
||||
|
@ -80,6 +91,9 @@
|
|||
ARM_PAS_3_SIZE, \
|
||||
GPT_GPI_SECURE)
|
||||
|
||||
#define ARM_PAS_KERNEL_1 GPT_MAP_REGION_GRANULE(ARM_PAS_4_BASE, \
|
||||
ARM_PAS_4_SIZE, \
|
||||
GPT_GPI_NS)
|
||||
/*
|
||||
* REALM and Shared area share the same PAS, so consider them a single
|
||||
* PAS region to configure in GPT.
|
||||
|
|
|
@ -143,11 +143,12 @@ static void arm_bl2_plat_gpt_setup(void)
|
|||
ARM_PAS_SECURE,
|
||||
ARM_PAS_REALM,
|
||||
ARM_PAS_EL3_DRAM,
|
||||
ARM_PAS_GPTS
|
||||
ARM_PAS_GPTS,
|
||||
ARM_PAS_KERNEL_1
|
||||
};
|
||||
|
||||
/* Initialize entire protected space to GPT_GPI_ANY. */
|
||||
if (gpt_init_l0_tables(GPCCR_PPS_4GB, ARM_L0_GPT_ADDR_BASE,
|
||||
if (gpt_init_l0_tables(GPCCR_PPS_64GB, ARM_L0_GPT_ADDR_BASE,
|
||||
ARM_L0_GPT_SIZE) < 0) {
|
||||
ERROR("gpt_init_l0_tables() failed!\n");
|
||||
panic();
|
||||
|
|
Loading…
Add table
Reference in a new issue