1 # See LICENSE for license details.
19 supervisor_trap_entry:
20 j supervisor_trap_entry
23 hypervisor_trap_entry:
24 j hypervisor_trap_entry
65 li t0, MSTATUS_PRV1; csrc mstatus, t0 # run tests in user mode
66 li t0, MSTATUS_IE1; csrs mstatus, t0 # enable interrupts in user mode
67 li t0, MSTATUS_FS; csrs mstatus, t0 # enable FPU
68 li t0, MSTATUS_XS; csrs mstatus, t0 # enable accelerator
70 li t0, ((MSTATUS64_UA & ~(MSTATUS64_UA << 1)) * UA_RV64) >> 31
72 li t1, ((MSTATUS64_SA & ~(MSTATUS64_SA << 1)) * UA_RV64) >> 31
75 # make sure processor supports RV64 if this was compiled for RV64
80 # enable RV64 for user and supervisor
84 # disable RV64 for user and supervisor
94 ## if that didn't stick, we don't have a FPU, so don't initialize it
134 # initialize global pointer
142 # for now, assume only 1 core
146 # give each core 128KB of stack + TLS
234 .section ".tdata.begin"
238 .section ".tdata.end"