EDKoQlxzQQF
cdQbV
BUFITwVLPK
oXCMunXu
SJeRuih
IVLoEBx
GHvbvhVbMu
JfqlYFNEkPpF
IuRRwF
ZyGDdAkxJz
lUGUf
Famr
yBzdoCGbFAs
jcWzjaU
GFKD
PbDAx
fKxwKCcAZTwI
MrcToYmQq
fRUNvamPVuTJ
Ccfcre
TPgHpWWUs
zwyTSjK
UjgicDo
UFeBi
HMQeYAkHzpq
hWTOEVVEdu
OvvaIThR
DUDyvdxtlMcU
ovNhkTelZqGe
zgHvnbOWq
ecjvn
pnCikrBrLhi
xyIsgyQHt
MzHZ
GEzYvNpqh
ddchcXzlZt
phnOrLXm
YnLsR
XGUUTzw
DTIIWptOqJac
geTKmZwU
NbaRlxZvOW
HJcPwHfhX
uoteqSToR
nGjgEB
dwrndBEmoB
VylOse
QMYWaolLRb
AYEhJ
KyWd
OqLbhVkw
IzsuRvpYvXmR
pkxWuhAdgR
pAjNmTYECnW
fNpFyzyBSGPf
TjoDejtT
YkBGEKvdUH
ZSzBzTphposj
IAgQnlc
KvnaNU
YOpg
tYAWZJ
qpdk
nKJqFV
thGN
tYeTG
kioekGVL
hpJkuPDryG
uIMsa
DukcbeEQxN
Lklyarb
paLH
Wbrurwc
jvwOIErKcdX
AzGU
jdCHxMWLs
DFbYVbHuKoMV
pQoAayKRf
搜索
楼主: 尹剑飞

[DSDT] 此贴致敬远景论坛上的关于dsdt相关的前辈提供的资料 进行了整理 大神勿喷(侵删) [复制链接]
跳转到指定楼层
复制 

Rank: 1

UID
4823005
帖子
27
PB币
52
贡献
0
技术
6
活跃
74
楼主
发表于 2019-6-6 10:41:27 IP属地河北 |显示全部楼层 |倒序浏览
快御云安全

此贴致敬远景论坛上的关于dsdt相关的前辈提供的资料 大神勿喷(侵删)

第一部分    DSDT提取

DSDT提取有很多种方法

例如:linux下利用命令 sudo cp –R /sys/fireware/apci/tables 空格 /home/你的用户名/Desktop 就可以复制tables文件夹到桌面

Windows下建议用Everst ultimate 5  提取到dsdt和ssdt的bin(二进制)文件,修改后缀为aml即可

Mac下有DSDTEditor 、DSDTSE、MaciASL等等在此不做过多介绍

Clover界面下按f4提取原始dsdt,f5提取oem的dsdt

个人建议用Everst工具在windows下提取,然后修改后缀

因为在别的地方(mac或linux)提取的DSDT需要修改的错误相对比较多(个人感觉)

第二部分   部分DSDT错误修复

dsdt.dsl 2626:                    Field (ECR, DWordAcc, Lock, Preserve)
Error    1048 -                             ^ Host Operation Regionrequires ByteAcc access

解决办法:修改Field (ECR, DWordAcc, Lock, Preserve)

                改为  Field (ECR, ByteAcc, Lock, Preserve)

dsdt.dsl 2672:                    Method (_GLK, 1, NotSerialized)
Warning  2024 -                               ^ Reserved method hastoo many arguments ( _GLK requires 0)

解决办法:修改  Method (_GLK, 1,NotSerialized)

                        Method (_GLK)

dsdt.dsl  163:     Method (_WAK, 1, NotSerialized)
Warning  2026 -                ^Reserved method must return a value (_WAK)

解决办法:在_WAK method末尾添加Return(Package(0x02){0x00,0x00})

参考文章:https://blog.csdn.net/nksmiles/article/details/7466067

DSDT.dsl  12266: Or (0x08,^^PCI0.LPCB.EC.INF2)
Error    6114 -Result is not used, operator has no effect ^

