32 lines
480 B
ArmAsm
32 lines
480 B
ArmAsm
.section .text.start, "ax", @progbits
|
|
.globl _start
|
|
_start:
|
|
/* Debug/JTAG may replace the RAM image without resetting Rocket's I-cache. */
|
|
fence.i
|
|
csrw mie, zero
|
|
li t0, 0x8
|
|
csrc mstatus, t0
|
|
|
|
.option push
|
|
.option norelax
|
|
la gp, __global_pointer$
|
|
.option pop
|
|
|
|
li t0, 0x6000
|
|
csrs mstatus, t0
|
|
|
|
la sp, _stack_top
|
|
|
|
la t0, __bss_start
|
|
la t1, __bss_end
|
|
1:
|
|
bgeu t0, t1, 2f
|
|
sd zero, 0(t0)
|
|
addi t0, t0, 8
|
|
j 1b
|
|
|
|
2:
|
|
call bsp_init
|
|
call main
|
|
tail _exit
|