// Variable layouts of bios.
//
-// Copyright (C) 2008,2009 Kevin O'Connor <kevin@koconnor.net>
+// Copyright (C) 2008-2010 Kevin O'Connor <kevin@koconnor.net>
//
// This file may be distributed under the terms of the GNU LGPLv3 license.
#ifndef __BIOSVAR_H
u8 other2[0xC4];
// 0x121 - Begin custom storage.
+ u8 bootsplash_active;
u8 ps2ctr;
struct usbkeyinfo usbkey_last;
// Code to load disk image and start system boot.
//
-// Copyright (C) 2008 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.
static void
call_boot_entry(u16 bootseg, u16 bootip, u8 bootdrv)
{
- dprintf(1, "Booting from %04x:%04x\n", bootseg, bootip);
-
/* Go back to text, the OS might expect it... (Can't do this any later) */
disable_bootsplash();
+ dprintf(1, "Booting from %04x:%04x\n", bootseg, bootip);
struct bregs br;
memset(&br, 0, sizeof(br));
br.flags = F_IF;
return;
if (count--)
continue;
+ disable_bootsplash();
cbfs_run_payload(file);
}
}
printf("Booting from %s...\n"
, strtcpy(desc, ie->description, ARRAY_SIZE(desc)));
- switch(ie->type) {
+ switch (ie->type) {
case IPL_TYPE_FLOPPY:
boot_disk(0x00, IPL.checkfloppysig);
break;
#include "config.h" // CONFIG_*
#include "util.h" // dprintf
#include "jpeg.h" // splash
+#include "biosvar.h" // SET_EBDA
/****************************************************************
call16_int10(&br);
// Write to screen.
- printf("Starting SeaBIOS (version %s)\n\n", VERSION);
+ printf("SeaBIOS (version %s)\n\n", VERSION);
}
void enable_vga_console(void)
dprintf(8, "bytes per scanline: %d\n", mode_info->bytes_per_scanline);
dprintf(8, "bits per pixel: %d\n", mode_info->bits_per_pixel);
- /* Look for bootsplash.jpg in CBFS and decompress it... */
+ /* Decompress jpeg */
dprintf(8, "Copying boot splash screen...\n");
cbfs_copyfile(file, jpeg, filesize);
dprintf(8, "Decompressing boot splash screen...\n");
/* Show the picture */
iomemcpy(framebuffer, picture, imagesize);
+ SET_EBDA(bootsplash_active, 1);
cleanup:
free(jpeg);
void
disable_bootsplash(void)
{
- if (! CONFIG_BOOTSPLASH)
+ if (! CONFIG_BOOTSPLASH || !GET_EBDA(bootsplash_active))
return;
+ SET_EBDA(bootsplash_active, 0);
enable_vga_text_console();
}
// 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.
// 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;