Files
banan-os/kernel/include/kernel/ACPI/AML/Scope.h
Bananymous f1b2d7530d 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.
2024-04-16 16:47:45 +03:00

28 lines
582 B
C++

#pragma once
#include <kernel/ACPI/AML/NamedObject.h>
#include <kernel/ACPI/AML/Names.h>
namespace Kernel::ACPI::AML
{
struct Scope : public AML::NamedObject
{
AML::NameString scope;
Scope(Node::Type type, NameSeg name)
: NamedObject(type, name)
{}
virtual bool is_scope() const override { return true; }
static ParseResult parse(ParseContext& context);
protected:
ParseResult enter_context_and_parse_term_list(ParseContext& outer_context, const AML::NameString& name, BAN::ConstByteSpan aml_data);
};
bool initialize_scope(BAN::RefPtr<Scope> scope);
}