gdbstub on bp, unreachable, previous privilege S

This commit is contained in:
2023-10-23 17:54:49 +02:00
parent b57739fe38
commit cf8a1de199
4 changed files with 27 additions and 9 deletions
+2
View File
@@ -42,6 +42,8 @@ void interrupt_trigger(rv32_cpu_t* cpu, uint32_t scause)
cpu->csr[CSR_SSTATUS] |= 0x80;
// Set xSTATUS.xPP (Previous Privilege) bit
// TODO : Allow user mode interrupts (by not setting this)
cpu->csr[CSR_SSTATUS] |= 0x100;
// Unset xSTATUS.xIE (interrupt enable) bit
cpu->csr[CSR_SSTATUS] &= ~0b10U;