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
|
namespace Power
|
||||||
{
|
{
|
||||||
void Power::Reboot()
|
void Power::Reboot() { ((ACPI::DSDT *)this->dsdt)->Reboot(); }
|
||||||
{
|
void Power::Shutdown() { ((ACPI::DSDT *)this->dsdt)->Shutdown(); }
|
||||||
}
|
|
||||||
|
|
||||||
void Power::Shutdown()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Power::Power()
|
Power::Power()
|
||||||
{
|
{
|
||||||
|
@ -8,17 +8,42 @@ namespace Power
|
|||||||
class Power
|
class Power
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
// specific for 64 and 32 bit
|
void *acpi = nullptr;
|
||||||
void *acpi;
|
void *dsdt = nullptr;
|
||||||
void *dsdt;
|
void *madt = nullptr;
|
||||||
void *madt;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
* @brief Get Advanced Configuration and Power Interface. (Available only on x32 and x64)
|
||||||
|
*
|
||||||
|
* @return void*
|
||||||
|
*/
|
||||||
void *GetACPI() { return this->acpi; }
|
void *GetACPI() { return this->acpi; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get Differentiated System Description Table. (Available only on x32 and x64)
|
||||||
|
*
|
||||||
|
* @return void*
|
||||||
|
*/
|
||||||
void *GetDSDT() { return this->dsdt; }
|
void *GetDSDT() { return this->dsdt; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get Multiple APIC Description Table. (Available only on x32 and x64)
|
||||||
|
*
|
||||||
|
* @return void*
|
||||||
|
*/
|
||||||
void *GetMADT() { return this->madt; }
|
void *GetMADT() { return this->madt; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Reboot the system.
|
||||||
|
*/
|
||||||
void Reboot();
|
void Reboot();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Shutdown the system.
|
||||||
|
*/
|
||||||
void Shutdown();
|
void Shutdown();
|
||||||
|
|
||||||
Power();
|
Power();
|
||||||
~Power();
|
~Power();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user