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;
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
What's wrong? How you want to display strings by bootvid driver which uses VGA, when another 3rd party driver can be loaded? It doesn't make sense. I don't reverse NT kernel but disabling bootvid functionality when we switch to normal graphics mode make sense for me...
Best regards, Rafal Harabien
How do you expect to see autochk's boot strings if you disabled DisplayString before launching smss?
The correct order is this:
1) Enable Inbv + Disable Strings 2) re-enable strings if SOS is on 3) Create smss 4) Finalize boot logo 5) Set progressbar to 100% 6) Enable display strings 7) Wait 5 seconds for smss
Also all those DPRINT1s should be KeBugChecks with things like SESSIONX_INITIALIZATION_FAILED, IOX_INITIALIZATION_FAILED, etc....
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:12 AM, Rafał H wrote:
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
What's wrong? How you want to display strings by bootvid driver which uses VGA, when another 3rd party driver can be loaded? It doesn't make sense. I don't reverse NT kernel but disabling bootvid functionality when we switch to normal graphics mode make sense for me...
Best regards, Rafal Harabien
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
You are right. I forgot about boot applications. Where disabling display string should be then? Is SmLoadSubsystems good place for it?
Best regards, Rafał Harabień
How do you expect to see autochk's boot strings if you disabled DisplayString before launching smss?
The correct order is this:
- Enable Inbv + Disable Strings
- re-enable strings if SOS is on
- Create smss
- Finalize boot logo
- Set progressbar to 100%
- Enable display strings
- Wait 5 seconds for smss
Also all those DPRINT1s should be KeBugChecks with things like SESSIONX_INITIALIZATION_FAILED, IOX_INITIALIZATION_FAILED, etc....
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:12 AM, Rafał H wrote:
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
What's wrong? How you want to display strings by bootvid driver which uses VGA, when another 3rd party driver can be loaded? It doesn't make sense. I don't reverse NT kernel but disabling bootvid functionality when we switch to normal graphics mode make sense for me...
Best regards, Rafal Harabien
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
It's an internal kernel call, so SMSS can't call it.
But you can leave display string enabled -- it doesn't affect anything.
In fact, if you NtDisplayString something in Windows, and then later unload the video driver (restoring the VGA context), you'll see the string.
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:50 AM, Rafał H wrote:
You are right. I forgot about boot applications. Where disabling display string should be then? Is SmLoadSubsystems good place for it?
Best regards, Rafał Harabień
How do you expect to see autochk's boot strings if you disabled DisplayString before launching smss?
The correct order is this:
- Enable Inbv + Disable Strings
- re-enable strings if SOS is on
- Create smss
- Finalize boot logo
- Set progressbar to 100%
- Enable display strings
- Wait 5 seconds for smss
Also all those DPRINT1s should be KeBugChecks with things like SESSIONX_INITIALIZATION_FAILED, IOX_INITIALIZATION_FAILED, etc....
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:12 AM, Rafał H wrote:
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
What's wrong? How you want to display strings by bootvid driver which uses VGA, when another 3rd party driver can be loaded? It doesn't make sense. I don't reverse NT kernel but disabling bootvid functionality when we switch to normal graphics mode make sense for me...
Best regards, Rafal Harabien
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
To clarify, InbvDisplayString only prints something if the display ownership is owned by INBV.
So it doesn't hurt to leave the enable state to true.
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:50 AM, Rafał H wrote:
You are right. I forgot about boot applications. Where disabling display string should be then? Is SmLoadSubsystems good place for it?
Best regards, Rafał Harabień
How do you expect to see autochk's boot strings if you disabled DisplayString before launching smss?
The correct order is this:
- Enable Inbv + Disable Strings
- re-enable strings if SOS is on
- Create smss
- Finalize boot logo
- Set progressbar to 100%
- Enable display strings
- Wait 5 seconds for smss
Also all those DPRINT1s should be KeBugChecks with things like SESSIONX_INITIALIZATION_FAILED, IOX_INITIALIZATION_FAILED, etc....
-- Best regards, Alex Ionescu
On 2011-06-15, at 9:12 AM, Rafał H wrote:
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
What's wrong? How you want to display strings by bootvid driver which uses VGA, when another 3rd party driver can be loaded? It doesn't make sense. I don't reverse NT kernel but disabling bootvid functionality when we switch to normal graphics mode make sense for me...
Best regards, Rafal Harabien
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev
Ros-dev mailing list Ros-dev@reactos.org http://www.reactos.org/mailman/listinfo/ros-dev