diff options
author | Christopher Celio <celio@eecs.berkeley.edu> | 2014-06-13 02:33:32 -0700 |
---|---|---|
committer | Christopher Celio <celio@eecs.berkeley.edu> | 2014-06-13 02:33:32 -0700 |
commit | 7b6a968c83af5c64db7b874e3b318ee2882b5cf1 (patch) | |
tree | e0a976bb17e6f9de58f1ea7afc097066fe9870a3 /pk/pk.S | |
parent | e3fa35fb859dc19d5ed2246c0bd7f0189a267bfa (diff) | |
download | pk-7b6a968c83af5c64db7b874e3b318ee2882b5cf1.zip pk-7b6a968c83af5c64db7b874e3b318ee2882b5cf1.tar.gz pk-7b6a968c83af5c64db7b874e3b318ee2882b5cf1.tar.bz2 |
Changes to allow spike & RTL behavior to better match each other.
- EI turned off on sys_exit.
- IM/IP cleared on start.
- badvaddr only saved to tf on page faults.
Diffstat (limited to 'pk/pk.S')
-rw-r--r-- | pk/pk.S | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -11,7 +11,13 @@ _start: la gp, _gp csrw evec, a0 - li a0, SR_S | SR_PS | SR_EI | SR_S64 + # clear any pending interrupts + li t0, -1 + csrw compare, t0 + csrw count,zero + 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 |