Skip to content
Snippets Groups Projects
Commit cb052d77 authored by Bin Meng's avatar Bin Meng Committed by Leo Yu-Chi Liang
Browse files

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: default avatarYangjie Zhang <pyjmstr@gmail.com>
Signed-off-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarYangjie Zhang <pyjmstr@gmail.com>
Reviewed-by: Rick Chen's avatarRick Chen <rick@andestech.com>
parent e77ef0bb
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment