xous-kernel/asm.S
Sean Cross 95951535e4 wip commit
Signed-off-by: Sean Cross <sean@xobs.io>
2020-01-23 10:29:20 +08:00

23 lines
382 B
ArmAsm

#if __riscv_xlen == 64
# define STORE sd
# define LOAD ld
# define LOG_REGBYTES 3
#else
# define STORE sw
# define LOAD lw
# define LOG_REGBYTES 2
#endif
#define REGBYTES (1 << LOG_REGBYTES)
.global return_from_interrupt
.text
return_from_interrupt:
la sp, _estack
mret // Return to kmain
.global read_satp
.text
read_satp:
csrr a0, satp
ret