feat: add kernel ACPI support for querying battery percentage, add battery indicator to desktop, move log state to 0:/state directory
This commit is contained in:
1 parent
0a18b2cf2d
commit
e641500b40
34 files changed
+2461
-100
No files matched your search
@@ -25,6 +25,8 @@
|
||||
#include <ACPI/CpuIdle.hpp>
|
||||
#include <ACPI/AcpiShutdown.hpp>
|
||||
#include <ACPI/AcpiEvents.hpp>
|
||||
#include <ACPI/EmbeddedController.hpp>
|
||||
#include <ACPI/Battery.hpp>
|
||||
#include <Hal/Apic/ApicInit.hpp>
|
||||
#include <Pci/Pci.hpp>
|
||||
#include <Timekeeping/ApicTimer.hpp>
|
||||
@@ -131,6 +133,12 @@ extern "C" void kmain() {
|
||||
#if defined (__x86_64__)
|
||||
if (g_acpi.GetXSDT() != nullptr) {
|
||||
Hal::AcpiShutdown::Initialize(g_acpi.GetXSDT());
|
||||
|
||||
// The EC is the transport behind battery (and most thermal) methods, so
|
||||
// it has to be latched before anything evaluates them.
|
||||
Hal::EmbeddedController::Initialize(g_acpi.GetXSDT());
|
||||
Hal::Battery::Initialize();
|
||||
|
||||
Hal::CpuIdle::Initialize(g_acpi.GetXSDT());
|
||||
|
||||
Hal::ApicInitialize(g_acpi.GetXSDT());
|
||||
|
||||
Reference in new issue
Block a user