feat: expanded ACPI support, initial support for S3 sleep

This commit is contained in:
2026-03-15 00:55:19 +01:00
parent 261b536041
commit 64c26f4288
39 changed files with 4403 additions and 59 deletions
+9 -1
View File
@@ -1,6 +1,6 @@
/*
* Power.hpp
* SYS_RESET, SYS_SHUTDOWN syscalls
* SYS_RESET, SYS_SHUTDOWN, SYS_SUSPEND syscalls
* Copyright (c) 2026 Daniel Hammer
*/
@@ -9,6 +9,7 @@
#include <Efi/UEFI.hpp>
#include <Memory/Paging.hpp>
#include <ACPI/AcpiShutdown.hpp>
#include <ACPI/AcpiSleep.hpp>
namespace Montauk {
@@ -41,4 +42,11 @@ namespace Montauk {
asm volatile("cli; hlt");
__builtin_unreachable();
}
static int64_t Sys_Suspend() {
if (!Hal::AcpiSleep::IsS3Available()) {
return -1; // S3 not supported
}
return (int64_t)Hal::AcpiSleep::Suspend();
}
};