Be sure to disable bootsplash on all BIOS boot cases.
[seabios.git] / src / post.c
index 25535e21f2949c046e2217104bdc4420f406e167..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.
@@ -217,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)
@@ -250,6 +249,7 @@ post(void)
     boot_prep();
 
     // Finalize data structures before boot
+    cdemu_setup();
     pmm_finalize();
     malloc_finalize();
     memmap_finalize();
@@ -276,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;