replaced inerrupt tests with allowed versions

This commit is contained in:
Kip Macsai-Goren 2023-03-22 23:09:43 -07:00
parent 6f15ae1225
commit ff59fefcc9
4 changed files with 6 additions and 14 deletions

View file

@ -60,14 +60,6 @@
00000000
00000000 # masked out mstatus.mpp = 0 (from U mode), mstatus.MPIE = 0, and mstatus.MIE = 0
00000000
0007ec01 # value to indicate successful vectoring on s soft interrupt
00000000
00000001 # scause value from s soft interrupt
80000000
00000000 # stval for ssoft interrupt (0x0)
00000000
00000800 # masked out mstatus.mpp = 1, mstatus.MPIE = 0, and mstatus.MIE = 0
00000000
0007ec03 # value to indicate successful vectoring on m soft interrupt
00000000
00000003 # scause value from m soft interrupt

View file

@ -49,7 +49,7 @@ jal cause_s_soft_interrupt // only cause one interrupt since we just want to tes
GOTO_M_MODE
jal cause_s_soft_interrupt // set software interrupt pending without it firing so we can make it fire in U mode
jal cause_s_soft_from_m_interrupt // set software interrupt pending without it firing so we can make it fire in U mode
GOTO_U_MODE // Should cause software interrupt to fire off.

View file

@ -50,7 +50,7 @@ GOTO_S_MODE // Causes U mode ecall
GOTO_M_MODE // Causes S mode ecall
jal cause_s_soft_interrupt
jal cause_s_soft_from_m_interrupt
jal cause_m_soft_interrupt
jal cause_s_time_interrupt
jal cause_m_time_interrupt
@ -72,7 +72,7 @@ jal cause_store_addr_misaligned
jal cause_store_acc
jal cause_ecall // M mode ecall
jal cause_s_soft_interrupt // The delegated S mode interrupts should not fire since we're running in M mode.
jal cause_s_soft_interrupt // S Mode Interrupts Ignored in M mode. sip writeable when mideleg = 1
jal cause_m_soft_interrupt
jal cause_s_time_interrupt
jal cause_m_time_interrupt

View file

@ -56,12 +56,12 @@ GOTO_U_MODE // Causes S mode ecall
GOTO_S_MODE // Causes U mode ecall
// some interrupts excluded becaus writing MIP is illegal from S mode
jal cause_s_soft_interrupt
// some interrupts excluded because writing MIP is illegal from S mode and writing SIP is only possible when delegated, which is tested below (priv spec 3.1.9)
//jal cause_s_soft_interrupt
jal cause_m_soft_interrupt
jal cause_m_time_interrupt
li a3, 0x40 // this interrupt involves a time loop waiting for the interrupt to go off.
// since interrupts are not always enabled,
// since interrupts are not always enabled, we need to make it stop after a certain number of loops, which is the number in a3
jal cause_s_ext_interrupt_GPIO
li a3, 0x40
jal cause_m_ext_interrupt