Kernel: Add _GL to ACPI root namespace
This commit is contained in:
parent
3f5ee6f414
commit
e0a447bfaf
|
@ -14,10 +14,12 @@ namespace Kernel::ACPI::AML
|
||||||
{
|
{
|
||||||
Kernel::Mutex mutex;
|
Kernel::Mutex mutex;
|
||||||
uint8_t sync_level;
|
uint8_t sync_level;
|
||||||
|
bool global;
|
||||||
|
|
||||||
Mutex(NameSeg name, uint8_t sync_level)
|
Mutex(NameSeg name, uint8_t sync_level, bool global = false)
|
||||||
: NamedObject(Node::Type::Mutex, name)
|
: NamedObject(Node::Type::Mutex, name)
|
||||||
, sync_level(sync_level)
|
, sync_level(sync_level)
|
||||||
|
, global(global)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
BAN::RefPtr<AML::Node> convert(uint8_t) override { return {}; }
|
BAN::RefPtr<AML::Node> convert(uint8_t) override { return {}; }
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#include <kernel/ACPI/AML/Device.h>
|
#include <kernel/ACPI/AML/Device.h>
|
||||||
#include <kernel/ACPI/AML/Integer.h>
|
#include <kernel/ACPI/AML/Integer.h>
|
||||||
#include <kernel/ACPI/AML/Method.h>
|
#include <kernel/ACPI/AML/Method.h>
|
||||||
|
#include <kernel/ACPI/AML/Mutex.h>
|
||||||
#include <kernel/ACPI/AML/Namespace.h>
|
#include <kernel/ACPI/AML/Namespace.h>
|
||||||
#include <kernel/ACPI/AML/ParseContext.h>
|
#include <kernel/ACPI/AML/ParseContext.h>
|
||||||
#include <kernel/ACPI/AML/Region.h>
|
#include <kernel/ACPI/AML/Region.h>
|
||||||
|
@ -233,6 +234,9 @@ namespace Kernel::ACPI
|
||||||
ADD_PREDEFIED_NAMESPACE("_TZ"_sv);
|
ADD_PREDEFIED_NAMESPACE("_TZ"_sv);
|
||||||
#undef ADD_PREDEFIED_NAMESPACE
|
#undef ADD_PREDEFIED_NAMESPACE
|
||||||
|
|
||||||
|
auto gl = MUST(BAN::RefPtr<AML::Mutex>::create(NameSeg("_GL"_sv), 0, true));
|
||||||
|
ASSERT(s_root_namespace->add_named_object(context, AML::NameString("\\_GL"), gl));
|
||||||
|
|
||||||
// Add \_OSI that returns true for Linux compatibility
|
// Add \_OSI that returns true for Linux compatibility
|
||||||
auto osi = MUST(BAN::RefPtr<AML::Method>::create(NameSeg("_OSI"_sv), 1, false, 0));
|
auto osi = MUST(BAN::RefPtr<AML::Method>::create(NameSeg("_OSI"_sv), 1, false, 0));
|
||||||
osi->override_function = [](AML::ParseContext& context) -> BAN::RefPtr<AML::Node> {
|
osi->override_function = [](AML::ParseContext& context) -> BAN::RefPtr<AML::Node> {
|
||||||
|
|
Loading…
Reference in New Issue