Commit 4b1c70aa authored by Palmer Dabbelt's avatar Palmer Dabbelt

riscv/mm: Add XIP_FIXUP for phys_ram_base

This manifests as a crash early in boot on VexRiscv.
Signed-off-by: default avatarMyrtle Shah <gatecat@ds0.me>
[Palmer: split commit]
Fixes: 6d7f91d9 ("riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPalmer Dabbelt <palmer@rivosinc.com>
parent 3c04d845
...@@ -522,6 +522,7 @@ static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size) ...@@ -522,6 +522,7 @@ static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size)
} }
#ifdef CONFIG_XIP_KERNEL #ifdef CONFIG_XIP_KERNEL
#define phys_ram_base (*(phys_addr_t *)XIP_FIXUP(&phys_ram_base))
extern char _xiprom[], _exiprom[], __data_loc; extern char _xiprom[], _exiprom[], __data_loc;
/* called from head.S with MMU off */ /* called from head.S with MMU off */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment