From 792fd51b14d1056514e2ddfeb24cf6436df828fb Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Thu, 23 Jan 2020 14:10:07 +0100 Subject: mb/emulation/qemu-aarch64: Add ARM trusted firmware support Linux expects a working PSCI and hangs if not found. Add BL31 into CBFS as '-M virt,secure=on -bios ' commands line arguments cause qemu's internal PSCI emulation to shutdown. BL31 is placed in qemu's SECURERAM memory region and won't conflict with resources in DRAM. Tested on qemu-system-aarch64: Fixes a hang and allows to boot into Linux 5.4.14 userspace. Change-Id: I809742522240185431621cc4fd8b9c7deaf2bb54 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/38535 Tested-by: build bot (Jenkins) Reviewed-by: Philipp Deppenwiese Reviewed-by: Arthur Heymans --- src/mainboard/emulation/qemu-aarch64/bootblock.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mainboard/emulation/qemu-aarch64/bootblock.c') diff --git a/src/mainboard/emulation/qemu-aarch64/bootblock.c b/src/mainboard/emulation/qemu-aarch64/bootblock.c index 280f77ec1e..77d7e532de 100644 --- a/src/mainboard/emulation/qemu-aarch64/bootblock.c +++ b/src/mainboard/emulation/qemu-aarch64/bootblock.c @@ -15,6 +15,8 @@ #include #include +extern u8 _secram[], _esecram[]; + void bootblock_mainboard_init(void) { mmu_init(); @@ -29,5 +31,7 @@ void bootblock_mainboard_init(void) mmu_config_range(_romstage, REGION_SIZE(romstage), MA_MEM | MA_S | MA_RW); mmu_config_range(_ramstage, REGION_SIZE(ramstage), MA_MEM | MA_S | MA_RW); + mmu_config_range(_secram, REGION_SIZE(secram), MA_MEM | MA_S | MA_RW); + mmu_enable(); } -- cgit v1.2.3