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

@@ -91,7 +91,12 @@ namespace Kernel::ACPI::AML
MUST(context.sync_stack.push_back(sync_level));
}
BAN::Optional<BAN::RefPtr<AML::Node>> return_value;
#if AML_DEBUG_LEVEL >= 2
AML_DEBUG_PRINTLN("Evaluating {}", scope);
#endif
BAN::Optional<BAN::RefPtr<AML::Node>> return_value = BAN::RefPtr<AML::Node>();
while (context.aml_data.size() > 0)
{
auto parse_result = AML::parse_object(context);
@@ -103,6 +108,7 @@ namespace Kernel::ACPI::AML
if (!parse_result.success())
{
AML_ERROR("Method {} evaluate failed", scope);
return_value = {};
break;
}
}