From cc65500434ed98671d53a81069123d47086f11eb Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Wed, 21 Aug 2024 10:12:41 +0200 Subject: [PATCH] Use csr_set to set stvec --- opensbi-test-plic.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opensbi-test-plic.patch b/opensbi-test-plic.patch index 07dbc25..fdcf56a 100644 --- a/opensbi-test-plic.patch +++ b/opensbi-test-plic.patch @@ -1,5 +1,5 @@ diff --git a/lib/sbi/sbi_irqchip.c b/lib/sbi/sbi_irqchip.c -index 0ae604a..0314715 100644 +index 0ae604a..000b89c 100644 --- a/lib/sbi/sbi_irqchip.c +++ b/lib/sbi/sbi_irqchip.c @@ -9,6 +9,9 @@ @@ -138,7 +138,7 @@ index 0ae604a..0314715 100644 + csr_set(CSR_SIE, SIE_SEIE); // Enable supervisor external interrupts + csr_set(CSR_SSTATUS, SSTATUS_SIE); // Enable global interrupts in supervisor mode + csr_set(CSR_MIDELEG, MIDELEG_SEIE); // Delegate machine interrupts to supervisor mode -+ asm volatile("csrw stvec, %0" : : "r"(&supervisor_trap_entry)); ++ csr_set(CSR_STVEC, &supervisor_trap_entry); + sbi_printf("Enabled supervisor delegation:\n"); + + dumpregs();