mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Implemented shutdown & reboot
This commit is contained in:
parent
19e810653a
commit
ab1972627e
@ -9,13 +9,8 @@
|
||||
|
||||
namespace Power
|
||||
{
|
||||
void Power::Reboot()
|
||||
{
|
||||
}
|
||||
|
||||
void Power::Shutdown()
|
||||
{
|
||||
}
|
||||
void Power::Reboot() { ((ACPI::DSDT *)this->dsdt)->Reboot(); }
|
||||
void Power::Shutdown() { ((ACPI::DSDT *)this->dsdt)->Shutdown(); }
|
||||
|
||||
Power::Power()
|
||||
{
|
||||
|
@ -8,17 +8,42 @@ namespace Power
|
||||
class Power
|
||||
{
|
||||
private:
|
||||
// specific for 64 and 32 bit
|
||||
void *acpi;
|
||||
void *dsdt;
|
||||
void *madt;
|
||||
void *acpi = nullptr;
|
||||
void *dsdt = nullptr;
|
||||
void *madt = nullptr;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Get Advanced Configuration and Power Interface. (Available only on x32 and x64)
|
||||
*
|
||||
* @return void*
|
||||
*/
|
||||
void *GetACPI() { return this->acpi; }
|
||||
|
||||
/**
|
||||
* @brief Get Differentiated System Description Table. (Available only on x32 and x64)
|
||||
*
|
||||
* @return void*
|
||||
*/
|
||||
void *GetDSDT() { return this->dsdt; }
|
||||
|
||||
/**
|
||||
* @brief Get Multiple APIC Description Table. (Available only on x32 and x64)
|
||||
*
|
||||
* @return void*
|
||||
*/
|
||||
void *GetMADT() { return this->madt; }
|
||||
|
||||
/**
|
||||
* @brief Reboot the system.
|
||||
*/
|
||||
void Reboot();
|
||||
|
||||
/**
|
||||
* @brief Shutdown the system.
|
||||
*/
|
||||
void Shutdown();
|
||||
|
||||
Power();
|
||||
~Power();
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user