summary refs log tree commit diff stats
path: root/include/hw/i386/x86.h
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2024-05-08 19:55:04 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-05-09 00:07:09 +0200
commit32d3ee87a17fc91e981a23dba94855bff89f5920 (patch)
tree90d6f9c2fbc42dc6cb423fcd65015778f413ba00 /include/hw/i386/x86.h
parent848351840148f8c3b53ddf6210194506547d3ffd (diff)
downloadfocaccia-qemu-32d3ee87a17fc91e981a23dba94855bff89f5920.tar.gz
focaccia-qemu-32d3ee87a17fc91e981a23dba94855bff89f5920.zip
hw/i386/x86: Don't leak "isa-bios" memory regions
Fix the leaking in x86_bios_rom_init() and pc_isa_bios_init() by adding an
"isa_bios" attribute to X86MachineState.

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-ID: <20240508175507.22270-4-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Diffstat (limited to 'include/hw/i386/x86.h')
-rw-r--r--include/hw/i386/x86.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index cb07618d19..a07de79167 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -18,6 +18,7 @@
 #define HW_I386_X86_H
 
 #include "exec/hwaddr.h"
+#include "exec/memory.h"
 
 #include "hw/boards.h"
 #include "hw/intc/ioapic.h"
@@ -52,6 +53,12 @@ struct X86MachineState {
     GMappedFile *initrd_mapped_file;
     HotplugHandler *acpi_dev;
 
+    /*
+     * Map the upper 128 KiB of the BIOS just underneath the 1 MiB address
+     * boundary.
+     */
+    MemoryRegion isa_bios;
+
     /* RAM information (sizes, addresses, configuration): */
     ram_addr_t below_4g_mem_size, above_4g_mem_size;