Jump to content

Some problems with my DSDT - ASUS X55VDR


Zarksus
 Share

13 posts in this topic

Recommended Posts

Hello everyone  :)
 
I have a small problem with my DSDT. Among the various Warnings I have one where he says:
 
Not all control paths return a value (_Q13)

the code is:

        Method (_Q13, 0, NotSerialized)
        {
            If (LGreaterEqual (MSOS (), OSW8))
            {
                STB2 (0xE0)
                STB2 (0x20)
                STB2 (0xE0)
                STB2 (0xA0)
                Return (One)
            }

            If (ATKP)
            {
                ^^^^ATKD.IANE (0x32)
            }
            
        }
I made this change:
 
        Method (_Q13, 0, NotSerialized)
        {
            If (LGreaterEqual (MSOS (), OSW8))
            {
                STB2 (0xE0)
                STB2 (0x20)
                STB2 (0xE0)
                STB2 (0xA0)
                Return (One)
            }

            If (ATKP)
            {
                ^^^^ATKD.IANE (0x32)
            }
            
            Else
            {
                Return (Zero)
            }
            
        }

but do not know what amount of return should I enter here:

            If (ATKP)
            {
                ^^^^ATKD.IANE (0x32)
            }
sorry for my bad English but I am Italian.  :rofl:
 
Thanks in advance  ^_^
Link to comment
Share on other sites

Try this:

 

Method (_Q13, 0, NotSerialized)
        {
            If (LGreaterEqual (MSOS (), OSW8))
            {
                STB2 (0xE0)
                STB2 (0x20)
                STB2 (0xE0)
                STB2 (0xA0)
                Return (One)
            }
            If (ATKP)
            {
                ^^^^ATKD.IANE (0x32)
            }
           Return (Zero)
        }
Link to comment
Share on other sites

ok :yes: , it seems that the compiler does not give me more than the error of the method. Thank you carbo178  :D  :thumbsup_anim:

 

Can I do the same thing with the other methods with the same warning? 

 


These are the methods that give me the same error:

 



Method (HSWC, 1, Serialized)
{
If (LLess (Arg0, 0x02))
{
OWGD (Arg0)
Return (One)
}

If (LEqual (Arg0, 0x02))
{
Return (OWGS ())
}

If (LEqual (Arg0, 0x03))
{
Return (0xFF)
}

If (LEqual (Arg0, 0x80))
{
Return (One)
}
}


Method (_Q11, 0, Serialized)
{
Name (_T_0, Zero)
If (LGreaterEqual (MSOS (), OSW8))
{
If (LEqual (F8FG, Zero))
{
Store (One, F8FG)
STB2 (0xE0)
STB2 (0x5B)
}

STB2 (0x19)
STB2 (0x99)
Return (One)
}

If (LEqual (^^^GFX0.HGCK, One))
{
Return (One)
}

FHKW ()
Store (ADVG (), Local0)
If (NATK ())
{
If (LLess (Local0, 0x08))
{
Add (Local0, 0x60, Local1)
}
Else
{
If (LLess (Local0, 0x10))
{
Subtract (Local0, 0x08, Local1)
Add (Local1, 0x8C, Local1)
}
Else
{
If (LLess (Local0, 0x20))
{
And (Local0, 0x07, Local1)
Add (Local1, 0xA0, Local1)
}
Else
{
If (LLess (Local0, 0x40))
{
While (One)
{
Store (ToInteger (Local0), _T_0)
If (LEqual (_T_0, 0x20))
{
Store (0xD0, Local1)
}
Else
{
If (LEqual (_T_0, 0x21))
{
Store (0xD1, Local1)
}
Else
{
If (LEqual (_T_0, 0x22))
{
Store (0xD2, Local1)
}
Else
{
If (LEqual (_T_0, 0x24))
{
Store (0xD3, Local1)
}
Else
{
If (LEqual (_T_0, 0x28))
{
Store (0xD4, Local1)
}
Else
{
If (LEqual (_T_0, 0x30))
{
Store (0xD5, Local1)
}
}
}
}
}
}

Break
}
}
}
}
}

If (ATKP)
{
If (LNotEqual (Local1, 0x60))
{
^^^^ATKD.IANE (Local1)
}
}
Else
{
SWHG (Local0)
}
}
Else
{
SWHG (Local0)
}

FHKS ()
}



Method (_Q14, 0, NotSerialized)
{
If (LGreaterEqual (MSOS (), OSW8))
{
STB2 (0xE0)
STB2 (0x2E)
STB2 (0xE0)
STB2 (0xAE)
Return (One)
}

If (LLess (AVOL, 0x0F))
{
Increment (AVOL)
}

If (ATKP)
{
^^^^ATKD.IANE (0x31)
}
}


Method (_Q15, 0, NotSerialized)
{
If (LGreaterEqual (MSOS (), OSW8))
{
STB2 (0xE0)
STB2 (0x30)
STB2 (0xE0)
STB2 (0xB0)
Return (One)
}

If (LGreater (AVOL, Zero))
{
Decrement (AVOL)
}

If (ATKP)
{
^^^^ATKD.IANE (0x30)
}
}


