发布过一篇旧帖子,此贴只是修改原贴的排版和界面,关键内容一模一样(原贴在浏览器暗黑模式下编辑的,出现了大黑块,影响阅读,不及格呵呵),请善用搜索. 首先,说明一下,我的电脑型号是联想小新锐7000 i5-7300HQ, 我针对的是这个机型并修复的所有红色错误Errors和黄色警告Warnings(强迫症警告).其次,我已经弄好DSDT很久了,应该是在2018年内,现在发的是以前的笔记,所以只能列出我遇到的问题代码和解决方案,当然这是我自己总结过的方法,并不能保证每一个现在也同样适用.在着手修复DSDT前,请一定要将相应的工具升级到最新版,最好顺便用较新版本的Clover提取DSDT,这可以避免很多问题.时间关系,我没有区分Errors和Warnings,索性一起发了.
++++++++++++++++++++++++++++++++++ 1088, Not all control paths return a value () ##在出现该问题的Method最后的括号内加上Return(Zero) ##add Return(Zero) at the end
Method (THDS, 1, Serialized) { If (LNot (THEN ())) { Return(Zero) } ...... Store (Zero, DO30) Return (Zero) }
++++++++++++++++++++++++++++++++++ 4057, Name already exists in scope () ##提示已经存在,故注销此行 ##Block it
//BNUM, 8,
++++++++++++++++++++++++++++++++++ 4064, Object does not exist () ##在最前面的DefinitionBlock之中加上相应的External()项 ##add External()
DefinitionBlock ("", "DSDT", 2,"LENOVO", "SKL ",0x00000000) { External (PICM) External (NHPG) ...... }
++++++++++++++++++++++++++++++++++ 4066, Not a control method, cannot invoke ( is a Untyped) ##对应报错项添加MethodObj即可 ##add ",MethodObj"
DefinitionBlock ("", "DSDT", 2,"LENOVO", "SKL ",0x00000000) { External (PICM) External(NHPG,MethodObj) External(NPME,MethodObj) ...... }
++++++++++++++++++++++++++++++++++ 13143, 4065, Object not found or not accessible from scope () ##类似的,按正确格式加上External()项,注意有MethodObj,例如 ##add External(),such as ##13143, 4065, Object not found or not accessible from scope (^^GEXP.SGEP)
External(_SB_.PCI0.GEXP.SGEP, MethodObj)
++++++++++++++++++++++++++++++++++ Method Local is set but never used () ##提示没有使用,那就加个空的if语句,避免报错,例如 ##add if(){} to avoid it,such as ##Method Local is set but never used (Local7)
if(Local7){}
++++++++++++++++++++++++++++++++++ Switch expression is not a static Integer/Buffer/String data type,defaulting to Integer ##数据格式有误,改成匹配的格式,例如 ##not a static data type, defaulting to Integer
Switch(ToInteger(PSH0))
++++++++++++++++++++++++++++++++++ syntax error, unexpected _onekind ##将单独的那个语句返回,例如 ##There is only OLDV,return it,such as
Return (OLDV)
++++++++++++++++++++++++++++++++++ Unknown reserved name (_) ##删除方法名称里的横杠,例如 ##delete "_", such as ##Method (_CFG, 0, NotSerialized)
Method(CFG, 0, NotSerialized)
++++++++++++++++++++++++++++++++++
到这里,我的DSDT就修复完了,就这几个,没想到吧~ 最后我在笔记里还发现了,我曾经记录的几个修复DSDT的链接,他们肯定给我提供了很多帮助,感谢他们,都是很优秀的文章,不过现在没有细看了,索性发出来,你们也可以通过下面的链接多多尝试
https://bbs.pcbeta.com/viewthread-748485-1-1.html
https://bbs.pcbeta.com/viewthread-1277786-1-1.html
https://www.douban.com/note/539866675/
|