Be sure to disable bootsplash on all BIOS boot cases.
[seabios.git] / src / post.c
index 638b0f72cb805048bdb33b15507bb7d0deaa39e6..0cb9e575877aedb455b5f52607b2f738a8d0ba4f 100644 (file)
@@ -1,6 +1,6 @@
 // 32bit code to Power On Self Test (POST) a machine.
 //
-// Copyright (C) 2008,2009  Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2008-2010  Kevin O'Connor <kevin@koconnor.net>
 // Copyright (C) 2002  MandrakeSoft S.A.
 //
 // This file may be distributed under the terms of the GNU LGPLv3 license.
@@ -23,6 +23,7 @@
 #include "smbios.h" // smbios_init
 #include "paravirt.h" // qemu_cfg_port_probe
 #include "ps2port.h" // ps2port_setup
+#include "virtio-blk.h" // virtio_blk_setup
 
 void
 __set_irq(int vector, void *loc)
@@ -184,6 +185,7 @@ init_hw(void)
     floppy_setup();
     ata_setup();
     ramdisk_setup();
+    virtio_blk_setup();
 }
 
 // Main setup code.
@@ -215,7 +217,6 @@ post(void)
     // Initialize internal tables
     boot_setup();
     drive_setup();
-    cdemu_setup();
 
     // Start hardware initialization (if optionrom threading)
     if (CONFIG_THREADS && CONFIG_THREAD_OPTIONROMS)
@@ -248,6 +249,7 @@ post(void)
     boot_prep();
 
     // Finalize data structures before boot
+    cdemu_setup();
     pmm_finalize();
     malloc_finalize();
     memmap_finalize();
@@ -274,6 +276,12 @@ _start(void)
     // Write protect bios memory.
     make_bios_readonly();
 
+    // Disable bootsplash if something has hooked int19.
+    extern void entry_19_official(void);
+    if (GET_IVT(0x19).segoff
+        != SEGOFF(SEG_BIOS, (u32)entry_19_official - BUILD_BIOS_ADDR).segoff)
+        disable_bootsplash();
+
     // Invoke int 19 to start boot process.
     dprintf(3, "Jump to int19\n");
     struct bregs br;