-
-
Notifications
You must be signed in to change notification settings - Fork 65
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 NullName in NameString #196
Comments
I'm not fully sure, but it seems that null names just represent the root scope path |
The problem seems to be caused by a quirk in an real device (Thinkpad E14 Gen2 SSDT3) AML and is not a part of any actual SuperName, decompiled AML shows the following: DefinitionBlock ("", "SSDT", 1, "LENOVO", "STD3", 0x00000001)
{
// ...
Scope (\_SB)
{
Name (D0S0, 0x01)
Name (D3S0, 0x01)
Name (D0S1, 0x01)
Name (D3S1, 0x01)
Name (STDS, Zero)
Zero
PowerResource (P0S0, 0x00, 0x0000)
{
// ...
}
// ...
}
// ...
} As it turned out, there was a weird ZeroOp inside the _SB scope, which the parser tried to interpret as some kind of name. Adding a ZeroOp handler at the start of UPD: The same weird op is also present in the decompiled AML of the same thinkpad's SSDT11 (this time it's a OneOp): DefinitionBlock ("", "SSDT", 1, "LENOVO", "TP-R1A ", 0x00000001)
{
// ...
Name (M278, 0x01)
Name (M279, 0x01)
Name (M27A, 0x01)
Name (APGE, Zero)
One
Name (ACGE, 0x01)
// ...
} |
FWIW it looks like such weird ZeroOps are present in all Qualcomm ACPI tables.. See https://github.com/aarch64-laptops/build/blob/master/misc/microsoft-devkit-2023/DSDT.dsl for an example (there's a .dat (.aml) in that directory too) |
iasl unceremoniously errors out when trying to parse these, I was told ms asl consumes them fine.. which is supposedly what the aforementioned tables are compiled with |
ACPI 6.2, section 20.2.2 defines NameString as follows:
In the
name_string()
parser, there currently is a check for an empty NamePath throwing an error if the length of the path parsed byname_path()
is zero, which prevents the parser from handlingNullName
s properly.The text was updated successfully, but these errors were encountered: