qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Roy Tam <roytam@gmail.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?)
Date: Wed, 10 Mar 2010 12:48:39 +0800	[thread overview]
Message-ID: <473191351003092048y2e225538p30e152a248d2bf43@mail.gmail.com> (raw)
In-Reply-To: <473191351003080548h72dbfbdaje5e10f7aa7bdf08b@mail.gmail.com>

2010/3/8 Roy Tam <roytam@gmail.com>:
> 2010/3/8 Roy Tam <roytam@gmail.com>:
>> 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) {

  reply	other threads:[~2010-03-10  4:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-08  2:04 [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Roy Tam
2010-03-08 10:05 ` Jamie Lokier
2010-03-08 11:08   ` Roy Tam
2010-03-08 13:48     ` Roy Tam
2010-03-10  4:48       ` Roy Tam [this message]
2010-03-09 15:41 ` Natalia Portillo
2010-03-09 16:09   ` Natalia Portillo
2010-03-10  2:12 ` Kevin O'Connor
2010-03-10  3:49   ` Roy Tam
2010-03-10  4:59     ` Kevin O'Connor
2010-03-10  5:05       ` Roy Tam
2010-03-10  5:55         ` Kevin O'Connor
2010-03-10  5:24       ` Roy Tam
2010-03-11  3:07         ` Kevin O'Connor
2010-03-11  7:42           ` Roy Tam
2010-03-11  8:10             ` Natalia Portillo
2010-03-12  0:57             ` Kevin O'Connor
2010-03-12  1:17               ` Roy Tam
2010-03-12 16:13               ` Roy Tam
2010-03-13 15:35                 ` Kevin O'Connor
2010-03-13 16:00                   ` Roy Tam
2010-03-12 23:24               ` [Qemu-devel] PC keyboard emulation (was: Regression: more 0.12 regression (SeaBIOS related?)) Jamie Lokier
2010-03-14  0:44                 ` [Qemu-devel] " Kevin O'Connor
2010-03-15  2:47                   ` Jamie Lokier
2010-03-15  3:08                     ` Kevin O'Connor
     [not found] <998502.27470.qm@web15103.mail.cnb.yahoo.com>
     [not found] ` <473191351003071956g48c3944fyd3adc3ae6012493c@mail.gmail.com>
2010-03-08  3:57   ` [Qemu-devel] Regression: more 0.12 regression (SeaBIOS related?) Roy Tam
  -- strict thread matches above, loose matches on Subject: below --
2012-03-06 17:00 Alain Ribière
2012-03-07 13:38 ` Kevin O'Connor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=473191351003092048y2e225538p30e152a248d2bf43@mail.gmail.com \
    --to=roytam@gmail.com \
    --cc=jamie@shareable.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).