mocl1220 发表于 2019-7-29 15:40

SSDT-RMCF.dsl 中参数的设置

(一下所采用的dsl文件均来自于R大的hotpatch,详见:https://github.com/RehabMan/OS-X-Clover-Laptop-Config)
带有bit 的设置比较容易弄错,其他的直接按照说明输入0或1即可
比如:
       // SHUT: Shutdown fix, disable _PTS code when Arg0==5 (shutdown)
      //
      //0: does not affect _PTS behavior during shutdown
      //bit 0 set: disables _PTS code during shutdown
      //bit 1 set: sets SLPE to zero in _PTS during shutdown
      Name(SHUT, 0)

若只输入0或1,有时不起效果。

一个byte由8个bit组成,书写时应该是 bit7---bit1,比如上面的shut如果设置的话应该是
bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0   0      0    0      0    0      1    0
即二进制是 00000010转化为十六进制为   0x02
所以上面的设置应该是Name(SHUT, 0x02), 如果是 Name(SHUT, 1) 会关机不断电的

再比如:
      // BKLT: Backlight control type
      //
      // bit0=0: Using IntelBacklight.kext
      // bit0=1: Using AppleBacklight.kext + AppleBacklightInjector.kext or AppleBacklightFixup.kext
      // bit1=1: do not set LEVW
      // bit2=1: set GRAN
      // bit3=1: prevent PWM initialization (eg. don't set PWMMax/PWMDuty)
      Name(BKLT, 1)

bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0
0   0      0    0      0    1      0    1
即使用Using AppleBacklight.kext + AppleBacklightInjector.kext or AppleBacklightFixup.kext、设置LEVW、设置GRAN
二进制是00000101,转为十六进制为0x05
所以Name(BKLT, 0x05)


以上为本人摸索的不知道对不对,我的SSDT-RMCF.dsl配置如下:

// configuration data for other SSDTs in this pack

#ifndef NO_DEFINITIONBLOCK
DefinitionBlock("", "SSDT", 2, "hack", "_RMCF", 0)
{
#endif
    Device(RMCF)
    {
      Name(_ADR, 0)   // do not remove

      Method(HELP)
      {
            Store("TYPE indicates type of the computer. 0: desktop, 1: laptop", Debug)
            Store("HIGH selects display type. 1: high resolution, 2: low resolution", Debug)
            Store("IGPI overrides ig-platform-id or snb-platform-id", Debug)
            Store("DPTS for laptops only. 1: enables/disables DGPU in _WAK/_PTS", Debug)
            Store("SHUT enables shutdown fix. bit 0: disables _PTS code when Arg0==5, bit 1: SLPE=0 when Arg0==5", Debug)
            Store("XPEE enables XHC.PMEE fix. 1: set XHC.PMEE to zero in _PTS when Arg0==5", Debug)
            Store("SSTF enables _SST LED fix. 1: enables _SI._SST in _WAK when Arg0 == 3", Debug)
            Store("AUDL indicates audio layout-id for patched AppleHDA. Ones: no injection", Debug)
            Store("BKLT indicates the type of backlight control. 0: IntelBacklight, 1: AppleBacklight", Debug)
            Store("LMAX indicates max for IGPU PWM backlight. Ones: Use default, other values must match framebuffer", Debug)
      }

      // TYPE: Indicates the type of computer... desktop or laptop
      //
      //0: desktop
      //1: laptop
      Name(TYPE, 1)

      // HIGH: High resolution/low resolution selection.Affects IGPU injection.
      //
      // For 1600x900+ on Sandy/Ivy, use 1
      // For UHD/QHD+ on Haswell/Broadwell, use 1
      // Others (low resolution), use 0
      Name(HIGH, 1)

      // IGPI: Override for ig-platform-id (or snb-platform-id).
      // Will be used if non-zero, and not Ones
      // Can be set to Ones to disable IGPU injection.
      // For example, if you wanted to inject a bogus id, 0x12345678
      //    Name(IGPI, 0x12345678)
      // Or to disable, IGPU injection from SSDT-IGPU:
      //    Name(IGPI, Ones)
      // Or to set a custom ig-platform-id, example:
      //    Name(IGPI, 0x01660008)
      Name(IGPI, Ones)
//我的显卡声卡均用hackintool修改 property完成,所以不用注入IGPU,教程详见:黑果小兵博客https://blog.daliansky.net/Intel-FB-Patcher-tutorial-and-insertion-pose.html

      // DPTS: For laptops only: set to 1 if you want to enable and
      //disable the DGPU _PTS and _WAK.
      //
      //0: does not manipulate the DGPU in _WAK and _PTS
      //1: disables the DGPU in _WAK and enables it in _PTS
      Name(DPTS, 1)

      // SHUT: Shutdown fix, disable _PTS code when Arg0==5 (shutdown)
      //
      //0: does not affect _PTS behavior during shutdown
      //bit 0 set: disables _PTS code during shutdown
      //bit 1 set: sets SLPE to zero in _PTS during shutdown
      Name(SHUT, 0x02)

      // XPEE: XHC.PMEE fix, set XHC.PMEE=0 in _PTS when Arg0==5 (shutdown)
      // This fixes "auto restart" after shutdown when USB devices are plugged into XHC on
      // certain computers.
      //
      // 0: does not affect _PTS behavior during shutdown
      // 1: sets XHC.PMEE in _PTS code during shutdown
      Name(XPEE, 1)

      // SSTF: _SI._SST fix.To fix LED on wake.Useful for some Thinkpad laptops.
      //
      // 0: no effect during _WAK
      // 1: calls _SI._SST(1) during _WAK when Arg0 == 3 (waking from S3 sleep)
      Name(SSTF, 1)

      // AUDL: Audio Layout
      //
      // The value here will be used to inject layout-id for HDEF and HDAU
      // If set to Ones, no audio injection will be done.
      Name(AUDL, Ones)
//我的显卡声卡均用hackintool修改 property完成,所以不用注入AUDL

      // DAUD: Digital audio
      //
      // 0: "hda-gfx" is disabled, injected as "#hda-gfx" instead
      // 1: (default when not specified) "hda-gfx" is injected
      Name(DAUD, 0)

      // BKLT: Backlight control type
      //
      // bit0=0: Using IntelBacklight.kext
      // bit0=1: Using AppleBacklight.kext + AppleBacklightInjector.kext or AppleBacklightFixup.kext
      // bit1=1: do not set LEVW
      // bit2=1: set GRAN
      // bit3=1: prevent PWM initialization (eg. don't set PWMMax/PWMDuty)
      Name(BKLT, 0x05)

      // LMAX: Backlight PWM MAX.Must match framebuffer in use.
      //
      // Ones: Default will be used (0x710 for Ivy/Sandy, 0xad9 for Haswell/Broadwell)
      // Other values: must match framebuffer
      Name(LMAX, 0x56c)
//详见SSDT-PNLF.dsl:16: Skylake/KabyLake 0x56c (and some Haswell, example 0xa2e0008),我的cpu是KabyLake,所以选0x56c

      // LEVW: Initialization value for LEVW.
      //
      // Ones: Default will be used (0xC0000000)
      // Other values: determines value to be used
      Name(LEVW, Ones)
//默认即可

      // GRAN: Initialization value for GRAN.
      //
      // Note: value not set for GRAN unless bit2 of BKLT set
      Name(GRAN, 0xC2000)
//详见SSDT-PNLF.dsl: 2. Set granularity in 0xC2000 bit 0 (0 = 16, 1 = 128).

      // FBTP: Framebuffer type. Determines IGPU PWM register layout.
      //(advanced use: for overriding default for unsupported IGPU device-id)
      //
      // 0: Default based on device-id
      // 1: Ivy/Sandy
      // 2: Haswell/Broadwell/Skylake/KabyLake
      Name(FBTP, 2)

      // DWOU: Disable wake on USB
      // 1: Disable wake on USB
      // 0: Do not disable wake on USB
      Name(DWOU, 1)
    }
#ifndef NO_DEFINITIONBLOCK
}
#endif
//EOF

y04551b 发表于 2019-7-30 00:26

干什么的这个是

mocl1220 发表于 2019-8-8 17:40

y04551b 发表于 2019-7-30 00:26
干什么的这个是

hotpatch里面的一个ssdt用于设置各种参数的,可以搜索rehabman的github ,里面有完整的dsl文件,编译好后放在clover/acpi/patched里,比修改dsdt方便很多

lucifer1990 发表于 2020-3-7 20:49

谢谢楼主分享!
页: [1]
查看完整版本: SSDT-RMCF.dsl 中参数的设置