Kernel: ACPI implement integer stores to registers as copies
Before storing const integer and then modifying the register it would error.
This commit is contained in:
parent
2fccff5a35
commit
f671ed7e3f
|
@ -30,6 +30,8 @@ namespace Kernel::ACPI::AML
|
|||
, constant(constant)
|
||||
{}
|
||||
|
||||
BAN::RefPtr<Node> copy() override { return MUST(BAN::RefPtr<Integer>::create(value)); }
|
||||
|
||||
BAN::RefPtr<AML::Node> evaluate() override
|
||||
{
|
||||
return this;
|
||||
|
|
|
@ -43,6 +43,8 @@ namespace Kernel::ACPI::AML
|
|||
|
||||
virtual bool is_scope() const { return false; }
|
||||
|
||||
virtual BAN::RefPtr<Node> copy() { return this; }
|
||||
|
||||
[[nodiscard]] BAN::Optional<uint64_t> as_integer();
|
||||
[[nodiscard]] virtual BAN::RefPtr<AML::Node> evaluate() { AML_TODO("evaluate, type {}", static_cast<uint8_t>(type)); return nullptr; }
|
||||
[[nodiscard]] virtual bool store(BAN::RefPtr<AML::Node>) { AML_TODO("store, type {}", static_cast<uint8_t>(type)); return false; }
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Kernel::ACPI::AML
|
|||
AML_ERROR("Failed to evaluate source for store");
|
||||
return false;
|
||||
}
|
||||
value = evaluated;
|
||||
value = evaluated->copy();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue