From a858b3548e2e783c553b26c9d1e67b6aa1e11741 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 21 Aug 2024 08:08:13 +0200 Subject: [PATCH] Enable SIE in MSTATUS too --- opensbi-enable-seip.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/opensbi-enable-seip.patch b/opensbi-enable-seip.patch index b1bf8b0..778ff9e 100644 --- a/opensbi-enable-seip.patch +++ b/opensbi-enable-seip.patch @@ -1,24 +1,26 @@ diff --git a/lib/sbi/sbi_irqchip.c b/lib/sbi/sbi_irqchip.c -index 0ae604a..dd4592a 100644 +index 0ae604a..94832c8 100644 --- a/lib/sbi/sbi_irqchip.c +++ b/lib/sbi/sbi_irqchip.c -@@ -37,8 +37,7 @@ int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot) +@@ -37,8 +37,8 @@ int sbi_irqchip_init(struct sbi_scratch *scratch, bool cold_boot) if (rc) return rc; - if (ext_irqfn != default_irqfn) - csr_set(CSR_MIE, MIP_MEIP); + csr_set(CSR_MIE, MIP_SEIP); ++ csr_set(CSR_MSTATUS, MSTATUS_SIE); return 0; } -@@ -47,8 +46,7 @@ void sbi_irqchip_exit(struct sbi_scratch *scratch) +@@ -47,8 +47,8 @@ void sbi_irqchip_exit(struct sbi_scratch *scratch) { const struct sbi_platform *plat = sbi_platform_ptr(scratch); - if (ext_irqfn != default_irqfn) - csr_clear(CSR_MIE, MIP_MEIP); + csr_clear(CSR_MIE, MIP_SEIP); ++ csr_clear(CSR_MSTATUS, MSTATUS_SIE); sbi_platform_irqchip_exit(plat); }