bootrom: also setup SBI a0+a1 for when we hang (#617)
This way a program started by the debugger still has the DTB handy.
This commit is contained in:
parent
11507ac7d6
commit
722b0d521f
@ -1,7 +1,9 @@
|
|||||||
|
#define DRAM_BASE 0x80000000
|
||||||
|
|
||||||
.section .text.start, "ax", @progbits
|
.section .text.start, "ax", @progbits
|
||||||
.globl _start
|
.globl _start
|
||||||
_start:
|
_start:
|
||||||
la s0, DRAM_BASE
|
li s0, DRAM_BASE
|
||||||
csrr a0, mhartid
|
csrr a0, mhartid
|
||||||
la a1, _dtb
|
la a1, _dtb
|
||||||
jr s0
|
jr s0
|
||||||
@ -9,8 +11,11 @@ _start:
|
|||||||
.section .text.hang, "ax", @progbits
|
.section .text.hang, "ax", @progbits
|
||||||
.globl _hang
|
.globl _hang
|
||||||
_hang:
|
_hang:
|
||||||
|
csrr a0, mhartid
|
||||||
|
la a1, _dtb
|
||||||
|
1:
|
||||||
wfi
|
wfi
|
||||||
j _hang
|
j 1b
|
||||||
|
|
||||||
.section .rodata.dtb, "a", @progbits
|
.section .rodata.dtb, "a", @progbits
|
||||||
.globl _dtb
|
.globl _dtb
|
||||||
|
Binary file not shown.
@ -1,7 +1,6 @@
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
DRAM_BASE = 0x80000000;
|
ROM_BASE = 0x10000; /* ... but actually position independent */
|
||||||
ROM_BASE = 0x10000;
|
|
||||||
|
|
||||||
. = ROM_BASE;
|
. = ROM_BASE;
|
||||||
.text.start : { *(.text.start) }
|
.text.start : { *(.text.start) }
|
||||||
|
Loading…
Reference in New Issue
Block a user