feat(qemu): add hob support for qemu platforms

This change introduces the hob support for both qemu platforms (virt and
sbsa).

As the hob list feature relies on transfer list, the transfer list
support is promoted to common qemu build configuration. The platforms
specific definitions are updated accordingly.

Change-Id: I473d83388fe95408d34515bf7bcbdd64ce4e777d
Signed-off-by: Kun Qin <kuqin@microsoft.com>
This commit is contained in:
Kun Qin 2025-01-30 22:12:43 -08:00
parent 4c23d62746
commit 648d2d8e2d
3 changed files with 25 additions and 11 deletions

View file

@ -153,4 +153,12 @@ ifeq ($(BRANCH_PROTECTION),$(filter $(BRANCH_PROTECTION),1 2 3))
PLAT_BL_COMMON_SOURCES += plat/arm/common/aarch64/arm_pauth.c
endif
ifeq (${TRANSFER_LIST}, 1)
include lib/transfer_list/transfer_list.mk
endif
ifeq (${HOB_LIST}, 1)
include lib/hob/hob.mk
endif
endif

View file

@ -39,10 +39,6 @@ $(eval $(call add_define,SPMC_OPTEE))
add-lib-optee := yes
endif
ifeq (${TRANSFER_LIST},1)
include lib/transfer_list/transfer_list.mk
endif
ifeq ($(NEED_BL32),yes)
$(eval $(call add_define,QEMU_LOAD_BL32))
endif

View file

@ -150,9 +150,19 @@
*/
#define BL31_SIZE 0x400000
#define BL31_BASE (BL31_LIMIT - BL31_SIZE)
#define BL31_LIMIT (BL1_RW_BASE)
#define BL31_LIMIT (BL1_RW_BASE - FW_HANDOFF_SIZE)
#define BL31_PROGBITS_LIMIT BL1_RW_BASE
#if TRANSFER_LIST
#define FW_HANDOFF_BASE BL31_LIMIT
#define FW_HANDOFF_LIMIT (FW_HANDOFF_BASE + FW_HANDOFF_SIZE)
#define FW_HANDOFF_SIZE 0x4000
#else
#define FW_HANDOFF_SIZE 0
#endif
#if TRANSFER_LIST
#define FW_NS_HANDOFF_BASE (NS_IMAGE_OFFSET - FW_HANDOFF_SIZE)
#endif
/*
* BL3-2 specific defines.
@ -174,14 +184,14 @@
#define PLAT_PHY_ADDR_SPACE_SIZE (1ull << 42)
#define PLAT_VIRT_ADDR_SPACE_SIZE (1ull << 42)
#if SPM_MM
#define MAX_MMAP_REGIONS 13
#define MAX_XLAT_TABLES 13
#elif ENABLE_RME
#define MAX_MMAP_REGIONS 15
#define MAX_XLAT_TABLES 15
#else
#define MAX_MMAP_REGIONS 12
#define MAX_XLAT_TABLES 12
#elif ENABLE_RME
#define MAX_MMAP_REGIONS 14
#define MAX_XLAT_TABLES 14
#else
#define MAX_MMAP_REGIONS 11
#define MAX_XLAT_TABLES 11
#endif
#define MAX_IO_DEVICES 3
#define MAX_IO_HANDLES 4