diff --git a/kernel/include/kernel/ACPI/AML/Alias.h b/kernel/include/kernel/ACPI/AML/Alias.h index 61520343..315cb041 100644 --- a/kernel/include/kernel/ACPI/AML/Alias.h +++ b/kernel/include/kernel/ACPI/AML/Alias.h @@ -38,16 +38,16 @@ namespace Kernel::ACPI::AML return ParseResult::Failure; auto source_object = AML::Namespace::root_namespace()->find_object(context.scope, source_string.value(), AML::Namespace::FindMode::Normal); - if (!source_object) - { - AML_ERROR("Alias target could not be found"); - return ParseResult::Failure; - } - auto alias_string = AML::NameString::parse(context.aml_data); if (!alias_string.has_value()) return ParseResult::Failure; + if (!source_object) + { + AML_PRINT("Alias target could not be found"); + return ParseResult::Success; + } + auto alias = MUST(BAN::RefPtr::create(alias_string.value().path.back(), source_object)); if (!Namespace::root_namespace()->add_named_object(context, alias_string.value(), alias)) return ParseResult::Success; diff --git a/kernel/include/kernel/ACPI/AML/Buffer.h b/kernel/include/kernel/ACPI/AML/Buffer.h index b1fd7911..49d244b5 100644 --- a/kernel/include/kernel/ACPI/AML/Buffer.h +++ b/kernel/include/kernel/ACPI/AML/Buffer.h @@ -250,7 +250,7 @@ namespace Kernel::ACPI::AML auto field = MUST(BAN::RefPtr::create(field_name->path.back(), buffer, field_bit_offset, field_bit_size)); if (!Namespace::root_namespace()->add_named_object(context, field_name.value(), field)) - return ParseResult::Failure; + return ParseResult::Success; #if AML_DEBUG_LEVEL >= 2 field->debug_print(0); diff --git a/kernel/include/kernel/ACPI/AML/Device.h b/kernel/include/kernel/ACPI/AML/Device.h index 8fa68738..0349290b 100644 --- a/kernel/include/kernel/ACPI/AML/Device.h +++ b/kernel/include/kernel/ACPI/AML/Device.h @@ -31,7 +31,7 @@ namespace Kernel::ACPI::AML auto device = MUST(BAN::RefPtr::create(name_string->path.back())); if (!Namespace::root_namespace()->add_named_object(context, name_string.value(), device)) - return ParseResult::Failure; + return ParseResult::Success; return device->enter_context_and_parse_term_list(context, name_string.value(), device_pkg.value()); } diff --git a/kernel/include/kernel/ACPI/AML/Mutex.h b/kernel/include/kernel/ACPI/AML/Mutex.h index 4fa9ee94..7aa23327 100644 --- a/kernel/include/kernel/ACPI/AML/Mutex.h +++ b/kernel/include/kernel/ACPI/AML/Mutex.h @@ -71,7 +71,7 @@ namespace Kernel::ACPI::AML auto mutex = MUST(BAN::RefPtr::create(name->path.back(), sync_level)); if (!Namespace::root_namespace()->add_named_object(context, name.value(), mutex)) - return ParseResult::Failure; + return ParseResult::Success; #if AML_DEBUG_LEVEL >= 2 mutex->debug_print(0); diff --git a/kernel/include/kernel/ACPI/AML/Processor.h b/kernel/include/kernel/ACPI/AML/Processor.h index 382d6829..3402e345 100644 --- a/kernel/include/kernel/ACPI/AML/Processor.h +++ b/kernel/include/kernel/ACPI/AML/Processor.h @@ -55,7 +55,7 @@ namespace Kernel::ACPI::AML auto processor = MUST(BAN::RefPtr::create(name->path.back(), id, pblk_addr, pblk_len)); if (!Namespace::root_namespace()->add_named_object(context, name.value(), processor)) - return ParseResult::Failure; + return ParseResult::Success; #if AML_DEBUG_LEVEL >= 2 processor->debug_print(0); diff --git a/kernel/include/kernel/ACPI/AML/Region.h b/kernel/include/kernel/ACPI/AML/Region.h index 80573447..ad599b8c 100644 --- a/kernel/include/kernel/ACPI/AML/Region.h +++ b/kernel/include/kernel/ACPI/AML/Region.h @@ -68,7 +68,7 @@ namespace Kernel::ACPI::AML )); if (!Namespace::root_namespace()->add_named_object(context, name.value(), op_region)) - return ParseResult::Failure; + return ParseResult::Success; #if AML_DEBUG_LEVEL >= 2 op_region->debug_print(0); diff --git a/kernel/include/kernel/ACPI/AML/ThermalZone.h b/kernel/include/kernel/ACPI/AML/ThermalZone.h index 69e379eb..675c3552 100644 --- a/kernel/include/kernel/ACPI/AML/ThermalZone.h +++ b/kernel/include/kernel/ACPI/AML/ThermalZone.h @@ -33,7 +33,7 @@ namespace Kernel::ACPI::AML auto thermal_zone = MUST(BAN::RefPtr::create(name->path.back())); if (!Namespace::root_namespace()->add_named_object(context, name.value(), thermal_zone)) - return ParseResult::Failure; + return ParseResult::Success; #if AML_DEBUG_LEVEL >= 2 thermal_zone->debug_print(0);