1.dsdt.dsl 330: Method (_CST, 0, NotSerialized)
Warning 1087 - ^ Not all control paths return a value (_CST)
dsdt.dsl 330: Method (_CST, 0, NotSerialized)
Warning 1080 - ^ Reserved method must return a value (_CST)
这种类型的问题就需要在Method这个函数的根括号下加上Return(Zero)
2.dsdt.dsl 9048: Method (_GTF, 0, NotSerialized)
Warning 1087 - ^ Not all control paths return a value (_GTF)
dsdt.dsl 9048: Method (_GTF, 0, NotSerialized)
Warning 1080 - ^ Reserved method must return a value (_GTF)
这种类型的问题需要在Method这个函数的根目录下加上:
Else
{
Return (Zero)
}
Return (Zero)
3.dsdt.dsl 9850: Method (_GTM, 0, NotSerialized)
Warning 1087 - ^ Not all control paths return a value (_GTM)
dsdt.dsl 9850: Method (_GTM, 0, NotSerialized)
Warning 1080 - ^ Reserved method must return a value (_GTM)
这种类型的问题同上
9.Reserved method has too few arguments
例:dsdt.dsl 3067: Method (_EJ0, 0, NotSerialized)
Warning 1076 - ^ Reserved method has too few arguments (_EJ0 requires 1)
这种错误通过调整解决:
Method (_EJ0, 0, NotSerialized)
改成:
Method (_EJ0, 1, NotSerialized)
10.Reserved method must return a value (_PSR)
例:dsdt.dsl 3896: Method (_PSR, 0, NotSerialized)
Warning 1079 - ^ Reserved method must return a value (_PSR)这里的问题是,这是没有检测到的变化,从电池/ ACPI规范AC.Extracted:
11.3.1 PSR (Power Source)
Returns the current power source devices. Used for the AC adapter and is located under the AC adapter
object in name space. Used to determine if system is running off the AC adapter.
Arguments:
None
Result Code:
0x00000000 – Off-line
0x00000001 – On-line
这是错误的代码:
Method (_PSR, 0, NotSerialized)
{
If (\_SB.PCI0.PIB.EC.ECOK)
{
Return (\_SB.PCI0.PIB.EC.ADP)
}
}
12.Reserved method must return a value (_STA)
例:Method (_STA, 0, NotSerialized)
Warning 2026 - ^ Reserved method must return a value (_STA)
下面是原始代码:
Method (_STA, 0, NotSerialized)
{
STAL (0x60)
}
需要改成:
Method (_STA, 0, NotSerialized)
{
Return (STAL (0x60))
}
13.Result is not used, operator has no effect ^
例: dsdt.dsl 10150: ShiftRight (BUF2, 0x04)
Warning 1105 - Result is not used, operator has no effect ^因为"Shiftright"不存储任何值,将产生错误:
原语句:
.....
Store (AAXB, MBUF)
ShiftRight (BUF2, 0x04) < ------- Error.
Store (BUF2, Local3)
Store (CMER, BUF0)
Store (0xFF, BUF1)
Store (Zero, BUF2)
.....
需要调整为: Store (BUF2, Local4)
修改后:
Store (AAXB, MBUF)
Store (BUF2, Local4) <------- Here.
Store (BUF2, Local3)
Store (CMER, BUF0)
Store (0xFF, BUF1)
Store (Zero, BUF2)
14.Warning 1099 -Unknown reserved name ^ (_BCG)
这个原因是编译器在解释编译的时候遇到了一个特殊的字符。不能识别,下面是例子:
Method (_BCG, 0, Serialized)
{
Store (C136, Local0)
Return (Local0)
}
}
只需要将_BCG改成BCG编译
修改后:
Method (BCG, 0, Serialized)
{
Store (C136, Local0)
Return (Local0)
}
}