summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/HALKit/ARM64/HalACPIFactoryInterface.cc
blob: ffb097952a07d5af4f428f36e80d9a968dd295fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* -------------------------------------------

  Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.

------------------------------------------- */

#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