On 10/7/25 10:52, Mark Cave-Ayland wrote:
Now that we can guarantee the isapc machine will never have a PCI bus, any
instances of rom_memory can be replaced by system_memory and rom_memory
removed completely.

Signed-off-by: Mark Cave-Ayland <mark.caveayl...@nutanix.com>
---
  hw/i386/isapc.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/i386/isapc.c b/hw/i386/isapc.c
index bb22083821..27c075b5f3 100644
--- a/hw/i386/isapc.c
+++ b/hw/i386/isapc.c
@@ -35,7 +35,6 @@ static void pc_init_isa(MachineState *machine)
      ISABus *isa_bus;
      GSIState *gsi_state;
      MemoryRegion *ram_memory;
-    MemoryRegion *rom_memory = system_memory;
      DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];
      uint32_t irq;
      int i;
@@ -73,7 +72,7 @@ static void pc_init_isa(MachineState *machine)
/* allocate ram and load rom/bios */
      if (!xen_enabled()) {
-        pc_memory_init(pcms, system_memory, rom_memory, 0);
+        pc_memory_init(pcms, system_memory, system_memory, 0);

I'd prefer just call here:

  x86_bios_rom_init(X86_MACHINE(pcms), "bios.bin", rom_memory, true);

and in pc_system_firmware_init(): assert(pcmc->pci_enabled).

WDYT?

      } else {
          assert(machine->ram_size == x86ms->below_4g_mem_size +
                                      x86ms->above_4g_mem_size);


Reply via email to