Author: sir_richard
Date: Tue Jan 26 20:29:37 2010
New Revision: 45270
URL:
http://svn.reactos.org/svn/reactos?rev=45270&view=rev
Log:
[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!
Modified:
trunk/reactos/ntoskrnl/inbv/inbv.c
Modified: trunk/reactos/ntoskrnl/inbv/inbv.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=4…
==============================================================================
--- trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] Tue Jan 26 20:29:37 2010
@@ -111,7 +111,6 @@
PCHAR CommandLine;
BOOLEAN CustomLogo = FALSE;
ULONG i;
- extern BOOLEAN ExpInTextModeSetup;
/* Quit if we're already installed */
if (InbvBootDriverInstalled) return TRUE;
@@ -125,13 +124,13 @@
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++)