diff --git a/JOURNAL.md b/JOURNAL.md index 6c00508..88b4d27 100644 --- a/JOURNAL.md +++ b/JOURNAL.md @@ -3297,3 +3297,44 @@ I see that the MIE sets the machine mode external interrupt enable in this way: Only if the external interrupt function is not the default one. But for the PLIC, it looks like the default one is being used. So let's enable the machine mode interrupts unconditionally. + +Let's try to cause an interruption. I would need to list all the steps. + + mw 0x40802000 0x10 # Enable interrupt for source 4 (timer) + mw 0x40800010 0xff # Make source 4 priority large + md 0x40a00004 1 # Show which value should be claimed + mw 0x40a00004 0 # Claim 0 + +Nice, I can see the trap: + + Boot HART MIDELEG : 0x0000000000000022 + Boot HART MEDELEG : 0x000000000000b109 + ... + => mw 0x40802000 0x10 # Enable interrupt for source 4 (timer) + => mw 0x40800010 0xff # Make source 4 priority large + => md 0x40a00004 1 # Show which value should be claimed + 40a00004: 00000000 .... + => mw 0x40a00004 0 # Claim 0 (weird) +