Revamped kernel panic functions with significant improvements

This commit is contained in:
EnderIce2
2024-02-28 06:31:02 +02:00
parent ddad5ca38a
commit 5fd8d3b3a5
23 changed files with 2057 additions and 3573 deletions

View File

@ -38,6 +38,8 @@
#define ACPI_PCIE_WAKE 0x4000
#define ACPI_WAKE 0x8000
extern std::atomic<bool> ExceptionLock;
namespace ACPI
{
__always_inline inline bool IsCanonical(uint64_t Address)
@ -104,6 +106,12 @@ namespace ACPI
}
else if (Event & ACPI_POWER_BUTTON)
{
if (ExceptionLock.load())
{
this->Shutdown();
CPU::Stop();
}
Tasking::PCB *pcb = thisProcess;
if (pcb && !pcb->GetContext()->IsPanic())
{