acpi icon indicating copy to clipboard operation
acpi copied to clipboard

AML: Handle DefIndexField (real hardware)

Open alnyan opened this issue 2 years ago • 0 comments

Hi, I was trying to integrate the aml/acpi crates into my kernel and found out that some of the real-hardware opcodes are NYI.

I'm currently working on implementing DefIndexField myself, but there's problem that might require significant changes to the aml crate: as IndexFields require writes to their index fields even when reading, this means functions like as_integer/as_string/as_buffer/etc as well as the read_field also perform writes and thus require mutable ref to AmlContext, which breaks lots of other code. A simple workaround would be to add a separate AmlType for IndexFields, but I don't think this is correct as per specification.

So, if you can suggest which way is better, I can finish this feature and make a PR. Thanks.

alnyan avatar Aug 23 '23 08:08 alnyan