This commit is contained in:
Michael 2024-02-18 16:56:48 +00:00
parent bc16ad3e50
commit 95d51d25ae
3 changed files with 22 additions and 1 deletions

13
IO-Exit.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/hw/misc/debugexit.c b/hw/misc/debugexit.c
index ab6de69ce7..b309a36e17 100644
--- a/hw/misc/debugexit.c
+++ b/hw/misc/debugexit.c
@@ -32,7 +32,7 @@ static uint64_t debug_exit_read(void *opaque, hwaddr addr, unsigned size)
static void debug_exit_write(void *opaque, hwaddr addr, uint64_t val,
unsigned width)
{
- exit((val << 1) | 1);
+ exit(val);
}
static const MemoryRegionOps debug_exit_ops = {

7
overlay.nix Normal file
View File

@ -0,0 +1,7 @@
final: prev: {
patched-qemu = prev.qemu.overrideAttrs (previousAttrs: {
patches = previousAttrs.patches ++ [
./IO-Exit.patch
];
});
}

View File

@ -1,6 +1,7 @@
{ ... }:
let
pkgs = (import <nixpkgs> {});
my_overlay = import ./overlay.nix
pkgs = import <nixpkgs> { overlay [ my_overlay ]; };
in {
qemu = pkgs.qemu;
}