diff options
Diffstat (limited to 'src/kernel/HALKit/ARM64/HalACPIFactoryInterface.cpp')
| -rw-r--r-- | src/kernel/HALKit/ARM64/HalACPIFactoryInterface.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/kernel/HALKit/ARM64/HalACPIFactoryInterface.cpp b/src/kernel/HALKit/ARM64/HalACPIFactoryInterface.cpp new file mode 100644 index 00000000..544d1ee1 --- /dev/null +++ b/src/kernel/HALKit/ARM64/HalACPIFactoryInterface.cpp @@ -0,0 +1,24 @@ +// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (see LICENSE file) +// Official repository: https://github.com/nekernel-org/nekernel + +#include <ArchKit/ArchKit.h> +#include <KernelKit/HeapMgr.h> +#include <NeKit/KString.h> +#include <modules/ACPI/ACPIFactoryInterface.h> +#include <modules/APM/APM.h> + +namespace Kernel { +ACPIFactoryInterface::ACPIFactoryInterface(VoidPtr rsp_ptr) : fRsdp(rsp_ptr), fEntries(0) {} + +BOOL ACPIFactoryInterface::Shutdown() { + apm_send_io_command(kAPMPowerCommandShutdown); + return NO; +} + +/// @brief Reboot machine in either ACPI or by triple faulting. +/// @return nothing it's a reboot. +Void ACPIFactoryInterface::Reboot() { + apm_send_io_command(kAPMPowerCommandReboot); +} +} // namespace Kernel |