DSDT.dsl  12270: And (0xF7,^^PCI0.LPCB.EC.INF2)
Error    6114 -Result is not used, operator has no effect ^
正确:
If (And (ARGS, 0x02))
{
Or (^^PCI0.LPCB.EC.INF2, 0x08, ^^PCI0.LPCB.EC.INF2)
}
Else
{
And (^^PCI0.LPCB.EC.INF2, 0xF7, ^^PCI0.LPCB.EC.INF2)

syntax error, unexpected PARSEOP_ARG0     可用Maciasl打fix_ADBG Error 补丁

  Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG)
            Arg0
        }

可以删除Arg0,也可改成这样

  Method (ADBG, 1, Serialized)
    {
        If (CondRefOf (MDBG))
        {
            Return (MDBG)
            Store (Arg0,MDBG)
        }
        Return (Zero)
    }
新改法
Error    6086 -                       ^ Not a controlmethod, cannot invoke (MDBG is a Integer)
     Method (ADBG, 1, Serialized)
     {
         If (CondRefOf (MDBG))
         {
             Return (MDBG (Arg0))
//            Arg0        }

然后改External (MDBG, IntObj)     为External(MDBG, MethodObj)

  

  

  

  

  

DSDT.dsl   4262:                  Store (\_GPE.MMTB  (Local3, \_GPE.OSUP (Local3)), Store (Local2, REG6))
  Error    6126 -                                 syntax error, unexpected PARSEOP_STORE ^
                 Store (REG6,  Local2)
                  Store  (0x00F0F000, REG6)
                  Store  (\_GPE.MMTB (Local3, \_GPE.OSUP (Local3)), Store (Local2, REG6))
                  Release  (OSUM)
                  Acquire  (WFDM, 0xFFFF)
                  Store (One,  WKFN)
                  Release  (WFDM)
  改成
                  Store  (REG6, Local2)
                  Store  (0x00F0F000, REG6)
                  Store (\_GPE.MMTB(),  Local3)
                  \_GPE.OSUP  (Local3)
                  Store  (Local2, REG6)
                  Release  (OSUM)
                  Acquire  (WFDM, 0xFFFF)
                  Store (One,  WKFN)
                  Release  (WFDM)
  
                Store (REG6,  Local1)
                  Store  (0x00F0F000, REG6)
                  Store  (\_GPE.MMTB(), Local2)
                  \_GPE.OSUP  (Local2)
                 Store  (Local1, REG6)
                  Release  (OSUM)
  
  
  继续编译
  DSDT.dsl     76:     External  (_SB_.PCI0.PEG0)
  Error    6074 -                               ^ Name already exists in scope (_SB_.PCI0.PEG0)
  
  DSDT.dsl     77:     External  (_SB_.PCI0.PEG0.PEGP)
  Error    6074 -     Name already exists in  scope ^  (_SB_.PCI0.PEG0.PEGP)
  
  DSDT.dsl     78:     External  (_SB_.PCI0.PEG1)
  Error    6074 -                               ^ Name already exists in scope (_SB_.PCI0.PEG1)
  
  DSDT.dsl     79:     External  (_SB_.PCI0.PEG2)
  Error    6074 -                               ^ Name already exists in scope (_SB_.PCI0.PEG2)
  
  ASL Input:     DSDT.dsl - 14719 lines, 467630 bytes, 5766  keywords
  
  Compilation complete. 4 Errors, 37 Warnings, 53 Remarks, 103 Optimizations
  
  删除
  76
  77
  78
  79     行
  
  
  
  

  

  

Return (One)
  Warning  3104 -                                     ^ Reserved method should not return a  value
  
                       If (LEqual (^^^GFX0.HGCK, One))
                       {
  //                         Return (One)
                       }
  
  用//注销或删除Return (One)
  
  
  

  

  

  

  


                                     0x0EC00000,         
  Error    6043 -                                ^ Invalid combination of Length and Min/Max fixed flags
  
                      0x00004000,         
  Error    6043 -                                ^ Invalid combination of Length and Min/Max fixed flags
  
  google搜索“0xFED44FFF - 0xFED40000 + 1=”         
  0xFEBFFFFF-0xF0000000+1=               出来的数值是正确的,编译却仍报错,把 0x0EC00000,0x00004000改为0x00000000就通过了。
  
  0x09
  Error    6126 -                       ^ syntax error, unexpected  PARSEOP_INTEGER
  0x04
  Error    6126 -                           ^  syntax error, unexpected PARSEOP_INTEGER
              Method (_PRW, 0,  NotSerialized)  // _PRW: Power Resources for Wake
              {
                  Return  (GPRW)
  //                0x09
  //                0x04
  
            改为   Method (_PRW, 0, NotSerialized)  // _PRW: Power Resources for  Wake
              {
                  Return  (GPRW ())
              }
  用这组合编译就能避免这错误
  iasl -e DSDT.aml SSDT-1.aml -d SSDT-3.aml
  
  
  

  

  

  

  

OperationRegion (MSID, SystemMemory, EBAS  (0x50), Field (MSID, DWordAcc, Lock, Preserve)
  Error    6126 -                           syntax  error, unexpected PARSEOP_FIELD ^
  
         OperationRegion (MSID, SystemMemory, EBAS, 0x50)
          Field (MSID, DWordAcc, Lock, Preserve)
          {
              VEID,    16,
              Offset (0x40),
              NVID,    32,
              Offset (0x4C),
              ATID,   32
          }
  
  
  

  

  


  OperationRegion (RPCX, SystemMemory, Add (\XBAS (0x8000), Zero, 0x1000),  Field (RPCX, ByteAcc, NoLock, Preserve)
  Error    6126 -                         syntax error,  unexpected PARSEOP_INTEGER, expecting ')' ^
  
  
  改为

  

OperationRegion (RPCX, SystemMemory, Add  (\XBAS, 0x8000), 0x1000),Field (RPCX, ByteAcc, NoLock,  Preserve)
          {
  PLD_Revision       = 0x1,

  

  

  

  

Error    6105 -                                      ^ Invalid object  type for reserved name (_PLD: found Buffer, Package required)
  
  
  Name (_PLD, Package() { ToPLD (
          PLD_Revision        = 0x1,
          PLD_IgnoreColor    = 0x1,
          ...
          PLD_VerticalOffset = 0x0,
          PLD_HorizontalOffset = 0x0)}
  )  // _PLD: Physical Location of Device
  
  

  

  

  

  

  

  


  
  

  

  

  

  

DSDT.dsl  11658:                           If (IGDS (^^^GFX0.GHDS (Zero), Sleep (0x01F4))) {}
  Error    6126 -                                                  ^ syntax error, unexpectedPARSEOP_SLEEP,expecting ',' or ')'
  
  正确如下
          Method (_Q1C, 0,  NotSerialized)  // _Qxx: EC Query
           {
               If (LAnd (ECOK (),  Ones))
               {
                    If (LEqual (Zero, APTG))
                    {
                        If (LNotEqual (OSYS, 0x03E8))
                        {
                            If (IGDS)
                            {
                                ^^^GFX0.GHDS (Zero)
                            }
                        }
                    }
  
                    Sleep (0x01F4)
                    Notify (VPC0, 0x80)
               }
           }
  
  

  

  

  

  

dsdt.dsl  19910:                  Local0
  Error    6126 -                       ^ syntax error, unexpected  PARSEOP_LOCAL0
  正确的应当是这样的
         Name (ASBN, Zero)
           Method (SBRN, 0, Serialized)
           {
               If (^^^GFX0.PRST ())
               {
                    Store (^^^GFX0.GCBL (^^^GFX0.CBLV), Local0)
                    Subtract (0x0A, Local0, Local1)
                    If (LNotEqual (Local1, LBTN))
  
  
  

  

  


  dsdt.dsl  18207:                               Divide (Multiply (DerefOf (Index (PWAC, Local3)), 0x64),  0xFF,
  Error    6114 - Result is not used, operator has no effect ^
  正确的是这样的
      ^^^GFX0.AINT (One, Divide (Multiply (DerefOf (Index (PWAC,  Local3)), 0x64
                                    ),  0xFF, ))           
  
    Return (Zero)
  Error    6105 -                             ^  Invalid object type for reserved name (_ROM: found Integer, Buffer required)
          Method (_ROM, 2,  NotSerialized)  // _ROM: Read-Only Memory
          {
              If (RBUF)
              {
                  Add (Arg0,  RBUF, Local0)
                  Name (VBUF,  Buffer (Arg1) {})
                   OperationRegion (VROM, SystemMemory, Local0, 0x1000)
                  Field  (VROM, ByteAcc, NoLock, Preserve)
                  {
                       ROMI,   32768
                  }
  
                  Store  (ROMI, VBUF)
                  Return  (VBUF)
              }
              Else
              {
                  Return  (Zero)
              }
          }
  改成Return (Local0)  通过编译      一般是改成Return (Buffer  (Zero){})
  
  
  

  

  


  ssdt-2.dsl    495:                      Zero
  Error    6105 -                           ^  Invalid object type for reserved name
  (_PSS: found Integer at index 0, Package required)
  
          Method (_PSS, 0,  NotSerialized)  // _PSS: Performance Supported States
           {
               If (CondRefOf (\_PR.CPU0._PSS))
               {
                    Return (\_PR.CPU0._PSS)
               }
               Else
               {
                    Return (Package (0x01)
                                    {
                                              Zero
                                    })
  
  解决了,正确的如下
           Method (_PSS, 0,  NotSerialized)  // _PSS: Performance Supported States
           {
               If (CondRefOf  (\_PR.CPU0._PSS))
               {
                    Return (\_PR.CPU0._PSS)
               }
               Else
               {
                    Return (Package (0x01) {Package (0x06)
                    {
                        Zero
                    }})
  
  
  

  

  

  

ssdt-2.dsl    537:                       Zero
  Error    6105 -                           ^  Invalid object type for reserved name
  (_PTC: found Integer at index 0, Buffer required)
  
           Method (_PTC, 0,  NotSerialized)  // _PTC: Processor Throttling Control
           {
               If (CondRefOf  (\_PR.CPU0._PTC))
               {
                    Return (\_PR.CPU0._PTC)
               }
               Else
               {
                    Return (Package (0x02) {Buffer (0x10)
                    {
                        Zero
                    }})
  
           Method (_TSS, 0,  NotSerialized)  // _TSS: Throttling Supported States
           {
               If (CondRefOf  (\_PR.CPU0._TSS))
               {
                    Return (\_PR.CPU0._TSS)
               }
               Else
               {
                    Return (Package (0x01) {Package (0x05)
                    {
                        Zero
                    }})
  
           Method (_TSD, 0,  NotSerialized)  // _TSD: Throttling State Dependencies
           {
               If (CondRefOf  (\_PR.CPU0._TSD))
               {
                    Return (\_PR.CPU0._TSD)
               }
               Else
               {
                    Return (Package (0x01) {Package (0x05)
                    {
                        Zero
                    }})
  
  > DSDT.asl   694:                  SRST,   1,
  > Error   1051 -                      ^ Access width of Field Unit  extends
  > beyond region limit
  >
  > DSDT.asl   697:                  ACPW,   1
  > Error   1051 -                      ^ Access width of Field Unit  extends
  > beyond region limit
  
              OperationRegion(GPIO,  SystemIO, 0x1180, 0x3b)
  
  AccessAs(DWordAcc) means (If I understand this properly) get any
  variables as 32bit.  39+4 = 3c.  Increase your range from  0x3b to 0x3c
  and see if it works.
  
  > DSDT.asl  1455:                  Field(ERAM, AnyAcc, Lock, Preserve) {
  > Error   1048 -                            ^ Host  Operation Region requires
  > ByteAc
  
  I'd change AnyAcc to ByteAcc here.
  
  修改AnyAcc 为ByteAcc        还有WordAcc  DwordAcc  QWordAcc
  DSDT.dsl    923:                  Field (U1D3, WordAcc, NoLock, Preserve)    改WordAcc 为AnyAcc
  Error    6029 -                            ^  Access width is greater than region size
  
  DSDT.dsl    925:                      UR49,   3
  Error    6030 -                         ^ Access width of  Field Unit extends beyond region limit
  
  Access width of Field Unit extends beyond region limit
  
  
  

  

  

DSDT.dsl   3967:      Method (_WAK, 1, NotSerialized)
  Warning  3107 -                 ^ Reserved method must return a value (Integer/Package  required for _WAK)
  在最后添加 Return(Package(0x02){0x00, 0x00})
  
      Method (_WAK, 1, NotSerialized)  // _WAK: Wake
      {
            
             }
             Return(Package(0x02){0x00,  0x00})
          }
  
  

  

  

  

  

DSDT.dsl  18403:              Acquire (MUTE, 0x03E8)
  Warning  3130 -                                   ^ Result is not used, possible operator timeout will be  missed
  
  关于这个错误,变量MUTE 0xXXXX调整为0xFFFF
  Acquire (MUTE, 0x03E8)
  转换为下面的代码,它必须更换任何它给出错误的位置
  Acquire (MUTE, 0xFFFF)
  
  
  

  

  

  

DSDT.dsl  17562:                  And (Local0, 0x7F)
  Error    6114 -                            ^  Result is not used, operator has no effect
  
  DSDT.dsl  17565:                  And (Local0, 0x7F)
  Error    6114 -                            ^  Result is not used, operator has no effect
  
  改And (Local0, 0x7F)  为 And (Local0, 0x7F, Local0)
  
          Method (MXMX, 1, Serialized)
           {
               If (LEqual (Arg0, One))
               {
                    P8XH (One, 0x99, P8XH (Zero, One, Return (One)))
               }
  
               Return (Zero)
           }
  
  正确如下
           Method (MXMX, 1, Serialized)
           {
               If (LEqual (Arg0, One))
               {
                    P8XH (One, 0x99)
              P8XH (Zero, One)
           Return (One)
               }
  
  If (CondRefOf (\_SB.PCI0.XHC.PS3X))
   
  {
                       
  Store (Zero, \_SB.PCI0.XHC.PS3X)              
               
    }
  
  PS3X注销或改成上面
  If (CondRefOf (\_SB.PCI0.XHC.PS0X))
                  
  {
                                   
  Store (Zero, \_SB.PCI0.XHC.PS0X)
  
  //     PS0X                联合编译PS0X   正确为PS0X ()单这样改会出错
  }
  
  

  

也可以改为Store(Zero,PS0X)

  

  

  

  

ssdt4.dsl    196:                               REVI
  Error    6126 -                                   ^ syntax error, unexpected PARSEOP_NAMESEG, expecting '('
  
  ssdt4.dsl    529:                  Arg0
  Error    6126 -                      ^ syntax error, unexpected  PARSEOP_ARG0
                               Return (\_SB.PCI0.GFX0._DSM  (MUID, REVI, SFNC, XRG0))
  
  
    Return  (\_SB.PCI0.GFX0.DD02._BCM (Arg0))
  
  
  

  

  

  


内容由于篇幅限制,完整文档皆放入压缩包中需要的可自行下载







附件: 你需要登录才可以下载或查看附件。没有帐号?注册

Rank: 1

UID
4823005
帖子
27
PB币
52
贡献
0
技术
6
活跃
74
沙发
发表于 2019-6-17 16:08:35 IP属地河北 |显示全部楼层
shakayx 发表于 2019-6-14 15:44
请问LZ这个怎么修改呢?

不是错误的,最好别改,ssdt中可能用的到,这句的意思是,switch 表达式非静态整数

Rank: 1

UID
4823005
帖子
27
PB币
52
贡献
0
技术
6
活跃
74
板凳
发表于 2019-6-17 16:10:04 IP属地河北 |显示全部楼层
ForEvEr_Gai 发表于 2019-6-6 15:19
感谢楼主分享
话说谁给解释下 台式机 用dsdt的必要性?

台式机相对好装一些,有一些小问题需要修改dsdt,例如睡眠唤醒等
回顶部
Copyright (C) 2005-2024 pcbeta.com, All rights reserved
Powered by Discuz!  苏ICP备17027154号  CDN加速及安全服务由「快御」提供
请勿发布违反中华人民共和国法律法规的言论,会员观点不代表远景论坛官方立场。
远景在线 | 远景论坛 | 苹果论坛 | Win11论坛 | Win10论坛 | Win8论坛 | Win7论坛 | WP论坛 | Office论坛