diff --git a/plat/qemu/common/qemu_bl2_setup.c b/plat/qemu/common/qemu_bl2_setup.c index 60acb2520..d752b6cca 100644 --- a/plat/qemu/common/qemu_bl2_setup.c +++ b/plat/qemu/common/qemu_bl2_setup.c @@ -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(); } diff --git a/plat/qemu/qemu/include/platform_def.h b/plat/qemu/qemu/include/platform_def.h index 95620d3c6..db9d65a8e 100644 --- a/plat/qemu/qemu/include/platform_def.h +++ b/plat/qemu/qemu/include/platform_def.h @@ -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 */ diff --git a/plat/qemu/qemu/include/qemu_pas_def.h b/plat/qemu/qemu/include/qemu_pas_def.h index c108920c1..bcbea210d 100644 --- a/plat/qemu/qemu/include/qemu_pas_def.h +++ b/plat/qemu/qemu/include/qemu_pas_def.h @@ -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 |