Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AML: Implement ObjReference type values #195

Open
alnyan opened this issue Sep 1, 2023 · 0 comments
Open

AML: Implement ObjReference type values #195

alnyan opened this issue Sep 1, 2023 · 0 comments

Comments

@alnyan
Copy link
Contributor

alnyan commented Sep 1, 2023

The aml crate currently does not have support for reference-typed values. Implementing them allows us to support DeRefOf/Index/RefOf/CondRefOf opcodes which are quite common in real-hardware AML.

One way to implement that may be to introduce two extra AmlValue variants as well as a reference target enum:

enum AmlReference {
  Handle(AmlHandle),
  Local(u8),
  Arg(u8)
}

enum AmlValue {
  // ...
  Reference(AmlReference), // Just a reference to some object
  IndexReference(AmlReference, u64), // Similar, but with an index
}

Extra consideration may also be needed for handling references that may be returned from functions (AFAIK the ACPI spec doesn't disallow that and iasl happily compiles methods returning references to their locals).

I opened the issue so we can discuss it and pick the best way to implement the feature.

Related issue: #141

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant