1
0
rocket-chip/bootrom/bootrom.S
Wesley W. Terpstra 722b0d521f bootrom: also setup SBI a0+a1 for when we hang (#617)
This way a program started by the debugger still has the DTB handy.
2017-03-27 00:01:05 -07:00

25 lines
348 B
ArmAsm

#define DRAM_BASE 0x80000000
.section .text.start, "ax", @progbits
.globl _start
_start:
li s0, DRAM_BASE
csrr a0, mhartid
la a1, _dtb
jr s0
.section .text.hang, "ax", @progbits
.globl _hang
_hang:
csrr a0, mhartid
la a1, _dtb
1:
wfi
j 1b
.section .rodata.dtb, "a", @progbits
.globl _dtb
.align 5, 0
_dtb:
.ascii "DTB goes here"