Skip to content

Commit 4b1c70a

Browse files
riscv/mm: Add XIP_FIXUP for phys_ram_base
This manifests as a crash early in boot on VexRiscv. Signed-off-by: Myrtle Shah <[email protected]> [Palmer: split commit] Fixes: 6d7f91d ("riscv: Get rid of CONFIG_PHYS_RAM_BASE in kernel physical address conversion") Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 3c04d84 commit 4b1c70a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ static uintptr_t __init best_map_size(phys_addr_t base, phys_addr_t size)
522522
}
523523

524524
#ifdef CONFIG_XIP_KERNEL
525+
#define phys_ram_base (*(phys_addr_t *)XIP_FIXUP(&phys_ram_base))
525526
extern char _xiprom[], _exiprom[], __data_loc;
526527

527528
/* called from head.S with MMU off */

0 commit comments

Comments
 (0)