What is left is to get rid of 42 warnings and one remark. Let's have a look at the warnings:
Code:
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 2980: Method (ADVD, 0, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (ADVD)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5709: If (LOr (MP0P (Local6), MP1P (Local6)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5709: If (LOr (MP0P (Local6), MP1P (Local6)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5711: Multiply (MCRS (Local6), 0x08000000, BF0F)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5713: If (MPCR (Local6))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5715: If (MP0P (Local6))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5717: If (MP1P (Local6))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5728: If (MP0P (Local6))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5730: Store (MP0N (Local6), Local5)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5734: If (MP1P (Local6))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5736: Store (MP1N (Local6), Local5)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5740: If (LGreater (BNKN, MCDB (Local5)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5742: Store (MCDB (Local5), BNKN)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5745: If (LLess (BNKX, MCDB (Local5)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5747: Store (MCDB (Local5), BNKX)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5750: If (LGreater (COLN, MCDC (Local5)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5752: Store (MCDC (Local5), COLN)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5755: If (LLess (COLX, MCDC (Local5)))
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5757: Store (MCDC (Local5), COLX)
Warning 1093 - Called method may not always return a value ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5798: Method (MP0P, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MP0P)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5826: Method (MP1P, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MP1P)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5854: Method (MPCR, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MPCR)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5882: Method (MP0N, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MP0N)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5910: Method (MP1N, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MP1N)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5938: Method (MCRB, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MCRB)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5966: Method (MCRS, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MCRS)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 5994: Method (MCDB, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MCDB)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 6017: Method (MCDC, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (MCDC)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 6295: Method (WMNV, 3, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (WMNV)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7136: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7150: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7165: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7180: Acquire (MUTE, 0x0FFF)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7194: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7209: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 7224: Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 8970: Return (One)
Warning 1128 - Reserved method should not return a value ^ (_Q0E)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 9001: Return (One)
Warning 1128 - Reserved method should not return a value ^ (_Q0F)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 10256: Method (GMLE, 1, Serialized)
Warning 1088 - Not all control paths return a value ^ (GMLE)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 10269: Method (SMLE, 1, Serialized)
Warning 1088 - Not all control paths return a value ^ (SMLE)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 10289: Method (WLLC, 1, NotSerialized)
Warning 1088 - Not all control paths return a value ^ (WLLC)
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 10946: Return (\_SB.PCI0.IXVE.IGPU.ADVD ())
Warning 1093 - Called method may not always return a value ^
Firstly, we have to take care of all Not all control paths return a value warnings. I will show you an example which is clear enough to give you an idea on how to work with the rest.
Code:
Method (MP0P, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Return (P0P0)
}
If (LEqual (Arg0, One))
{
Return (P0P1)
}
If (LEqual (Arg0, 0x02))
{
Return (P0P2)
}
If (LEqual (Arg0, 0x03))
{
Return (P0P3)
}
If (LEqual (Arg0, 0x04))
{
Return (P0P4)
}
}
In general - at the end of the part where warning occurs, we have to add "Return (Zero)":
Code:
Method (MP0P, 1, NotSerialized)
{
If (LEqual (Arg0, Zero))
{
Return (P0P0)
}
If (LEqual (Arg0, One))
{
Return (P0P1)
}
If (LEqual (Arg0, 0x02))
{
Return (P0P2)
}
If (LEqual (Arg0, 0x03))
{
Return (P0P3)
}
If (LEqual (Arg0, 0x04))
{
Return (P0P4)
}
Return (Zero)
}
When we are done with all warnings of this type, we go straight to "Reserved method should not return a value". Again - I am going to show you an example:
Code:
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 8970: Return (One)
Warning 1128 - Reserved method should not return a value ^ (_Q0E)
One of my warnings is connected with this line. It's obvious that we simply have to remove it. It's the easiest way to return nothing
To finish with all warnings we also have to take care of these:
Code:
Acquire (MUTE, 0x03E8)
Warning 1105 - Result is not used, possible operator timeout will be missed ^
The fix is very easy (again!). Simply change all Acquire (MUTE, 0x03E8) to Acquire (MUTE, 0xFFFF).
If you are still reading this, you must be a pedant-type, just like me... let's move to remark then
Code:
/Users/man_of_the_oak/Desktop/Asus K50IN/Brudactwo/DSDT_K50IN_K50IN000.dsl 159: Name (_T_0, Zero)
Remark 5111 - Use of compiler reserved name ^ (_T_0)
Find all "_T_0" within whole DSDT and replace them to "T_0". Congrats! Your DSDT should compile with this result:
Compilation complete. 0 Errors, 0 Warnings, 0 Remarks
4. DSDT modifying
DTGP method
Before:
Code:
(...)
DefinitionBlock ("DSDT.aml", "DSDT", 1, "K50IN", "K50IN000", 0x00000000)
{
Scope (_PR)
{
Processor (P001, 0x01, 0x00004010, 0x06) {}
Alias (P001, CPU0)
}
Scope (_PR)
{
Processor (P002, 0x02, 0x00004010, 0x06) {}
Alias (P002, CPU1)
}
Scope (_PR)
{
Processor (P003, 0x03, 0x00004010, 0x06) {}
Alias (P003, CPU2)
}
(...)
After:
Code:
(...)
DefinitionBlock ("DSDT.aml", "DSDT", 1, "K50IN", "K50IN000", 0x00000000)
{
Method (DTGP, 5, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LEqual (Arg1, One))
{
If (LEqual (Arg2, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg4)
Return (One)
}
If (LEqual (Arg2, One))
{
Return (One)
}
}
}
Store (Buffer (One)
{
0x00
}, Arg4)
Return (Zero)
}
Scope (_PR)
{
Processor (P001, 0x01, 0x00004010, 0x06) {}
Alias (P001, CPU0)
}
Scope (_PR)
{
Processor (P002, 0x02, 0x00004010, 0x06) {}
Alias (P002, CPU1)
}
Scope (_PR)
{
Processor (P003, 0x03, 0x00004010, 0x06) {}
Alias (P003, CPU2)
} (...)
Deleting Aliases:
Before:
Code:
(...)
Scope (_PR)
{
Processor (P001, 0x01, 0x00004010, 0x06) {}
Alias (P001, CPU0)
}
Scope (_PR)
{
Processor (P002, 0x02, 0x00004010, 0x06) {}
Alias (P002, CPU1)
}
Scope (_PR)
{
Processor (P003, 0x03, 0x00004010, 0x06) {}
Alias (P003, CPU2)
}
Scope (_PR)
{
Processor (P004, 0x04, 0x00004010, 0x06) {}
Alias (P004, CPU3)
}
(...)
After:
Code:
(...)
Scope (_PR)
{
Processor (P001, 0x01, 0x00004010, 0x06) {}
Processor (P002, 0x02, 0x00004010, 0x06) {}
Processor (P003, 0x03, 0x00004010, 0x06) {}
Processor (P004, 0x04, 0x00004010, 0x06) {}
}(...)
We also have to change CPU0->P001, CPU1->P002, CPU2->P003 and CPU3->P004 within whole DSDT!
OS detection
Before:
Code:
(...)
Method (OSYS, 0, NotSerialized)
{
Store (0x10, Local0)
If (CondRefOf (_OSI, Local1))
{
If (_OSI ("Windows 2000"))
{
Store (0x12, Local0)
}
If (_OSI ("Windows 2001"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001.1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2001.1 SP1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2006"))
{
Store (0x15, Local0)
}
}(...)
After:
Code:
(...)
Method (OSYS, 0, NotSerialized)
{
Store (0x10, Local0)
If (CondRefOf (_OSI, Local1))
{
If (_OSI ("Windows 2000"))
{
Store (0x12, Local0)
}
If (_OSI ("Windows 2001"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001.1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2001.1 SP1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2006"))
{
Store (0x15, Local0)
}
If (_OSI ("Darwin"))
{
Store (0x15, Local0)
}
}(...)
Last edited by man_of_the_oak; 08-22-2011 at 12:26 PM.
|