[PERF]: After spending the better part of the last two days rewriting the HAL V8086 code (used for BIOS Display Reset) in C, it dawned upon me that it shouldn't even be used during bootup in the first place! The boot loader, running in real-mode, already sets video mode 12 when starting ReactOS. We then repeat the operation, but since we're in protected mode, we have to emulate the whole sheebang with V8086 mode. We now initialize bootvid without requesting a mode switch (which was broken up until a commit ago). This gives us a dirty palette and VGA state. We then call VidResetDisplay to clean up the palette and setup the VGA registers correctly, but we only reset the screen if a custom /BOOTLOGO command is used (which isn't supported yet). We therefore don't need to enter V8086 mode at all up until the switch to graphics mode from the video card driver. Note that Windows doesn't do this (Win7 might due to the new Boot Graphics Library), so we're actually booting faster!

svn path=/trunk/; revision=45270
This commit is contained in:
Sir Richard 2010-01-26 19:29:37 +00:00
parent 590b4a4093
commit dd14b916ff

View file

@ -111,7 +111,6 @@ InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
PCHAR CommandLine;
BOOLEAN CustomLogo = FALSE;
ULONG i;
extern BOOLEAN ExpInTextModeSetup;
/* Quit if we're already installed */
if (InbvBootDriverInstalled) return TRUE;
@ -125,13 +124,13 @@ InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
CustomLogo = strstr(CommandLine, "BOOTLOGO") ? TRUE: FALSE;
}
/* For SetupLDR, don't reset the BIOS Display -- FIXME! */
if (ExpInTextModeSetup) CustomLogo = TRUE;
/* Initialize the video */
InbvBootDriverInstalled = VidInitialize(!CustomLogo);
InbvBootDriverInstalled = VidInitialize(FALSE);
if (InbvBootDriverInstalled)
{
/* Now reset the display, but only if there's a custom boot logo */
VidResetDisplay(CustomLogo);
/* Find bitmap resources in the kernel */
ResourceCount = Count;
for (i = 0; i < Count; i++)