refactor(qemu): make L0GPT size configurable

Add a new parameter to make the size of the L0GPT configurable based on
the amount of memory available on a platform. That way platform with a
wider physical address range can be supported.

No change in functionality.

Change-Id: I5b7b4968636d61929ad6ebdc05c389291cf510b1
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
This commit is contained in:
Mathieu Poirier 2024-06-03 10:38:42 -06:00
parent 72d47829be
commit 7b015e12fe
2 changed files with 4 additions and 1 deletions

View file

@ -135,7 +135,7 @@ static void bl31_plat_gpt_setup(void)
* 256TB of RAM (48-bit PA) would require a 2MB L0 region. At the
* 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,
if (gpt_init_l0_tables(PLATFORM_GPCCR_PPS, PLAT_QEMU_L0_GPT_BASE,
PLAT_QEMU_L0_GPT_SIZE +
PLAT_QEMU_GPT_BITLOCK_SIZE) < 0) {
ERROR("gpt_init_l0_tables() failed!\n");

View file

@ -102,6 +102,9 @@
QEMU_PAS_RMM_SHARED_SIZE, \
GPT_GPI_REALM)
/* Cover 1TB with L0GTP */
#define PLATFORM_GPCCR_PPS GPCCR_PPS_1TB
/* GPT Configuration options */
#define PLATFORM_L0GPTSZ GPCCR_L0GPTSZ_30BITS