Author: sir_richard
Date: Wed Mar 3 06:10:38 2010
New Revision: 45777
URL:
http://svn.reactos.org/svn/reactos?rev=45777&view=rev
Log:
[NTOS]: Do the "funny message" (not really funny, my apologies) shenanigans
after the system components have shutdown, and reset the display and call the HAL at least
at DPC level (should probably do it at HIGH IRQL, really). This way, we can avoid the
context switch to another process while the HAL is executing the BIOS reset display call
(done solely for the benefit of the "funny messages", as the video card driver
usually resets the display) and thus avoid the "invalid V86 opcode" message
sometimes appearing on shutdown. Did you know the "funny messages" take up more
storage space than an average embedded micro-controller OS?
Modified:
trunk/reactos/ntoskrnl/ex/shutdown.c
Modified: trunk/reactos/ntoskrnl/ex/shutdown.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/shutdown.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/shutdown.c [iso-8859-1] Wed Mar 3 06:10:38 2010
@@ -139,6 +139,16 @@
/* Run the thread on the boot processor */
KeSetSystemAffinityThread(1);
+ PspShutdownProcessManager();
+
+ CmShutdownSystem();
+ IoShutdownRegisteredFileSystems();
+ IoShutdownRegisteredDevices();
+
+ ZwQuerySystemTime(&Now);
+
+ KeRaiseIrqlToDpcLevel();
+
if (InbvIsBootDriverInstalled())
{
InbvAcquireDisplayOwnership();
@@ -152,19 +162,12 @@
if (Action == ShutdownNoReboot)
{
- ZwQuerySystemTime(&Now);
Now.u.LowPart = Now.u.LowPart >> 8; /* Seems to give a somewhat better
"random" number */
HalDisplayString(FamousLastWords[Now.u.LowPart %
(sizeof(FamousLastWords) /
sizeof(PCH))]);
}
-
- PspShutdownProcessManager();
-
- CmShutdownSystem();
- IoShutdownRegisteredFileSystems();
- IoShutdownRegisteredDevices();
-
+
if (Action == ShutdownNoReboot)
{
HalDisplayString("\nYou can switch off your computer now\n");