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) |