File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,24 @@ void setup_features(void)
255255 while (1 );
256256 }
257257 break ;
258+ case 0x7 :
259+ if (cpu_ver >= 0x0 ) {
260+ csr_clear (CSR_MXSTATUS , 0x1 );
261+ csr_write (CSR_MISELECT ,CSR_MNASTATUS );
262+ csr_write (CSR_MIREG ,0x1e );
263+ } else {
264+ while (1 );
265+ }
266+ break ;
267+ case 0x8 :
268+ if (cpu_ver >= 0x0 ) {
269+ csr_clear (CSR_MXSTATUS , 0x1 );
270+ csr_write (CSR_MISELECT ,CSR_MNASTATUS );
271+ csr_write (CSR_MIREG ,0x1e );
272+ } else {
273+ while (1 );
274+ }
275+ break ;
258276 default :
259277 while (1 );
260278 }
Original file line number Diff line number Diff line change 1414#define CSR_MRVBR 0x7c7
1515#define CSR_MCOUNTERWEN 0x7c9
1616#define CSR_MSMPR 0x7f3
17+ #define CSR_MNASTATUS 0x8000000000000210
1718
1819/* clang-format off */
1920#define MSTATUS_SIE _UL(0x00000002)
248249#define CSR_MIP 0x344
249250#define CSR_MTINST 0x34a
250251#define CSR_MTVAL2 0x34b
252+ #define CSR_MISELECT 0x350
253+ #define CSR_MIREG 0x351
251254#define CSR_PMPCFG0 0x3a0
252255#define CSR_PMPCFG1 0x3a1
253256#define CSR_PMPCFG2 0x3a2
You can’t perform that action at this time.
0 commit comments