From 038d2e71566bf42c8ae3b8230209c062b8d15e1d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Thu, 1 Aug 2024 20:22:43 +0200 Subject: [PATCH] Try opensbi without supervisor ext delegation --- lagarto-ox.nix | 1 + opensbi-dont-delegate.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 opensbi-dont-delegate.patch diff --git a/lagarto-ox.nix b/lagarto-ox.nix index c389923..e757532 100644 --- a/lagarto-ox.nix +++ b/lagarto-ox.nix @@ -326,6 +326,7 @@ ]; patches = [ ./opensbi-timer-debug.patch + ./opensbi-dont-delegate.patch #./ox-alveo-platform-plic.patch ]; }); diff --git a/opensbi-dont-delegate.patch b/opensbi-dont-delegate.patch new file mode 100644 index 0000000..5d7388a --- /dev/null +++ b/opensbi-dont-delegate.patch @@ -0,0 +1,13 @@ +diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c +index c366701..c5b5249 100644 +--- a/lib/sbi/sbi_hart.c ++++ b/lib/sbi/sbi_hart.c +@@ -199,7 +199,7 @@ static int delegate_traps(struct sbi_scratch *scratch) + return 0; + + /* Send M-mode interrupts and most exceptions to S-mode */ +- interrupts = MIP_SSIP | MIP_STIP | MIP_SEIP; ++ interrupts = MIP_SSIP | MIP_STIP; + interrupts |= sbi_pmu_irq_bit(); + + exceptions = (1U << CAUSE_MISALIGNED_FETCH) | (1U << CAUSE_BREAKPOINT) |