[NTOSKRNL]

- Disable displaying string by bootvid after successful kernel phase 1 initialization, so there won't be graphical glitches at the top of screen if system has screen debugging enabled
- Make screen black right after phase 1 initialization finish instead of waiting 5 seconds. It removes black rectangle which appeared for me in explorer.
- Initialize some global variables in inbv.c (it was done by compiler before)

svn path=/trunk/; revision=52244
This commit is contained in:
Rafal Harabien 2011-06-15 12:53:32 +00:00
parent 6fc52906e5
commit b0571d1c2e
3 changed files with 54 additions and 19 deletions

View file

@ -1313,7 +1313,7 @@ Phase1InitializationDiscard(IN PVOID Context)
size_t Remaining; size_t Remaining;
PRTL_USER_PROCESS_INFORMATION ProcessInfo; PRTL_USER_PROCESS_INFORMATION ProcessInfo;
KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo; KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo;
UNICODE_STRING KeyName, DebugString; UNICODE_STRING KeyName;
OBJECT_ATTRIBUTES ObjectAttributes; OBJECT_ATTRIBUTES ObjectAttributes;
HANDLE KeyHandle, OptionHandle; HANDLE KeyHandle, OptionHandle;
PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL; PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL;
@ -1925,18 +1925,19 @@ Phase1InitializationDiscard(IN PVOID Context)
/* Update progress bar */ /* Update progress bar */
InbvUpdateProgressBar(100); InbvUpdateProgressBar(100);
/* Allow strings to be displayed */ /* Disallow strings to be displayed */
InbvEnableDisplayString(TRUE); InbvEnableDisplayString(FALSE);
/* Wait 5 seconds for it to initialize */ /* Clean the screen */
if (InbvBootDriverInstalled) FinalizeBootLogo();
/* Wait 5 seconds for initial process to initialize */
Timeout.QuadPart = Int32x32To64(5, -10000000); Timeout.QuadPart = Int32x32To64(5, -10000000);
Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout); Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout);
if (InbvBootDriverInstalled) FinalizeBootLogo();
if (Status == STATUS_SUCCESS) if (Status == STATUS_SUCCESS)
{ {
/* Failed, display error */ /* Failed, display error */
RtlInitUnicodeString(&DebugString, L"INIT: Session Manager terminated."); DPRINT1("INIT: Session Manager terminated.\n");
ZwDisplayString(&DebugString);
/* Bugcheck the system if SMSS couldn't initialize */ /* Bugcheck the system if SMSS couldn't initialize */
KeBugCheck(SESSION5_INITIALIZATION_FAILED); KeBugCheck(SESSION5_INITIALIZATION_FAILED);

View file

@ -10,16 +10,16 @@
KSPIN_LOCK BootDriverLock; KSPIN_LOCK BootDriverLock;
KIRQL InbvOldIrql; KIRQL InbvOldIrql;
INBV_DISPLAY_STATE InbvDisplayState; INBV_DISPLAY_STATE InbvDisplayState;
BOOLEAN InbvBootDriverInstalled; BOOLEAN InbvBootDriverInstalled = FALSE;
BOOLEAN InbvDisplayDebugStrings; BOOLEAN InbvDisplayDebugStrings = FALSE;
INBV_DISPLAY_STRING_FILTER InbvDisplayFilter; INBV_DISPLAY_STRING_FILTER InbvDisplayFilter;
ULONG ProgressBarLeft, ProgressBarTop; ULONG ProgressBarLeft, ProgressBarTop;
BOOLEAN ShowProgressBar; BOOLEAN ShowProgressBar = FALSE;
INBV_PROGRESS_STATE InbvProgressState; INBV_PROGRESS_STATE InbvProgressState;
INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters; INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters;
ULONG ResourceCount; ULONG ResourceCount;
PUCHAR ResourceList[64]; PUCHAR ResourceList[64];
BOOLEAN SysThreadCreated; BOOLEAN SysThreadCreated = FALSE;
ROT_BAR_TYPE RotBarSelection; ROT_BAR_TYPE RotBarSelection;
ULONG PltRotBarStatus; ULONG PltRotBarStatus;
BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0}; BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0};

