blob: 69459f66ea420fdb45849234e7018f5407187e65 (
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
27
28
29
30
31
|
/* -------------------------------------------
Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.
------------------------------------------- */
#include <Mod/ACPI/ACPIFactoryInterface.h>
#include <NewKit/KString.h>
#include <ArchKit/ArchKit.h>
#include <KernelKit/Heap.h>
#include <Mod/APM/APM.h>
namespace Kernel
{
ACPIFactoryInterface::ACPIFactoryInterface(VoidPtr rsp_ptr)
: fRsdp(rsp_ptr), fEntries(0)
{
}
Void ACPIFactoryInterface::Shutdown()
{
apm_send_io_command(kAPMPowerCommandShutdown, 0);
}
/// @brief Reboot machine in either ACPI or by triple faulting.
/// @return nothing it's a reboot.
Void ACPIFactoryInterface::Reboot()
{
apm_send_io_command(kAPMPowerCommandReboot, 0);
}
} // namespace Kernel
|