- UID
- 618947
- 最后登录
- 1970-1-1
- 阅读权限
- 40
- 精华
- 主题
- 回帖
- 0
- 积分
- 611
- PB币
-
- 威望
-
- 贡献
-
- 技术
-
- 活跃
-
|
本帖最后由 P2Baby 于 2013-11-20 15:14 编辑
我的机器有限,只有一台Dell OptiPlex 3010、Dell OptiPlex 980、ThinkPad x200、ThinkPad x301和一台ThinkPad R400,我会把我在修改过程中遇到的各种错误修改方法分享给大家。
1、Must be a multiple of alignment/granularity value
DSDT中的原错误代码
- StartDependentFn (0x01, 0x01)
- {
- IO (Decode16,
- 0x03BC, // Range Minimum
- 0x03BC, // Range Maximum
- 0x08, // Alignment
- 0x08, // Length
- )
- IO (Decode16,
- 0x07BC, // Range Minimum
- 0x07BC, // Range Maximum
- 0x08, // Alignment
- 0x08, // Length
- )
- IRQNoFlags ()
- {7}
- DMA (Compatibility, NotBusMaster, Transfer8, )
- {0}
- }
- EndDependentFn ()
复制代码 修改为
- StartDependentFn (0x01, 0x01)
- {
- IO (Decode16,
- 0x03BC, // Range Minimum
- 0x03BC, // Range Maximum
- 0x01, // Alignment
- 0x08, // Length
- )
- IO (Decode16,
- 0x07BC, // Range Minimum
- 0x07BC, // Range Maximum
- 0x01, // Alignment
- 0x08, // Length
- )
- IRQNoFlags ()
- {7}
- DMA (Compatibility, NotBusMaster, Transfer8, )
- {0}
- }
- EndDependentFn ()
复制代码 解释:只需把0x08, // Alignment 修改为0x01, // Alignment
2、Result is not used, operator has no effect- Method (SX41, 0, NotSerialized)
- {
- Store (SXX2, Local0)
- Add (Local0, 0x02)
- If (LLessEqual (Local0, SizeOf (SXX0)))
- {
- CreateWordField (SXX0, SXX2, SX21)
- Store (Local0, SXX2)
- Return (SX21)
- }
- Return (Zero)
- }
复制代码 修改为
- Method (SX41, 0, NotSerialized)
- {
- Store (SXX2, Local0)
- Add (Local0, 0x02, Local0)
- If (LLessEqual (Local0, SizeOf (SXX0)))
- {
- CreateWordField (SXX0, SXX2, SX21)
- Store (Local0, SXX2)
- Return (SX21)
- }
- Return (Zero)
- }
复制代码 解释:只需把Add (Local0, 0x02)修改为 Add (Local0, 0x02, Local0) 即可
3、Invalid lrading asterisk- Device (AMW0)
- {
- Mutex (WMIX, 0x01)
- Name (_HID, "*pnp0c14")
- Name (_UID, Zero)
复制代码 修改为
- Device (AMW0)
- {
- Mutex (WMIX, 0x01)
- Name (_HID, "PNP0C14")
- Name (_UID, Zero)
复制代码 解释:只需把小写的*pnp0c14修改为全大写的PNP0C14(还要注意把*号也删掉)
4、Called method may not always return a value
- Method (LFLS, 0, NotSerialized)
- {
- Name (TMPB, Buffer (0x02)
- {
- 0x00, 0x00
- })
- CreateByteField (TMPB, 0x00, LPCT)
- CreateByteField (TMPB, 0x01, SSUM)
- TPHY (0x00)
- Store (PH02, LPCT)
- If (LPCT)
- {
- Store (0x00, SSUM)
- Add (SSUM, PH01, SSUM)
- Add (SSUM, PH02, SSUM)
- Add (SSUM, PH03, SSUM)
- Add (SSUM, PPRQ, SSUM)
- Add (SSUM, PPLO, SSUM)
- Add (SSUM, PPRP, SSUM)
- Add (SSUM, PPOR, SSUM)
- Add (SSUM, TPRS, SSUM)
- Add (SSUM, TPMV, SSUM)
- Add (SSUM, MOR, SSUM)
- Add (SSUM, RSV0, SSUM)
- If (SSUM) {}
- Else
- {
- Return (0x00)
- }
- Return (0x02)
- }
- }
复制代码 修改为
- Method (LFLS, 0, NotSerialized)
- {
- Name (TMPB, Buffer (0x02)
- {
- 0x00, 0x00
- })
- CreateByteField (TMPB, 0x00, LPCT)
- CreateByteField (TMPB, 0x01, SSUM)
- TPHY (0x00)
- Store (PH02, LPCT)
- If (LPCT)
- {
- Store (0x00, SSUM)
- Add (SSUM, PH01, SSUM)
- Add (SSUM, PH02, SSUM)
- Add (SSUM, PH03, SSUM)
- Add (SSUM, PPRQ, SSUM)
- Add (SSUM, PPLO, SSUM)
- Add (SSUM, PPRP, SSUM)
- Add (SSUM, PPOR, SSUM)
- Add (SSUM, TPRS, SSUM)
- Add (SSUM, TPMV, SSUM)
- Add (SSUM, MOR, SSUM)
- Add (SSUM, RSV0, SSUM)
- If (SSUM) {}
- Else
- {
- Return (0x00)
- }
- Return (0x02)
- }
- Return (Zero)
- /*返回一个值*/
- }
复制代码 解释:只需在整段的末尾返回一个值,即代码中的Return (Zero)
5、Effective AML package length is zero
- Name (PIC3, Package (0x00) {})
- Name (API3, Package (0x00) {})
复制代码 修改为
- Name (PIC3, Package (Zero) {})
- Name (API3, Package (Zero) {})
复制代码 解释:只需将0x00修改为Zero
6、Recursive method call (STDG)
- Method (STDG, 3, NotSerialized)
- {
- Store (Arg0, Local0)
- If (LGreaterEqual (Arg0, 0x0A))
- {
- Divide (Arg0, 0x0A, Local0, Local1)
- Store (STDG (Local1, Arg1, Arg2), Arg2)
- }
- Add (Local0, 0x30, Local0)
- Store (Local0, Index (Arg1, Arg2))
- Increment (Arg2)
- Return (Arg2)
- }
复制代码 修改为
- Method (STDG, 3, NotSerialized)
- {
- Store (Arg0, Local0)
- If (LGreaterEqual (Arg0, 0x0A))
- {
- Divide (Arg0, 0x0A, Local0, Local1)
- Store (STDG (Local1, Arg1, Arg2), Arg2)
- }
- Add (Local0, 0x30, Local0)
- Increment (Arg2)
- Return (Arg2)
- }
复制代码 解释:将原文中的Store (Local0, Index (Arg1, Arg2))删除
7、ResourceTag larger than Field (Tag 64 bits, Field 8 bits) 注意注意啦:此处是Field 8 bit ,不是16bit或32bit
- CreateByteField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN)
复制代码 修改为- CreateQWordField (BUF0, \_SB.PCI0._Y0F._LEN, MSLN)
复制代码 解释:其实大家只需要注意错误中的Tag Bits是多少即可,如果Tag 64 bits,那就将Field中的CreateByteField修改为CreateQWordField,如果是32 Bits,那就修改为CreateDWordField,如果是16Bits,那就修改为CreateDWordField,如果是8bits,那就修改为CreateByteField。
普及姿势:Byte = 8, Word = 16, DWord = 32, QWord = 64.
8、Object does not exist (LNKA)
- Package (0x04)
- {
- 0xFFFF,
- Zero,
- LNKA,
- Zero
- },
复制代码 在整个aml文件开头添加External (LNKA)
- DefinitionBlock ("dsdt.aml", "DSDT", 2, "5442B", "5442B170", 0x00000170)
- {
- External (LNKA)
复制代码 解释:在整个aml文件开头的大括号 { 后面添加External (LNKA),由几个就添加几个,像我的Dell C6100服务器主板就添加了LNKA、LNKB、LNKC、LNKD、LNKE和LNKH
9、_HID suffix must be all hex digits (I000)
- Scope (_SB)
- {
- Device (AC)
- {
- Name (_HID, "ACPI000")
- Name (_PCL, Package (0x01)
- {
- BAT0
- })
- Method (_PSR, 0, NotSerialized)
- {
- And (MIS0, One, Local0)
- Return (Local0)
- }
- Method (_STA, 0, NotSerialized)
- {
- Return (0x0F)
- }
- }
- }
复制代码 修改为
- Scope (_SB)
- {
- Device (AC)
- {
- Name (_HID, "ACPI0000")
- Name (_PCL, Package (0x01)
- {
- BAT0
- })
- Method (_PSR, 0, NotSerialized)
- {
- And (MIS0, One, Local0)
- Return (Local0)
- }
- Method (_STA, 0, NotSerialized)
- {
- Return (0x0F)
- }
- }
- }
复制代码
10、Object is not accessible from this scope (ATT3)- Method (_CRS, 0, NotSerialized)
- {
- Return (ATT3)
- }
复制代码
修改为
- Method (_CRS, 0, NotSerialized)
- {
- Return (BUF0)
- }
复制代码
|
评分
-
3
查看全部评分
-
|