From a5cf92b2ff5c968bdf9928ffa72083ffb05124fc Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 30 Dec 2024 06:27:49 +0200 Subject: [PATCH] Kernel: Use uint64_t instead of size_t for AML node conversion This allows 32 bit to compile again :) --- kernel/include/kernel/ACPI/AML/Node.h | 2 +- kernel/include/kernel/ACPI/AML/OpRegion.h | 2 +- kernel/kernel/ACPI/AML/Node.cpp | 2 +- kernel/kernel/ACPI/AML/OpRegion.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/include/kernel/ACPI/AML/Node.h b/kernel/include/kernel/ACPI/AML/Node.h index 1eaf8e57..c795eef2 100644 --- a/kernel/include/kernel/ACPI/AML/Node.h +++ b/kernel/include/kernel/ACPI/AML/Node.h @@ -278,7 +278,7 @@ namespace Kernel::ACPI::AML BAN::ErrorOr parse_name_string(BAN::ConstByteSpan& aml_data); BAN::ErrorOr parse_pkg(BAN::ConstByteSpan& aml_data); - BAN::ErrorOr convert_node(Node&& source, uint8_t conversion, size_t max_length); + BAN::ErrorOr convert_node(Node&& source, uint8_t conversion, uint64_t max_length); BAN::ErrorOr convert_node(Node&& source, const Node& target); BAN::ErrorOr evaluate_node(const Scope& node_path, const Node& node); diff --git a/kernel/include/kernel/ACPI/AML/OpRegion.h b/kernel/include/kernel/ACPI/AML/OpRegion.h index c17d21c5..c1741545 100644 --- a/kernel/include/kernel/ACPI/AML/OpRegion.h +++ b/kernel/include/kernel/ACPI/AML/OpRegion.h @@ -10,7 +10,7 @@ namespace Kernel::ACPI::AML BAN::ErrorOr parse_index_field_op(ParseContext& context); BAN::ErrorOr parse_bank_field_op(ParseContext& context); - BAN::ErrorOr convert_from_field_unit(const Node& node, uint8_t conversion, size_t max_length); + BAN::ErrorOr convert_from_field_unit(const Node& node, uint8_t conversion, uint64_t max_length); BAN::ErrorOr store_to_field_unit(const Node& source, const Node& target); } diff --git a/kernel/kernel/ACPI/AML/Node.cpp b/kernel/kernel/ACPI/AML/Node.cpp index 5fcab425..285b6338 100644 --- a/kernel/kernel/ACPI/AML/Node.cpp +++ b/kernel/kernel/ACPI/AML/Node.cpp @@ -551,7 +551,7 @@ namespace Kernel::ACPI::AML } } - BAN::ErrorOr convert_node(Node&& source, uint8_t conversion, size_t max_length) + BAN::ErrorOr convert_node(Node&& source, uint8_t conversion, uint64_t max_length) { dprintln_if(AML_DUMP_FUNCTION_CALLS, "convert_node {} -> 0b{3b}", source, conversion); diff --git a/kernel/kernel/ACPI/AML/OpRegion.cpp b/kernel/kernel/ACPI/AML/OpRegion.cpp index 143e2e8f..7e6db814 100644 --- a/kernel/kernel/ACPI/AML/OpRegion.cpp +++ b/kernel/kernel/ACPI/AML/OpRegion.cpp @@ -652,7 +652,7 @@ namespace Kernel::ACPI::AML return {}; } - BAN::ErrorOr convert_from_field_unit(const Node& source, uint8_t conversion, size_t max_length) + BAN::ErrorOr convert_from_field_unit(const Node& source, uint8_t conversion, uint64_t max_length) { ASSERT(source.type == Node::Type::FieldUnit);