722b0d521f
This way a program started by the debugger still has the DTB handy.
25 lines
348 B
ArmAsm
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"
|