-
-
Notifications
You must be signed in to change notification settings - Fork 66
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: Handle DefExternal (real hardware) #135
Comments
I added a new function "get_or_add_scope" to transparently/recursively create new scopes during symbol declaration. Let me know if you want me to submit that, and your protocol for submitting. |
Thanks for filing these issues and working on contributions! I'm very happy for anything to just be opened as PRs and I'll review them when I get the chance :)
It's a mixed bag. There's a tonne of things we don't handle correctly, but it's also often the case that tables from real firmware don't conform strictly to the spec. Generally, we have no choice but to be as flexible with parsing as we possibly can be to handle real AML.
Hm, this could potentially be reasonable, although I'm not sure we should preemptively create scopes for normal values until they're needed. Could you provide some example ASL that would require this? |
I'm a little confused by what's going on, it doesn't seem to always break, but this breaks it.
|
|
The error might actually be down here.
|
I think this is probably an issue with how we handle |
Do you know where I can get info on how to decode the ObjectType byte? I can't find anything in the spec. |
Hm yeah it's not obvious where they define that. My guess would be that they use the same constants as for |
It looks like the entire list of externals is defined in an If(false) block. Any advice on how to parse the If(false) safely? I will take a shot at it myself, but any input you have is appreciated. I've attached to whole acpidump file, there are many other errors that will come up, so you might find it useful for future reference. I'm working on the first ssdt. |
My current solution has the following features. Feedback is appreciated, but I will submit something soon if you want to read through the code first.
|
I'm not sure how this could be correct - Just checking that you are parsing the DSDT first and then attempting to add SSDTs - this is defined by the spec as far as I can remember? I have not had time to look at your dump in detail yet - is there any chance you could provide the ASL for the DSDT and SSDTs (you can decompile with |
I just found this in "acpica/documents/changes.txt": |
It appears that namespace.add_value adds the value to the object_map regardless of whether the key can be added to level. Is it ok to only add the value if adding the key is successful (i.e. level exists and no name collision)? |
Here's my asl corresponding to the acpidump.log. I will try to give a mapping from file name to location in the dump file, when I get time. |
Please feel free to comment on the PR, I'm open to suggestions and improvements. |
On HP-dq3xxx, there are references to scopes before they are defined. It's possible some of the problem is due to other parser errors and/or parsing the tables out of order. It's not clear if it's possible to guess what order to the tables should be parsed in to avoid this. Here is my proposed approach:
The text was updated successfully, but these errors were encountered: