Kernel: Rework AML namespace and object hierarchy
Remove tree-like structure from AML. This allows more spec compliant parsing of named objects inside not yet declared devices. This also allows AML to be run thread safely. All object adds/removes are now guarded by a mutex.
This commit is contained in:
@@ -42,11 +42,13 @@ namespace Kernel::ACPI::AML
|
||||
AML_DEBUG_PRINT("Device ");
|
||||
name.debug_print();
|
||||
AML_DEBUG_PRINTLN(" {");
|
||||
for (const auto& [name, object] : objects)
|
||||
{
|
||||
object->debug_print(indent + 1);
|
||||
AML_DEBUG_PRINTLN("");
|
||||
}
|
||||
Namespace::root_namespace()->for_each_child(scope,
|
||||
[&](const auto&, const auto& child)
|
||||
{
|
||||
child->debug_print(indent + 1);
|
||||
AML_DEBUG_PRINTLN("");
|
||||
}
|
||||
);
|
||||
AML_DEBUG_PRINT_INDENT(indent);
|
||||
AML_DEBUG_PRINT("}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user