[PATCH] riscv: qemu: spl: Fix booting Linux kernel with OpenSBI 1.0+

Rick Chen rickchen36 at gmail.com
Mon Oct 17 03:30:07 CEST 2022


> From: Bin Meng <bmeng.cn at gmail.com>
> Sent: Monday, October 17, 2022 12:42 AM
> To: Rick Jian-Zhi Chen(陳建志) <rick at andestech.com>; Leo Yu-Chi Liang(梁育齊) <ycliang at andestech.com>; u-boot at lists.denx.de
> Cc: falcon at tinylab.org; Yangjie Zhang <pyjmstr at gmail.com>
> 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 <pyjmstr at gmail.com>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> Tested-by: Yangjie Zhang <pyjmstr at gmail.com>
>
> ---
>
>  board/emulation/qemu-riscv/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Rick Chen <rick at andestech.com>


More information about the U-Boot mailing list