Merge "fix(qemu): allocate space for GPT bitlock" into integration

This commit is contained in:
Soby Mathew 2024-07-03 12:08:10 +02:00 committed by TrustedFirmware Code Review
commit 5d10069980
3 changed files with 12 additions and 7 deletions

View file

@ -173,7 +173,8 @@ static void bl2_plat_gpt_setup(void)
* moment we use a 8KB table, which covers 1TB of RAM (40-bit PA).
*/
if (gpt_init_l0_tables(GPCCR_PPS_1TB, PLAT_QEMU_L0_GPT_BASE,
PLAT_QEMU_L0_GPT_SIZE) < 0) {
PLAT_QEMU_L0_GPT_SIZE +
PLAT_QEMU_GPT_BITLOCK_SIZE) < 0) {
ERROR("gpt_init_l0_tables() failed!\n");
panic();
}

View file

@ -342,8 +342,11 @@
* Tables
*/
#define PLAT_QEMU_L0_GPT_BASE (PLAT_QEMU_L1_GPT_BASE - \
PLAT_QEMU_L0_GPT_SIZE)
(PLAT_QEMU_L0_GPT_SIZE + \
PLAT_QEMU_GPT_BITLOCK_SIZE))
#define PLAT_QEMU_L0_GPT_SIZE (2 * PAGE_SIZE)
/* Two pages so the L0 GPT is naturally aligned. */
#define PLAT_QEMU_GPT_BITLOCK_SIZE (2 * PAGE_SIZE)
#define PLAT_QEMU_L1_GPT_BASE (SEC_DRAM_BASE + SEC_DRAM_SIZE - \
PLAT_QEMU_L1_GPT_SIZE)
@ -353,7 +356,8 @@
#define RME_GPT_DRAM_BASE PLAT_QEMU_L0_GPT_BASE
#define RME_GPT_DRAM_SIZE (PLAT_QEMU_L1_GPT_SIZE + \
PLAT_QEMU_L0_GPT_SIZE)
PLAT_QEMU_L0_GPT_SIZE + \
PLAT_QEMU_GPT_BITLOCK_SIZE)
#ifndef __ASSEMBLER__
/* L0 table greater than 4KB must be naturally aligned */

View file

@ -22,7 +22,7 @@
* | 1GB |L0 GPT|ANY |Flash |
* 00000000 | | | |IO |
* ---------------------------------------------------------------------------
* 224MB | 1KB |L0 GPT|ANY |Secure RAM (EL3) |
* 224MB | 1KB |L1 GPT|ANY |Secure RAM (EL3) |
* 0e000000 | | | | (shared) |
* ---------------------------------------------------------------------------
* | 1MB-1KB |L1 GPT|ROOT |Secure RAM (EL3) |
@ -31,10 +31,10 @@
* 225MB | 14MB |L1 GPT|SECURE|Secure RAM |
* 0e100000 | | | | (EL2, EL1) |
* ---------------------------------------------------------------------------
* | 1MB+8KB |L1 GPT|ROOT |L0 and L1 GPTs |
* 0eefe000 | | | | |
* | 2MB |L1 GPT|ROOT |L0 and L1 GPTs, |
* 0edfc000 | +16KB | | | bitlocks |
* ---------------------------------------------------------------------------
* 240MB | 800MB |L0 GPT|ANY |IO |
* 240MB | 800MB |L1 GPT|ANY |IO |
* 0f000000 | | | | |
* ---------------------------------------------------------------------------
* 1GB | 1MB |L1 GPT|NS |DRAM |