diff --git a/kernel/include/kernel/ACPI/AML/Buffer.h b/kernel/include/kernel/ACPI/AML/Buffer.h index ffb6cf46..a48f3385 100644 --- a/kernel/include/kernel/ACPI/AML/Buffer.h +++ b/kernel/include/kernel/ACPI/AML/Buffer.h @@ -46,6 +46,23 @@ namespace Kernel::ACPI::AML return {}; } + BAN::RefPtr store(BAN::RefPtr node) override + { + ASSERT(node); + auto conv_node = node->convert(AML::Node::ConvBuffer); + if (!conv_node) + { + AML_ERROR("Buffer store could not convert to buffer"); + return {}; + } + + auto& conv_buffer = static_cast(conv_node.ptr())->buffer; + MUST(buffer.resize(conv_buffer.size())); + for (size_t i = 0; i < buffer.size(); i++) + buffer[i] = conv_buffer[i]; + return this; + } + static ParseResult parse(AML::ParseContext& context) { ASSERT(context.aml_data.size() >= 1);