Hi, Mr. RehabMan. I met a error in dsdt. And the code is:
HTML:
Store (\_GPE.MMTB (Local2, \_GPE.OSUP (Local2)), Store (Local1, REG6))
Store (\_GPE.MMTB (Local3, \_GPE.OSUP (Local3)), Store (Local2, REG6))
According to the context, I guess it should be:
HTML:
\_GPE.MMTB (REG6)\_GPE.OSUP (REG6)Store (Local2, REG6)
\_GPE.MMTB (REG6)\_GPE.OSUP (REG6)Store (Local2, REG6)
I made a patch for it:
HTML:
into_all all code_regex Store\s\(\\_GPE.MMTB\s\(Local2,\s\\_GPE.OSUP\s\(Local2\)\),\sStore\s\(Local1,\sREG6\)\) replace_matched begin \\_GPE.MMTB (REG6)\n\\_GPE.OSUP (REG6)\nStore (Local1, REG6) end;into_all all code_regex Store\s\(\\_GPE.MMTB\s\(Local3,\s\\_GPE.OSUP\s\(Local3\)\),\sStore\s\(Local2,\sREG6\)\) replace_matched begin \\_GPE.MMTB (REG6)\n\\_GPE.OSUP (REG6)\nStore (Local2, REG6) end;[ATTACH]137034[/ATTACH]
I'm not sure if it right or not. And here is the dsdt.dsl.
View attachment 137034
Your translation is not correct.
In order to disassemble it correctly based on the incorrectly output from iasl, you need a little knowledge of the internal AML format, how iasl works, and some ability to disassemble it properly in your head...
So if we take just the first line of your example (the second one was no doubt a second instance of the same code, but using Local3 instead of Local2):
Code:
Store (\_GPE.MMTB (Local2, \_GPE.OSUP (Local2)), Store (Local1, REG6))
Disassembling it (in your head) under the assumption that MMTB takes zero parameters. Strategy is "keep the opcodes", "consume the operands as required by the opcodes":
Code:
//Store (\_GPE.MMTB (Local2,
[B]Store(\_GPE.MMTB(), Local2)[/B]
//\_GPE.OSUP (Local2)).
[B]\_GPE.OSUP(Local2)[/B]
// Store (Local1, REG6)
[B]Store(Local1, REG6)[/B]
The error is caused because iasl guesses incorrectly about the number of parameters for _GPE.MMTB. It guesses two. Actual params is zero.
You can create refs.txt:
Code:
External(\_GPE.MMTB, MethodObj, 0)
And then disassemble giving iasl this extra hint...
Code:
iasl -fe refs.txt -da -dl *.aml
The correctly disassembled code (from iasl, not my head this time) is this:
Code:
Store (\_GPE.MMTB (), Local2)
\_GPE.OSUP (Local2)
Store (Local1, REG6)
This same code was in my DSDT for the HP Envy and my u430, and refs.txt comes from my current Envy and u430 repos...
Adding a bit of context, you can see the intention of the code:
Code:
Store (REG6, Local1) // save REG6
Store (0x00F0F000, REG6) // set REG6 to fixed value
Store (\_GPE.MMTB (), Local2) // retrieve value from MMTB
\_GPE.OSUP (Local2) // call OSUP with it
Store (Local1, REG6) // restore REG6 to original value
Or, re-written a bit:
Code:
Store (REG6, Local1) // save REG6
Store (0x00F0F000, REG6) // set REG6 to fixed value
\_GPE.OSUP (\_GPE.MMTB ()) // call OSUP with MMTB return
Store (Local1, REG6) // restore REG6 to original value
On the Envy and my u430, the whole block is protected by:
Code:
If (LOr (LEqual (BID, BICO), LEqual (BID, BICC)))
{
...
On my u430, I used ACPIDebug to determine if the condition involving BID was true. It was false. So the code will never execute, which is a good thing... because MMTB is not defined anywhere (it is probably in Windows) and the code is not protected with CondRefOf. So if it were executed it would cause the _WAK method to prematurely terminate (ACPI abort), which would mean code following the MMTB reference in _WAK would not be executed as it should.