From cb052d771200b15717eeb68f185cf7caa2dcfea0 Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Mon, 17 Oct 2022 00:42:06 +0800 Subject: [PATCH] riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+ Since OpenSBI commit bf3ef53bb7f5 ("firmware: Enable FW_PIC by default"), OpenSBI runs directly at the load address without any code movement. This causes the SPL version of QEMU 'virt' U-Boot does not boot Linux kernel anymore. In that case, OpenSBI is loaded and runs at 0x81000000, and it creates a 512KiB PMP window from that address. When booting the Linux kernel, moving kernel to its linking address 0x80200000 overlaps the PMP window, and a PMP access failure is raised. Update SPL_OPENSBI_LOAD_ADDR to load OpenSBI to a safe address. Reported-by: Yangjie Zhang Signed-off-by: Bin Meng Tested-by: Yangjie Zhang Reviewed-by: Rick Chen --- board/emulation/qemu-riscv/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/emulation/qemu-riscv/Kconfig b/board/emulation/qemu-riscv/Kconfig index d8c57e6..f9883f1 100644 --- a/board/emulation/qemu-riscv/Kconfig +++ b/board/emulation/qemu-riscv/Kconfig @@ -23,7 +23,7 @@ config SPL_TEXT_BASE config SPL_OPENSBI_LOAD_ADDR hex - default 0x81000000 + default 0x80100000 config BOARD_SPECIFIC_OPTIONS # dummy def_bool y -- 2.7.4