From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NpDqw-0008Hy-LH for qemu-devel@nongnu.org; Tue, 09 Mar 2010 23:49:02 -0500 Received: from [199.232.76.173] (port=53643 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NpDqv-0008Hg-9t for qemu-devel@nongnu.org; Tue, 09 Mar 2010 23:49:01 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NpDqu-0004J2-Ey for qemu-devel@nongnu.org; Tue, 09 Mar 2010 23:49:01 -0500 Received: from mail-px0-f203.google.com ([209.85.216.203]:64937) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NpDqu-0004Iu-4c for qemu-devel@nongnu.org; Tue, 09 Mar 2010 23:49:00 -0500 Received: by pxi41 with SMTP id 41so2789214pxi.23 for ; Tue, 09 Mar 2010 20:48:59 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <473191351003080548h72dbfbdaje5e10f7aa7bdf08b@mail.gmail.com> References: <473191351003071804x62acae0bk3f967b6be1f22a54@mail.gmail.com> <20100308100538.GD2869@shareable.org> <473191351003080308x1dcded56ted4fde0458767f8c@mail.gmail.com> <473191351003080548h72dbfbdaje5e10f7aa7bdf08b@mail.gmail.com> From: Roy Tam Date: Wed, 10 Mar 2010 12:48:39 +0800 Message-ID: <473191351003092048y2e225538p30e152a248d2bf43@mail.gmail.com> Subject: Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel 2010/3/8 Roy Tam : > 2010/3/8 Roy Tam : >> the following hack reenables QEMU/Bochs BIOS booting with -vga std >> (for both pc and isapc): > > a more complete hack, cirrus vga will work too: instead of hacking each vga source, adding new option seems better. --- diff --git a/hw/pc.c b/hw/pc.c index e50a488..d32ad85 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -53,6 +53,9 @@ #define PC_MAX_BIOS_SIZE (4 * 1024 * 1024) +#define VGABIOS_FILENAME "vgabios.bin" +#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin" + /* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */ #define ACPI_DATA_SIZE 0x10000 #define BIOS_CFG_IOPORT 0x510 @@ -929,17 +932,26 @@ static void pc_init1(ram_addr_t ram_size, } else { isa_cirrus_vga_init(); } + if (old_bios_support) { + rom_add_file_fixed(VGABIOS_CIRRUS_FILENAME, 0xc0000); + } } else if (vmsvga_enabled) { if (pci_enabled) pci_vmsvga_init(pci_bus); else fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__); + if (old_bios_support) { + rom_add_file_fixed(VGABIOS_FILENAME, 0xc0000); + } } else if (std_vga_enabled) { if (pci_enabled) { pci_vga_init(pci_bus, 0, 0); } else { isa_vga_init(); } + if (old_bios_support) { + rom_add_file_fixed(VGABIOS_FILENAME, 0xc0000); + } } rtc_state = rtc_init(2000); diff --git a/hw/pc.h b/hw/pc.h index d54959a..d318ddd 100644 --- a/hw/pc.h +++ b/hw/pc.h @@ -91,6 +91,7 @@ void cmos_set_s3_resume(void); /* pc.c */ extern int fd_bootchk; +extern int old_bios_support; void ioport_set_a20(int enable); int ioport_get_a20(void); diff --git a/qemu-options.hx b/qemu-options.hx index fd50add..afe2545 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -769,6 +769,16 @@ slows down the IDE transfers). ETEXI #ifdef TARGET_I386 +DEF("old-bios", 0, QEMU_OPTION_old_bios, + "-old-bios use it for Bochs/QEMU BIOS\n") +#endif +STEXI +@item -old-bios +@findex -old-bios +Use it when combine with old Bochs/QEMU BIOS for debugging. +ETEXI + +#ifdef TARGET_I386 HXCOMM Deprecated by -rtc DEF("rtc-td-hack", 0, QEMU_OPTION_rtc_td_hack, "") #endif diff --git a/vl.c b/vl.c index d8328c7..0d7ec83 100644 --- a/vl.c +++ b/vl.c @@ -217,6 +217,7 @@ CharDriverState *virtcon_hds[MAX_VIRTIO_CONSOLES]; #ifdef TARGET_I386 int win2k_install_hack = 0; int rtc_td_hack = 0; +int old_bios_support = 0; #endif int usb_enabled = 0; int singlestep = 0; @@ -5180,6 +5181,9 @@ int main(int argc, char **argv, char **envp) case QEMU_OPTION_no_fd_bootchk: fd_bootchk = 0; break; + case QEMU_OPTION_old_bios: + old_bios_support = 1; + break; #endif case QEMU_OPTION_netdev: if (net_client_parse(&qemu_netdev_opts, optarg) == -1) {