]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/pc.c
Use OpenBIOS for g3bw machine
[mirror_qemu.git] / hw / pc.c
diff --git a/hw/pc.c b/hw/pc.c
index 73dd8bcc4a76f360c0ee560d6cb89c9f54b1da0f..64c08a434275728f0e2910857d1dc55ae8b304d8 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -35,6 +35,7 @@
 #include "fw_cfg.h"
 #include "virtio-blk.h"
 #include "virtio-balloon.h"
+#include "hpet_emul.h"
 
 /* output Bochs bios info messages */
 //#define DEBUG_BIOS
@@ -977,6 +978,9 @@ static void pc_init1(ram_addr_t ram_size, int vga_ram_size,
     }
     pit = pit_init(0x40, i8259[0]);
     pcspk_init(pit);
+    if (!no_hpet) {
+        hpet_init(i8259);
+    }
     if (pci_enabled) {
         pic_set_alt_irq_func(isa_pic, ioapic_set_irq, ioapic);
     }
@@ -1135,6 +1139,14 @@ static void pc_init_isa(ram_addr_t ram_size, int vga_ram_size,
              initrd_filename, 0, cpu_model);
 }
 
+/* set CMOS shutdown status register (index 0xF) as S3_resume(0xFE)
+   BIOS will read it and start S3 resume at POST Entry */
+void cmos_set_s3_resume(void)
+{
+    if (rtc_state)
+        rtc_set_memory(rtc_state, 0xF, 0xFE);
+}
+
 QEMUMachine pc_machine = {
     .name = "pc",
     .desc = "Standard PC",