Skip to content

Commit 921cfd8

Browse files
committed
[NTOS:PO] WIP
1 parent 4d9f67c commit 921cfd8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+10836
-2299
lines changed

boot/bootdata/livecd.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Options=/FASTDETECT /MININT
2323
[LiveCD_Debug]
2424
BootType=Windows2003
2525
SystemPath=\reactos
26-
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT
26+
Options=/HAL=HALACPI.DLL /DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT
2727

2828
[LiveCD_Macpi]
2929
BootType=Windows2003

boot/freeldr/freeldr/bootmgr.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ VOID RunLoader(VOID)
452452
goto Reboot;
453453
}
454454

455+
/* Display the "Red Screen of Hell" if ROS previously shutdown due to thermal event */
456+
//TuiDisplayThermalScreen();
457+
455458
/* Load the chosen operating system */
456459
LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]);
457460

boot/freeldr/freeldr/include/ui/tui.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ UCHAR TuiTextToFillStyle(PCSTR FillStyleText); // Converts the
129129

130130
VOID TuiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
131131
VOID TuiFadeOut(VOID); // Fades the screen out
132+
VOID TuiDisplayThermalScreen(VOID); // Display the Red Screen of Hell informing the user of a thermal condition
132133

133134
/* Menu Functions ************************************************************/
134135

boot/freeldr/freeldr/ui/tui.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,26 @@ VOID TuiFadeOut(VOID)
10351035

10361036
}
10371037

1038+
VOID TuiDisplayThermalScreen(VOID)
1039+
{
1040+
MachVideoHideShowTextCursor(FALSE);
1041+
MachVideoClearScreen(ATTR(COLOR_WHITE, COLOR_RED));
1042+
1043+
TuiPrintf("\nOn previous session, ReactOS has shutdown due to a thermal condition\n"
1044+
"that would have otherwise caused fatal damage to the system.\n\n"
1045+
"It's extremely advised to check that your system has proper cooling\n"
1046+
"and that nothing blocks the airflow of your system (dust, debris, etc).\n\n"
1047+
"Replace the thermal paste if necessary. Avoid skin contact with the hot\n"
1048+
"system at all costs (if it's a laptop).\n\n"
1049+
"Press ENTER to continue.");
1050+
1051+
/* Have this dummy loop to act like the system was waiting on something */
1052+
for (;;)
1053+
{
1054+
1055+
}
1056+
}
1057+
10381058
BOOLEAN TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
10391059
{
10401060
CHAR key;

ntoskrnl/config/cmdata.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
540540
&ObpUnsecureGlobalNamesLength,
541541
NULL
542542
},
543+
{
544+
L"Session Manager\\Kernel",
545+
L"PoCleanShutdownFlags",
546+
&PopShutdownCleanly,
547+
NULL,
548+
NULL
549+
},
543550
{
544551
L"Session Manager\\I/O System",
545552
L"CountOperations",
@@ -603,6 +610,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
603610
NULL,
604611
NULL
605612
},
613+
{
614+
L"Session Manager",
615+
L"PowerPolicySimulate",
616+
&PopSimulate,
617+
NULL,
618+
NULL
619+
},
606620
{
607621
L"ProductOptions",
608622
L"ProductType",

ntoskrnl/include/internal/pep.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* PROJECT: ReactOS Kernel
3+
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4+
* PURPOSE: Internal header for the Power Manager Platform Extension Plug-ins (PEPs)
5+
* COPYRIGHT: Copyright 2023 George Bișoc <[email protected]>
6+
*/
7+
8+
//
9+
// Platform Extension Plugin (PEP) handle
10+
//
11+
typedef struct _PEPHANDLE__
12+
{
13+
LONG unused;
14+
} PEPHANDLE__, *PPEPHANDLE__;
15+
16+
//
17+
// PEP crash dump information
18+
//
19+
typedef struct _PEP_CRASHDUMP_INFORMATION
20+
{
21+
PPEPHANDLE__ DeviceHandle;
22+
PVOID DeviceContext;
23+
} PEP_CRASHDUMP_INFORMATION, *PPEP_CRASHDUMP_INFORMATION;
24+
25+
/* EOF */

0 commit comments

Comments
 (0)