[NTOSKRNL]

- Display boot blue bitmap when native application or kernel calls NtDisplayString with string displaying enabled
- Fix drawing order in Phase1InitializationDiscard

svn path=/trunk/; revision=52404
This commit is contained in:
Rafal Harabien 2011-06-21 15:53:02 +00:00
parent 261c786603
commit d5e9cb0dd8
3 changed files with 35 additions and 17 deletions

View file

@ -1904,33 +1904,30 @@ Phase1InitializationDiscard(IN PVOID Context)
/* Initialize Power Subsystem in Phase 1*/
if (!PoInitSystem(1)) KeBugCheck(INTERNAL_POWER_ERROR);
/* Update progress bar */
InbvUpdateProgressBar(90);
/* Initialize the Process Manager at Phase 1 */
if (!PsInitSystem(LoaderBlock)) KeBugCheck(PROCESS1_INITIALIZATION_FAILED);
/* Update progress bar */
InbvUpdateProgressBar(85);
/* Make sure nobody touches the loader block again */
if (LoaderBlock == KeLoaderBlock) KeLoaderBlock = NULL;
LoaderBlock = Context = NULL;
/* Update progress bar */
InbvUpdateProgressBar(90);
InbvUpdateProgressBar(100);
/* Clean the screen */
if (InbvBootDriverInstalled) FinalizeBootLogo();
/* Allow strings to be displayed */
InbvEnableDisplayString(TRUE);
/* Launch initial process */
DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed);
ProcessInfo = &InitBuffer->ProcessInfo;
ExpLoadInitialProcess(InitBuffer, &ProcessParameters, &Environment);
/* Clean the screen */
if (InbvBootDriverInstalled) FinalizeBootLogo();
/* Update progress bar */
InbvUpdateProgressBar(100);
/* Allow strings to be displayed */
InbvEnableDisplayString(TRUE);
/* Wait 5 seconds for initial process to initialize */
Timeout.QuadPart = Int32x32To64(5, -10000000);
Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout);

View file

@ -576,7 +576,7 @@ NtDisplayString(IN PUNICODE_STRING DisplayString)
VOID
NTAPI
INIT_FUNCTION
DisplayBootBitmap(IN BOOLEAN SosMode)
DisplayBootBitmap(IN BOOLEAN TextMode)
{
PVOID Header, Band, Text, Screen;
ROT_BAR_TYPE TempRotBarSelection = RB_UNSPECIFIED;
@ -591,9 +591,9 @@ DisplayBootBitmap(IN BOOLEAN SosMode)
InbvReleaseLock();
}
/* Check if this is SOS mode */
/* Check if this is text mode */
ShowProgressBar = FALSE;
if (SosMode)
if (TextMode)
{
/* Check if this is a server OS */
if (SharedUserData->NtProductType == NtProductWinNt)
@ -696,6 +696,9 @@ DisplayBootBitmap(IN BOOLEAN SosMode)
/* Draw the progress bar bit */
// if (Bar) InbvBitBlt(Bar, 0, 0);
/* Set filter which will draw text display if needed */
InbvInstallDisplayStringFilter(DisplayFilter);
}
/* Do we have a system thread? */
@ -709,6 +712,18 @@ DisplayBootBitmap(IN BOOLEAN SosMode)
}
}
VOID
NTAPI
INIT_FUNCTION
DisplayFilter(PCHAR *String)
{
/* Remove the filter */
InbvInstallDisplayStringFilter(NULL);
/* Draw text screen */
DisplayBootBitmap(TRUE);
}
VOID
NTAPI
INIT_FUNCTION

View file

@ -42,7 +42,13 @@ InbvEnableBootDriver(
VOID
NTAPI
DisplayBootBitmap(
IN BOOLEAN SosMode
IN BOOLEAN TextMode
);
VOID
NTAPI
DisplayFilter(
IN PCHAR *String
);
VOID