Enable machine mode interrupts

This commit is contained in:
Rodrigo Arias Mallo 2024-08-21 12:29:52 +02:00
parent 7091ca455c
commit ae379f7b9a

View File

@ -1,5 +1,5 @@
diff --git a/lib/sbi/sbi_irqchip.c b/lib/sbi/sbi_irqchip.c diff --git a/lib/sbi/sbi_irqchip.c b/lib/sbi/sbi_irqchip.c
index 0ae604a..c446e60 100644 index 0ae604a..7b1d95e 100644
--- a/lib/sbi/sbi_irqchip.c --- a/lib/sbi/sbi_irqchip.c
+++ b/lib/sbi/sbi_irqchip.c +++ b/lib/sbi/sbi_irqchip.c
@@ -9,6 +9,9 @@ @@ -9,6 +9,9 @@
@ -175,10 +175,10 @@ index 0ae604a..c446e60 100644
+ csr_write(CSR_MIP, 0); + csr_write(CSR_MIP, 0);
+ +
+ /* Enable external timer interrupts */ + /* Enable external timer interrupts */
+ //sbi_printf("Enabling MEIE in MIE register\n"); + sbi_printf("Enabling MEIE in MIE register\n");
+ //csr_set(CSR_MIE, MIE_MEIE); /* Needed? */ + csr_set(CSR_MIE, MIE_MEIE); /* Needed? */
+ //sbi_printf("Enabling MIE in MSTATUS register\n"); + sbi_printf("Enabling MIE in MSTATUS register\n");
+ //csr_set(CSR_MSTATUS, MSTATUS_MIE); /* Needed? */ + csr_set(CSR_MSTATUS, MSTATUS_MIE); /* Needed? */
+ +
+ sbi_printf("Switching to supervisor\n"); + sbi_printf("Switching to supervisor\n");
+ +