Kernel: Cleanup AML code and fix bugs

I can enter ACPI mode on my own laptop!
This commit is contained in:
2024-04-12 16:03:14 +03:00
parent 17871bb3ca
commit 74940ed33c
13 changed files with 240 additions and 118 deletions

View File

@@ -11,6 +11,8 @@ namespace Kernel::ACPI::AML
struct Node : public BAN::RefCounted<Node>
{
static uint64_t total_node_count;
enum class Type
{
BankFieldElement,
@@ -35,8 +37,8 @@ namespace Kernel::ACPI::AML
};
const Type type;
Node(Type type) : type(type) {}
virtual ~Node() = default;
Node(Type type) : type(type) { total_node_count++; }
virtual ~Node() { total_node_count--; }
virtual bool is_scope() const { return false; }