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:
@@ -36,6 +36,14 @@ namespace Kernel::ACPI::AML
|
||||
aml_data = aml_data.slice(4);
|
||||
}
|
||||
|
||||
BAN::StringView sv() const
|
||||
{
|
||||
size_t len = 4;
|
||||
while (len > 0 && chars[len - 1] == '_')
|
||||
len--;
|
||||
return BAN::StringView(chars, len);
|
||||
}
|
||||
|
||||
static BAN::Optional<NameSeg> parse(BAN::ConstByteSpan& aml_data)
|
||||
{
|
||||
if (aml_data.size() < 4)
|
||||
|
||||
Reference in New Issue
Block a user