summaryrefslogtreecommitdiffhomepage
path: root/Kernel/Sources
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-26 19:40:07 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-26 19:40:07 +0200
commitf5f363d2a2b973380b5b95aacb2f4b7f550c3ef1 (patch)
tree32d050fe2e7f064022609540badc32b5b483eee7 /Kernel/Sources
parent8ba173ca8f2b6acc2868fc1066e3783ac8b52174 (diff)
[WIP] Recover method before shutting down.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel/Sources')
-rw-r--r--Kernel/Sources/KernelCheck.cxx13
1 files changed, 11 insertions, 2 deletions
diff --git a/Kernel/Sources/KernelCheck.cxx b/Kernel/Sources/KernelCheck.cxx
index cb7643f4..be2150ae 100644
--- a/Kernel/Sources/KernelCheck.cxx
+++ b/Kernel/Sources/KernelCheck.cxx
@@ -8,10 +8,12 @@
#include <KernelKit/DebugOutput.hpp>
#include <NewKit/KernelCheck.hpp>
#include <NewKit/String.hpp>
+#include <FirmwareKit/Handover.hxx>
+#include <Modules/ACPI/ACPIFactoryInterface.hxx>
EXTERN_C [[noreturn]] void ke_wait_for_debugger()
{
- while (true)
+ while (Yes)
{
#ifdef __NEWOS_AMD64__
Kernel::HAL::rt_cli();
@@ -88,12 +90,19 @@ namespace Kernel
}
};
- DumpManager::Dump();
+ RecoveryFactory::Recover();
#ifdef __DEBUG__
ke_wait_for_debugger();
#endif // ifdef __DEBUG__
}
+
+ Void RecoveryFactory::Recover() noexcept
+ {
+ PowerFactoryInterface powerInterface(kHandoverHeader->f_HardwareTables.f_VendorPtr);
+ powerInterface.Shutdown();
+ }
+
void ke_runtime_check(bool expr, const char* file, const char* line)
{