diff options
author | Howard Mao <zhehao.mao@gmail.com> | 2016-10-11 13:41:16 -0700 |
---|---|---|
committer | Howard Mao <zhehao.mao@gmail.com> | 2017-02-27 19:10:11 -0800 |
commit | c53de08b9ba719f3e7b02fc1a029d194a190da48 (patch) | |
tree | 7518b3d1ac692f15299288e5136a3deb1a722886 | |
parent | 6667bc4c42fd9968527644e32841757234285efd (diff) | |
download | riscv-pk-c53de08b9ba719f3e7b02fc1a029d194a190da48.zip riscv-pk-c53de08b9ba719f3e7b02fc1a029d194a190da48.tar.gz riscv-pk-c53de08b9ba719f3e7b02fc1a029d194a190da48.tar.bz2 |
enable RoCC accelerator
-rw-r--r-- | machine/encoding.h | 1 | ||||
-rw-r--r-- | machine/minit.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/machine/encoding.h b/machine/encoding.h index 8aeac4c..792d87b 100644 --- a/machine/encoding.h +++ b/machine/encoding.h @@ -98,6 +98,7 @@ #define MIP_SEIP (1 << IRQ_S_EXT) #define MIP_HEIP (1 << IRQ_H_EXT) #define MIP_MEIP (1 << IRQ_M_EXT) +#define MIP_ROCC (1 << IRQ_COP) #define SIP_SSIP MIP_SSIP #define SIP_STIP MIP_STIP diff --git a/machine/minit.c b/machine/minit.c index b3f2c86..54ff88e 100644 --- a/machine/minit.c +++ b/machine/minit.c @@ -19,6 +19,7 @@ static void mstatus_init() uintptr_t ms = 0; ms = INSERT_FIELD(ms, MSTATUS_VM, VM_CHOICE); ms = INSERT_FIELD(ms, MSTATUS_FS, 1); + ms = INSERT_FIELD(ms, MSTATUS_XS, 1); write_csr(mstatus, ms); // Make sure the hart actually supports the VM mode we want |