Skip to contentSkip to conversation

hw/display: load the correct ROM file for isa-vga device

PATCH Superseded Liav Albani 1 participant 2 messages Sep 17, 2022

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/display: load the correct ROM file for isa-vga device

Apparently we didn't load the correct ROM file when using the isa-vga device, which resulted in a display waiting to be initialized by a guest OS kernel. With this fix, SeaBIOS is able to print vital data to a text mode console during boot, which is useful in case of failing to continue booting.

---
 hw/display/vga-isa.c | 2 +-
 hw/display/vga_int.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/display/vga-isa.c +1 -1
index 46abbc5653..bcf646d012 100644
@@ -84,7 +84,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
                                 VBE_DISPI_LFB_PHYSICAL_ADDRESS,
                                 &s->vram);
     /* ROM BIOS */
-    rom_add_vga(VGABIOS_FILENAME);
+    rom_add_vga(VGABIOS_ISAVGA_FILENAME);
 }
 
 static Property vga_isa_properties[] = {
hw/display/vga_int.h +1 -1
index 305e700014..b5e803ac51 100644
@@ -183,7 +183,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val);
 extern const uint8_t sr_mask[8];
 extern const uint8_t gr_mask[16];
 
-#define VGABIOS_FILENAME "vgabios.bin"
+#define VGABIOS_ISAVGA_FILENAME "vgabios-isa.bin"
 #define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
 
 extern const MemoryRegionOps vga_mem_ops;
Signature · 1 line
2.37.3
#1 lore raw
Quoted 30 lines · Liav Albani

Apparently we didn't load the correct ROM file when using the isa-vga device, which resulted in a display waiting to be initialized by a guest OS kernel. With this fix, SeaBIOS is able to print vital data to a text mode console during boot, which is useful in case of failing to continue booting.

---
  hw/display/vga-isa.c | 2 +-
  hw/display/vga_int.h | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
hw/display/vga-isa.c +1 -1
index 46abbc5653..bcf646d012 100644
@@ -84,7 +84,7 @@ static void vga_isa_realizefn(DeviceState *dev, Error **errp)
                                  VBE_DISPI_LFB_PHYSICAL_ADDRESS,
                                  &s->vram);
      /* ROM BIOS */
-    rom_add_vga(VGABIOS_FILENAME);
+    rom_add_vga(VGABIOS_ISAVGA_FILENAME);
  }
 
  static Property vga_isa_properties[] = {
hw/display/vga_int.h +0 -0
index 305e700014..b5e803ac51 100644

hw/display/vga_int.h void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val); · line 186

Quoted 5 lines
hw/display/vga_int.h +1 -1
@@ -183,7 +183,7 @@ void vbe_ioport_write_data(void *opaque, uint32_t addr, uint32_t val);
  extern const uint8_t sr_mask[8];
  extern const uint8_t gr_mask[16];
 
-#define VGABIOS_FILENAME "vgabios.bin"
+#define VGABIOS_ISAVGA_FILENAME "vgabios-isa.bin"

This should be an "vgabios-isavga.bin" actually, at least this is how it is named on my development machine. I'll send a v2 shortly.

Quoted 3 lines
hw/display/vga_int.h +0 -0
  #define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
 
  extern const MemoryRegionOps vga_mem_ops;