diff --git a/bootrom/bootrom.S b/bootrom/bootrom.S index 384a4a37..95e9adf4 100644 --- a/bootrom/bootrom.S +++ b/bootrom/bootrom.S @@ -1,7 +1,9 @@ +#define DRAM_BASE 0x80000000 + .section .text.start, "ax", @progbits .globl _start _start: - la s0, DRAM_BASE + li s0, DRAM_BASE csrr a0, mhartid la a1, _dtb jr s0 @@ -9,8 +11,11 @@ _start: .section .text.hang, "ax", @progbits .globl _hang _hang: + csrr a0, mhartid + la a1, _dtb +1: wfi - j _hang + j 1b .section .rodata.dtb, "a", @progbits .globl _dtb diff --git a/bootrom/bootrom.img b/bootrom/bootrom.img index bee192cf..54a71616 100644 Binary files a/bootrom/bootrom.img and b/bootrom/bootrom.img differ diff --git a/bootrom/linker.ld b/bootrom/linker.ld index f871bf4c..43bc012a 100644 --- a/bootrom/linker.ld +++ b/bootrom/linker.ld @@ -1,7 +1,6 @@ SECTIONS { - DRAM_BASE = 0x80000000; - ROM_BASE = 0x10000; + ROM_BASE = 0x10000; /* ... but actually position independent */ . = ROM_BASE; .text.start : { *(.text.start) }