Or another way of putting this...
""Fix" 100% correct reverse engineered NT code and break it so that it matches ReactOS's broken Video Driver Framework behaviour, instead of fixing the latter".
Never gets old~
-- Best regards, Alex Ionescu
On 2011-06-15, at 8:53 AM, rharabien@svn.reactos.org wrote:
Author: rharabien Date: Wed Jun 15 12:53:32 2011 New Revision: 52244
URL: http://svn.reactos.org/svn/reactos?rev=52244&view=rev Log: [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)
Modified: trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/inbv/inbv.c trunk/reactos/ntoskrnl/io/iomgr/iomgr.c
Modified: trunk/reactos/ntoskrnl/ex/init.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=5224... ============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Wed Jun 15 12:53:32 2011 @@ -1313,7 +1313,7 @@ size_t Remaining; PRTL_USER_PROCESS_INFORMATION ProcessInfo; KEY_VALUE_PARTIAL_INFORMATION KeyPartialInfo;
- UNICODE_STRING KeyName, DebugString;
- UNICODE_STRING KeyName; OBJECT_ATTRIBUTES ObjectAttributes; HANDLE KeyHandle, OptionHandle; PRTL_USER_PROCESS_PARAMETERS ProcessParameters = NULL;
@@ -1925,18 +1925,19 @@ /* Update progress bar */ InbvUpdateProgressBar(100);
- /* Allow strings to be displayed */
- InbvEnableDisplayString(TRUE);
- /* Wait 5 seconds for it to initialize */
- /* Disallow strings to be displayed */
- InbvEnableDisplayString(FALSE);
- /* Clean the screen */
- if (InbvBootDriverInstalled) FinalizeBootLogo();
- /* Wait 5 seconds for initial process to initialize */ Timeout.QuadPart = Int32x32To64(5, -10000000); Status = ZwWaitForSingleObject(ProcessInfo->ProcessHandle, FALSE, &Timeout);
- if (InbvBootDriverInstalled) FinalizeBootLogo(); if (Status == STATUS_SUCCESS) { /* Failed, display error */
RtlInitUnicodeString(&DebugString, L"INIT: Session Manager terminated.");ZwDisplayString(&DebugString);
DPRINT1("INIT: Session Manager terminated.\n"); /* Bugcheck the system if SMSS couldn't initialize */ KeBugCheck(SESSION5_INITIALIZATION_FAILED);Modified: trunk/reactos/ntoskrnl/inbv/inbv.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/inbv/inbv.c?rev=52... ============================================================================== --- trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/inbv/inbv.c [iso-8859-1] Wed Jun 15 12:53:32 2011 @@ -10,16 +10,16 @@ KSPIN_LOCK BootDriverLock; KIRQL InbvOldIrql; INBV_DISPLAY_STATE InbvDisplayState; -BOOLEAN InbvBootDriverInstalled; -BOOLEAN InbvDisplayDebugStrings; +BOOLEAN InbvBootDriverInstalled = FALSE; +BOOLEAN InbvDisplayDebugStrings = FALSE; INBV_DISPLAY_STRING_FILTER InbvDisplayFilter; ULONG ProgressBarLeft, ProgressBarTop; -BOOLEAN ShowProgressBar; +BOOLEAN ShowProgressBar = FALSE; INBV_PROGRESS_STATE InbvProgressState; INBV_RESET_DISPLAY_PARAMETERS InbvResetDisplayParameters; ULONG ResourceCount; PUCHAR ResourceList[64]; -BOOLEAN SysThreadCreated; +BOOLEAN SysThreadCreated = FALSE; ROT_BAR_TYPE RotBarSelection; ULONG PltRotBarStatus; BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0};
Modified: trunk/reactos/ntoskrnl/io/iomgr/iomgr.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iomgr.c?r... ============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/iomgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/iomgr.c [iso-8859-1] Wed Jun 15 12:53:32 2011 @@ -480,10 +480,18 @@ KeSetTimerEx(&IopTimer, ExpireTime, 1000, &IopTimerDpc);
/* Create Object Types */
- if (!IopCreateObjectTypes()) return FALSE;
if (!IopCreateObjectTypes())
{
DPRINT1("IopCreateObjectTypes failed!\n");return FALSE;}
/* Create Object Directories */
- if (!IopCreateRootDirectories()) return FALSE;
if (!IopCreateRootDirectories())
{
DPRINT1("IopCreateRootDirectories failed!\n");return FALSE;}
/* Initialize PnP manager */ IopInitializePlugPlayServices();
@@ -511,10 +519,19 @@ IopLoaderBlock = NULL;
/* 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 */
- if (!IopMarkBootPartition(LoaderBlock)) return FALSE;
if (!IopMarkBootPartition(LoaderBlock))
{
DPRINT1("IopMarkBootPartition failed!\n");return FALSE;}
/* Initialize PnP root relations */ IopEnumerateDevice(IopRootDeviceNode->PhysicalDeviceObject);
@@ -539,7 +556,11 @@
/* Convert SystemRoot from ARC to NT path */ 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 */ RootString.MaximumLength = NtSystemRoot.MaximumLength / sizeof(WCHAR);
@@ -550,7 +571,11 @@
/* Convert the path into the ANSI_STRING */ 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 */ IoAssignDriveLetters(LoaderBlock,
@@ -560,10 +585,19 @@
/* Update system root */ 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 */
- if (!NT_SUCCESS(PsLocateSystemDll())) return FALSE;
Status = PsLocateSystemDll();
if (!NT_SUCCESS(Status))
{
DPRINT1("PsLocateSystemDll failed: %lx\n", Status);return FALSE;}
/* Return success */ return TRUE;