Method (_ON, 0, NotSerialized)
{
If (LNotEqual (SVID, 0xFFFFFFFF))
{
Return (Zero)
}

SGPL (0x32, One, Zero)
Sleep (0x64)
SGPL (0x36, One, One)
Sleep (0x64)
Store (RGPL (0x11, One), Local0)
While (LNot (Local0))
{
Sleep (0x0A)
Store (RGPL (0x11, One), Local0)
}

SGPL (0x32, One, One)
Sleep (0x64)
Store (Zero, AFE4)
Store (Zero, AFE5)
Store (Zero, LDPS)
Store (Zero, LNKD)
While (LLess (LNKS, 0x07))
{
Sleep (One)
}

^^^GFX0.RSTO ()
Store (Zero, NHDA)
Sleep (0x32)
Store (One, ^^^GFX0.HPWR)
^^^LPCB.EC0.WRAM (0x0520, 0x97)
If (^^^GFX0.NTSA) {}
Else
{
^^^LPCB.EC0.WRAM (0x052B, 0x9E)
Store (One, ^^^GFX0.NTSA)
}

Store (^^^LPCB.EC0.RRAM (0x0521), Local0)
And (Local0, 0xCF, Local0)
Or (Local0, 0x20, Local0)
^^^LPCB.EC0.WRAM (0x0521, Local0)
}


Method (MXDS, 1, NotSerialized)
{
If (And (Arg0, Zero))
{
Return (^^^GFX0.HLMX)
}
Else
{
Store (One, ^^^GFX0.HLMX)
Store (One, ^^^GFX0.HCMX)
Sleep (0x64)
}
}


Link to comment
Share on other sites

thank you very much for your help, I did as you said and now those warnings are gone.  :thumbsup_anim:

 

I also have another problem, <_< a doubt regarding the DSDT. I have a Wifi card in my PC that does not interface well with OSX (AR9485). So far I've used a USB external WiFi to connect to the internet. Since I have a WiFi internal card compatible with OSX from another PC the question that plagues me is: What happens to the DSDT if I replace the card with a different internal Wifi? I need to change something in the DSDT? What I had before is no longer good?

Link to comment
Share on other sites

thank you very much carbo178  :yes:

 

the latest fixes that I would like to relate these two errors:

Unknown reserved name (_WDG)

for this code:

Name (_WDG, Buffer (0x28)
            {
                /* 0000 */    0xD0, 0x5E, 0x84, 0x97, 0x6D, 0x4E, 0xDE, 0x11, 
                /* 0008 */    0x8A, 0x39, 0x08, 0x00, 0x20, 0x0C, 0x9A, 0x66, 
                /* 0010 */    0x4E, 0x42, 0x01, 0x02, 0x35, 0xBB, 0x3C, 0x0B, 
                /* 0018 */    0xC2, 0xE3, 0xED, 0x45, 0x91, 0xC2, 0x4C, 0x5A, 
                /* 0020 */    0x6D, 0x19, 0x5D, 0x1C, 0xFF, 0x00, 0x01, 0x08
            })

Unknown reserved name (_WED)

for this:

Method (_WED, 1, NotSerialized)
            {
                If (LEqual (Arg0, 0xFF))
                {
                    Return (GANQ ())
                }

                Return (Ones)
            }

and last:

Statement is unreachable

for these:

 

1°)

Method (WBAT, 3, Serialized)
        {
            Or (Arg0, 0x80, Local3)
            If (LNot (ECAV ()))
            {
                Return (Ones)
            }

            Acquire (MUEC, 0xFFFF)
            Store (0x03, Local0)
            While (Local0)
            {
                Store (Arg2, CDT1)
                Store (Local3, CDT2)
                Store (Arg1, Local1)
                ShiftLeft (Local1, One, Local1)
                Add (Local1, 0xDA, Local1)
                Store (Local1, CMD1)
                Store (0x7F, Local1)
                While (LAnd (CMD1, Local1))
                {
                    Decrement (Local1)
                    Sleep (One)
                }
            }

            Release (MUEC)
            Return (Local1)
            Return (Ones)
        }

2°)

Method (RBAT, 2, Serialized)
        {
            If (LNot (ECAV ()))
            {
                Return (Ones)
            }

            Acquire (MUEC, 0xFFFF)
            Store (0x03, Local0)
            While (Local0)
            {
                Store (Arg0, CDT2)
                Store (Arg1, Local1)
                ShiftLeft (Local1, One, Local1)
                Add (Local1, 0xDA, Local1)
                Store (Local1, CMD1)
                Store (0x7F, Local1)
                While (LAnd (CMD1, Local1))
                {
                    Decrement (Local1)
                    Sleep (One)
                }

                If (LEqual (CMD1, Zero))
                {
                    Store (CDT1, Local1)
                    Store (Zero, Local0)
                }
                Else
                {
                    Store (Ones, Local1)
                    Decrement (Local0)
                }
            }

            Release (MUEC)
            Return (Local1)
            Return (Ones)
        }

3°)

Method (_STA, 0, Serialized)
        {
            Return (0x0F)
            If (LNotEqual (SVID, 0xFFFFFFFF))
            {
                Return (0x0F)
            }

            Return (Zero)
        }
For the 1° and 2° the error is highlighted in this line: 
 
Return (Ones)

For the 3° the error is highlighted in this line: 

If (LNotEqual (SVID, 0xFFFFFFFF))
 
thanks again  ^_^
Link to comment
Share on other sites

UAO :D  do not really know how to thank you carbo178. Many congratulations on this excellent work.   :thumbsup_anim:

 

With regard to the method DTGP you told me I seemed to have already entered previously in the DSDT, I think at the end of all other methods. 

 

At the moment I use the kext VoodooHDA to enable sounds but I wish I could do without and use the AppleHDA if possible. How could I do exactly?

 

If you can help this is my IOreg:

 

2180962.jpg

 


thanks again  :)

Link to comment
Share on other sites

 Share

×
×
  • Create New...