Skip to content

Commit

Permalink
[NTOS:PO] WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoB99 authored and DarkFire01 committed Nov 12, 2024
1 parent ec148dc commit 84fa53c
Show file tree
Hide file tree
Showing 75 changed files with 10,670 additions and 2,299 deletions.
2 changes: 1 addition & 1 deletion boot/bootdata/livecd.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Options=/FASTDETECT /MININT
[LiveCD_Debug]
BootType=Windows2003
SystemPath=\reactos
Options=/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT
Options=/HAL=HALACPI.DLL /DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200 /SOS /FASTDETECT /MININT

[LiveCD_Macpi]
BootType=Windows2003
Expand Down
3 changes: 3 additions & 0 deletions boot/freeldr/freeldr/bootmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ VOID RunLoader(VOID)
goto Reboot;
}

/* Display the "Red Screen of Hell" if ROS previously shutdown due to thermal event */
//TuiDisplayThermalScreen();

/* Load the chosen operating system */
LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]);

Expand Down
1 change: 1 addition & 0 deletions boot/freeldr/freeldr/include/ui/tui.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ UCHAR TuiTextToFillStyle(PCSTR FillStyleText); // Converts the

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

/* Menu Functions ************************************************************/

Expand Down
20 changes: 20 additions & 0 deletions boot/freeldr/freeldr/ui/tui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,26 @@ VOID TuiFadeOut(VOID)

}

VOID TuiDisplayThermalScreen(VOID)
{
MachVideoHideShowTextCursor(FALSE);
MachVideoClearScreen(ATTR(COLOR_WHITE, COLOR_RED));

TuiPrintf("\nOn previous session, ReactOS has shutdown due to a thermal condition\n"
"that would have otherwise caused fatal damage to the system.\n\n"
"It's extremely advised to check that your system has proper cooling\n"
"and that nothing blocks the airflow of your system (dust, debris, etc).\n\n"
"Replace the thermal paste if necessary. Avoid skin contact with the hot\n"
"system at all costs (if it's a laptop).\n\n"
"Press ENTER to continue.");

/* Have this dummy loop to act like the system was waiting on something */
for (;;)
{

}
}

BOOLEAN TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length)
{
CHAR key;
Expand Down
14 changes: 14 additions & 0 deletions ntoskrnl/config/cmdata.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
&ObpUnsecureGlobalNamesLength,
NULL
},
{
L"Session Manager\\Kernel",
L"PoCleanShutdownFlags",
&PopShutdownCleanly,
NULL,
NULL
},
{
L"Session Manager\\I/O System",
L"CountOperations",
Expand Down Expand Up @@ -603,6 +610,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
NULL,
NULL
},
{
L"Session Manager",
L"PowerPolicySimulate",
&PopSimulate,
NULL,
NULL
},
{
L"ProductOptions",
L"ProductType",
Expand Down
25 changes: 25 additions & 0 deletions ntoskrnl/include/internal/pep.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* PROJECT: ReactOS Kernel
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
* PURPOSE: Internal header for the Power Manager Platform Extension Plug-ins (PEPs)
* COPYRIGHT: Copyright 2023 George Bișoc <[email protected]>
*/

//
// Platform Extension Plugin (PEP) handle
//
typedef struct _PEPHANDLE__
{
LONG unused;
} PEPHANDLE__, *PPEPHANDLE__;

//
// PEP crash dump information
//
typedef struct _PEP_CRASHDUMP_INFORMATION
{
PPEPHANDLE__ DeviceHandle;
PVOID DeviceContext;
} PEP_CRASHDUMP_INFORMATION, *PPEP_CRASHDUMP_INFORMATION;

/* EOF */
Loading

0 comments on commit 84fa53c

Please sign in to comment.