]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+
authorBin Meng <bmeng.cn@gmail.com>
Sun, 16 Oct 2022 16:42:06 +0000 (00:42 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 20 Oct 2022 07:22:33 +0000 (15:22 +0800)
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 <pyjmstr@gmail.com>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Yangjie Zhang <pyjmstr@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
board/emulation/qemu-riscv/Kconfig

index d8c57e6bb05f16a2a52b35178f9751ddef775c5f..f9883f18b0b2817566f4509a086c874afb7ce907 100644 (file)
@@ -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