You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
479 B
29 lines
479 B
// See LICENSE for license details.
|
|
|
|
#include "encoding.h"
|
|
|
|
.section .text,"ax",@progbits
|
|
.globl _start
|
|
_start:
|
|
|
|
la sp, stack_top
|
|
la a0, trap_entry
|
|
la gp, _gp
|
|
csrw evec, a0
|
|
|
|
# clear any pending interrupts
|
|
csrwi clear_ipi, 0
|
|
|
|
li a0, SR_S | SR_PS | SR_EI | SR_S64 | SR_U64
|
|
or a1, a0, SR_EF | SR_EA
|
|
csrw status, a1
|
|
csrr a1, status
|
|
csrw status, a0
|
|
|
|
and a2, a1, SR_EF
|
|
sw a2, have_fp, t0
|
|
|
|
and a2, a1, SR_EA
|
|
sw a2, have_accelerator, t0
|
|
|
|
call boot
|
|
|