View file

@ -480,10 +480,18 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc); KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc);
/* Create Object Types */ /* Create Object Types */
if (!IopCreateObjectTypes()) return FALSE; if (!IopCreateObjectTypes())
{
DPRINT1("IopCreateObjectTypes failed!\n");
return FALSE;
}
/* Create Object Directories */ /* Create Object Directories */
if (!IopCreateRootDirectories()) return FALSE; if (!IopCreateRootDirectories())
{
DPRINT1("IopCreateRootDirectories failed!\n");
return FALSE;
}
/* Initialize PnP manager */ /* Initialize PnP manager */
IopInitializePlugPlayServices(); IopInitializePlugPlayServices();
@ -511,10 +519,19 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
IopLoaderBlock = NULL; IopLoaderBlock = NULL;
/* Create ARC names for boot devices */ /* Create ARC names for boot devices */
if (!NT_SUCCESS(IopCreateArcNames(LoaderBlock))) return FALSE; Status = IopCreateArcNames(LoaderBlock);
if (!NT_SUCCESS(Status))
{
DPRINT1("IopCreateArcNames failed: %lx\n", Status);
return FALSE;
}
/* Mark the system boot partition */ /* Mark the system boot partition */
if (!IopMarkBootPartition(LoaderBlock)) return FALSE; if (!IopMarkBootPartition(LoaderBlock))
{
DPRINT1("IopMarkBootPartition failed!\n");
return FALSE;
}
/* Initialize PnP root relations */ /* Initialize PnP root relations */
IopEnumerateDevice(IopRootDeviceNode->PhysicalDeviceObject); IopEnumerateDevice(IopRootDeviceNode->PhysicalDeviceObject);
@ -539,7 +556,11 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Convert SystemRoot from ARC to NT path */ /* Convert SystemRoot from ARC to NT path */
Status = IopReassignSystemRoot(LoaderBlock, &NtBootPath); Status = IopReassignSystemRoot(LoaderBlock, &NtBootPath);
if (!NT_SUCCESS(Status)) return FALSE; if (!NT_SUCCESS(Status))
{
DPRINT1("IopReassignSystemRoot failed: %lx\n", Status);
return FALSE;
}
/* Set the ANSI_STRING for the root path */ /* Set the ANSI_STRING for the root path */
RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR); RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR);
@ -550,7 +571,11 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Convert the path into the ANSI_STRING */ /* Convert the path into the ANSI_STRING */
Status = RtlUnicodeStringToAnsiString(&RootString, &NtSystemRoot, FALSE); Status = RtlUnicodeStringToAnsiString(&RootString, &NtSystemRoot, FALSE);
if (!NT_SUCCESS(Status)) return FALSE; if (!NT_SUCCESS(Status))
{
DPRINT1("RtlUnicodeStringToAnsiString failed: %lx\n", Status);
return FALSE;
}
/* Assign drive letters */ /* Assign drive letters */
IoAssignDriveLetters(LoaderBlock, IoAssignDriveLetters(LoaderBlock,
@ -560,10 +585,19 @@ IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
/* Update system root */ /* Update system root */
Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &RootString, FALSE); Status = RtlAnsiStringToUnicodeString(&NtSystemRoot, &RootString, FALSE);
if (!NT_SUCCESS(Status)) return FALSE; if (!NT_SUCCESS(Status))
{
DPRINT1("RtlAnsiStringToUnicodeString failed: %lx\n", Status);
return FALSE;
}
/* Load the System DLL and its Entrypoints */ /* Load the System DLL and its Entrypoints */
if (!NT_SUCCESS(PsLocateSystemDll())) return FALSE; Status = PsLocateSystemDll();
if (!NT_SUCCESS(Status))
{
DPRINT1("PsLocateSystemDll failed: %lx\n", Status);
return FALSE;
}
/* Return success */ /* Return success */
return TRUE; return TRUE;