diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-05-14 02:14:14 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-05-14 02:14:14 -0700 |
commit | c5f18f61c07228f6606d2217230751d8ec6e091a (patch) | |
tree | 217e34eb6a476e199a14a69ee38d05fc635a2b21 /pk/sbi_entry.S | |
parent | 3f9b5d7ab80d11eb11739d9a02b4d0b66ace058b (diff) | |
download | pk-c5f18f61c07228f6606d2217230751d8ec6e091a.zip pk-c5f18f61c07228f6606d2217230751d8ec6e091a.tar.gz pk-c5f18f61c07228f6606d2217230751d8ec6e091a.tar.bz2 |
Add sbi_shutdown call
Diffstat (limited to 'pk/sbi_entry.S')
-rw-r--r-- | pk/sbi_entry.S | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/pk/sbi_entry.S b/pk/sbi_entry.S index 918ea70..05d66ad 100644 --- a/pk/sbi_entry.S +++ b/pk/sbi_entry.S @@ -12,7 +12,7 @@ sbi_base: # hart_id .align 4 - li a0, MCALL_HART_ID + li a7, MCALL_HART_ID ecall ret @@ -27,29 +27,25 @@ sbi_base: # console_putchar .align 4 - mv a1, a0 - li a0, MCALL_CONSOLE_PUTCHAR + li a7, MCALL_CONSOLE_PUTCHAR ecall ret # send_device_request .align 4 - mv a1, a0 - li a0, MCALL_SEND_DEVICE_REQUEST + li a7, MCALL_SEND_DEVICE_REQUEST ecall ret # receive_device_response .align 4 - mv a1, a0 - li a0, MCALL_RECEIVE_DEVICE_RESPONSE + li a7, MCALL_RECEIVE_DEVICE_RESPONSE ecall ret # send ipi .align 4 - mv a1, a0 - li a0, MCALL_SEND_IPI + li a7, MCALL_SEND_IPI ecall ret @@ -58,10 +54,18 @@ sbi_base: li a0, 1000000000 # or, you know, we could provide the correct answer ret + # shutdown + .align 4 + li a7, MCALL_SHUTDOWN + ecall + # end of SBI trampolines .globl do_mcall do_mcall: + mv a7, a0 + mv a0, a1 + mv a1, a2 ecall ret |