hqjenny-rocket-chip/bootrom/bootrom.S

28 lines
445 B
ArmAsm
Raw Normal View History

#define DRAM_BASE 0x80000000
.section .text.start, "ax", @progbits
.globl _start
_start:
2018-09-30 10:59:53 +08:00
csrwi 0x7c1, 0 // disable chicken bits
li s0, DRAM_BASE
csrr a0, mhartid
la a1, _dtb
jr s0
.section .text.hang, "ax", @progbits
.globl _hang
_hang:
2018-09-30 10:59:53 +08:00
csrwi 0x7c1, 0 // disable chicken bits
csrr a0, mhartid
la a1, _dtb
csrwi mie, 0
1:
wfi
j 1b
.section .rodata.dtb, "a", @progbits
.globl _dtb
.align 5, 0
_dtb:
.ascii "DTB goes here"