openbsd-ports/emulators/qemu/patches/patch-hw_pc_c
todd 9993d5d566 update to 0.8.0, see qemu.org for full ChangeLog
for OpenBSD, amd64 simulation on i386 appars to work ok now
2005-12-27 07:56:14 +00:00

41 lines
1.3 KiB
Plaintext

$OpenBSD: patch-hw_pc_c,v 1.2 2005/12/27 07:56:15 todd Exp $
--- hw/pc.c.orig Mon Dec 19 16:51:53 2005
+++ hw/pc.c Tue Dec 20 11:22:29 2005
@@ -616,7 +616,7 @@ static void pc_init1(int ram_size, int v
char buf[1024];
int ret, linux_boot, initrd_size, i, nb_nics1;
unsigned long bios_offset, vga_bios_offset;
- int bios_size, isa_bios_size;
+ int bios_size, isa_bios_size, vga_bios_size;
PCIBus *pci_bus;
CPUState *env;
@@ -668,8 +668,12 @@ static void pc_init1(int ram_size, int v
} else {
snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
}
+ vga_bios_size = get_image_size(buf);
+ if (vga_bios_size != 32768)
+ goto bios_error;
+
ret = load_image(buf, phys_ram_base + vga_bios_offset);
-
+
/* setup basic memory access */
cpu_register_physical_memory(0xc0000, 0x10000,
vga_bios_offset | IO_MEM_ROM);
@@ -802,7 +806,12 @@ static void pc_init1(int ram_size, int v
if (pci_enabled) {
for(i = 0; i < nb_nics; i++) {
- pci_ne2000_init(pci_bus, &nd_table[i]);
+#if 0
+ if (nic_pcnet)
+ pci_pcnet_init(pci_bus, &nd_table[i]);
+ else
+#endif
+ pci_ne2000_init(pci_bus, &nd_table[i]);
}
pci_piix3_ide_init(pci_bus, bs_table);
} else {