一. 亮度调节目前改为hotpatch方式,将SSDT-PNLF.aml 文件放入patched文件夹即可,并不需要给DSDT打补丁。
二. 声音相关和AppleHDA.kext 和 AppleALC.kext配合使用。
IRQ fix
#Maintained by: RehabMan for: Laptop Patches
#system_IRQ.txt
# This can fix non-working audio and also has an affect on HPET.
#
# Use this if you have issues with patched AppleHDA (required on almost all laptops)
# or if you have issues with HPET (restart after wake).
# IRQ fix
into device name_hid PNP0000 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0100 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0B00 code_regex IRQNoFlags\s\(\)\n\s+\{(\d+)\} remove_matched;
into device name_hid PNP0103 code_regex IRQNoFlags\s\(\)\n\s+\{.*\} removeall_matched;
into device name_hid PNP0103 code_regex Name\s\(([^,]+),\sResourceTemplate\s\(\).*\n\s+\{((?:.|\n)*)\}\) replace_matched
begin
Name (%1, ResourceTemplate()\n
{\n
IRQNoFlags() { 0, 8, 11, 15 }\n
%2
})\n
end;
HDEF patch 为笔记本注入layout id =03;
#Automatically adjusted by AppleHDA Patcher.app
# original by RehabMan
# Inject Audio info
into method label _DSM parent_label HDEF remove_entry;
into device label HDEF insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"AAPL,slot-name", Buffer() { "Built in" },\n
"layout-id", Buffer() { 0x03, 0x00, 0x00, 0x00 },\n
"device_type", Buffer() { "Audio Controller" },\n
"built-in", Buffer() { 0x00 },\n
"PinConfigurations", Buffer() { },\n
"hda-gfx", Buffer() { "onboard-1" }\n
})\n
}\n
end
三. 电池补丁,和ACPIBattery.kext 配合使用
#Maintained by: RehabMan for: Laptop Patches
#battery_Surface-Pro-v2.txt
# created by nayeweiyang 2016-05-22
# initial bugfix by RehabMan 2016-05-22
# works for:
# Microsoft Surface Pro v2
#16 registers
into device label EC0 code_regex F0RM,\s+16, replace_matched begin F0M0,8,F0M1,8, end;
into device label EC0 code_regex F1RM,\s+16, replace_matched begin F1M0,8,F1M1,8, end;
into device label EC0 code_regex RBDI,\s+16, replace_matched begin RBI0,8,RBI1,8, end;
into device label EC0 code_regex RPUI,\s+16, replace_matched begin RPI0,8,RPI1,8, end;
into device label EC0 code_regex PNFV,\s+16, replace_matched begin PNF0,8,PNF1,8, end;
into device label EC0 code_regex PLSV,\s+16, replace_matched begin PLS0,8,PLS1,8, end;
into device label EC0 code_regex B0TP,\s+16, replace_matched begin B0P0,8,B0P1,8, end;
into device label EC0 code_regex B0VL,\s+16, replace_matched begin BVL0,8,BVL1,8, end;
into device label EC0 code_regex B0CR,\s+16, replace_matched begin B0R0,8,B0R1,8, end;
into device label EC0 code_regex B0AC,\s+16, replace_matched begin B0C0,8,B0C1,8, end;
into device label EC0 code_regex B0ME,\s+16, replace_matched begin B0E0,8,B0E1,8, end;
into device label EC0 code_regex B0RS,\s+16, replace_matched begin B0S0,8,B0S1,8, end;
into device label EC0 code_regex B0RC,\s+16, replace_matched begin RC00,8,RC01,8, end;
into device label EC0 code_regex B0FC,\s+16, replace_matched begin B0F0,8,B0F1,8, end;
into device label EC0 code_regex B0MC,\s+16, replace_matched begin BMC0,8,BMC1,8, end;
into device label EC0 code_regex B0MV,\s+16, replace_matched begin B0V0,8,B0V1,8, end;
into device label EC0 code_regex B0ST,\s+16, replace_matched begin B0T0,8,B0T1,8, end;
into device label EC0 code_regex B0CC,\s+16, replace_matched begin BCC0,8,BCC1,8, end;
into device label EC0 code_regex B0DC,\s+16, replace_matched begin B0D0,8,B0D1,8, end;
into device label EC0 code_regex B0DV,\s+16, replace_matched begin BDV0,8,BDV1,8, end;
into device label EC0 code_regex B0SI,\s+16, replace_matched begin B0I0,8,B0I1,8, end;
into device label EC0 code_regex B0MD,\s+16, replace_matched begin B0M0,8,B0M1,8, end;
into device label EC0 code_regex B0SN,\s+16, replace_matched begin B0N0,8,B0N1,8, end;
into device label EC0 code_regex B1TP,\s+16, replace_matched begin B1P0,8,B1P1,8, end;
into device label EC0 code_regex B1VL,\s+16, replace_matched begin B1L0,8,B1L1,8, end;
into device label EC0 code_regex B1CR,\s+16, replace_matched begin B1R0,8,B1R1,8, end;
into device label EC0 code_regex B1AC,\s+16, replace_matched begin B1C0,8,B1C1,8, end;
into device label EC0 code_regex B1ME,\s+16, replace_matched begin B1E0,8,B1E1,8, end;
into device label EC0 code_regex B1RS,\s+16, replace_matched begin B1S0,8,B1S1,8, end;
into device label EC0 code_regex B1RC,\s+16, replace_matched begin BR00,8,BR01,8, end;
into device label EC0 code_regex B1FC,\s+16, replace_matched begin B1F0,8,B1F1,8, end;
into device label EC0 code_regex B1MC,\s+16, replace_matched begin BM00,8,BM01,8, end;
into device label EC0 code_regex B1MV,\s+16, replace_matched begin B1V0,8,B1V1,8, end;
into device label EC0 code_regex B1ST,\s+16, replace_matched begin B1T0,8,B1T1,8, end;
into device label EC0 code_regex B1CC,\s+16, replace_matched begin BC00,8,BC01,8, end;
into device label EC0 code_regex B1DC,\s+16, replace_matched begin B1D0,8,B1D1,8, end;
into device label EC0 code_regex B1DV,\s+16, replace_matched begin BD00,8,BD01,8, end;
into device label EC0 code_regex B1SI,\s+16, replace_matched begin B1I0,8,B1I1,8, end;
into device label EC0 code_regex B1MD,\s+16, replace_matched begin B1M0,8,B1M1,8, end;
into device label EC0 code_regex B1SN,\s+16, replace_matched begin B1N0,8,B1N1,8, end;
into device label EC0 code_regex B0AH,\s+16, replace_matched begin B0H0,8,B0H1,8, end;
into device label EC0 code_regex B1AH,\s+16, replace_matched begin B1H0,8,B1H1,8, end;
#fix 16 methods
into method label BCR1 code_regex B0CR replaceall_matched begin B1B2(B0R0,B0R1) end;
into method label BRC1 code_regex B0RC replaceall_matched begin B1B2(RC00,RC01) end;
into method label BIF2 code_regex B0FC replaceall_matched begin B1B2(B0F0,B0F1) end;
into method label BIF1 code_regex B0DC replaceall_matched begin B1B2(B0D0,B0D1) end;
into method label BIF4 code_regex B0DV replaceall_matched begin B1B2(BDV0,BDV1) end;
into method label BVO2 code_regex B1VL replaceall_matched begin B1B2(B1L0,B1L1) end;
into method label BCR2 code_regex B1CR replaceall_matched begin B1B2(B1R0,B1R1) end;
into method label BRC2 code_regex B1RC replaceall_matched begin B1B2(BR00,BR01) end;
into method label BIX2 code_regex B1FC replaceall_matched begin B1B2(B1F0,B1F1) end;
into method label BIX1 code_regex B1DC replaceall_matched begin B1B2(B1D0,B1D1) end;
into method label BIX4 code_regex B1DV replaceall_matched begin B1B2(BD00,BD01) end;
into method label BVO1 code_regex B0VL replaceall_matched begin B1B2(BVL0,BVL1) end;
into_all method parent_label BAT0 code_regex \(\^\^LPCB.EC0.B0CC, replace_matched begin (B1B2(^^LPCB.EC0.BCC0,^^LPCB.EC0.BCC1), end;
into_all method parent_label BAT0 code_regex \(\^\^LPCB.EC0.B0RC, replace_matched begin (B1B2(^^LPCB.EC0.RC00,^^LPCB.EC0.RC01), end;
into_all method parent_label BAT1 code_regex \(\^\^LPCB.EC0.B1CC, replace_matched begin (B1B2(^^LPCB.EC0.BC00,^^LPCB.EC0.BC01), end;
into_all method parent_label BAT1 code_regex \(\^\^LPCB.EC0.B1RC, replace_matched begin (B1B2(^^LPCB.EC0.BR00,^^LPCB.EC0.BR01), end;
into method label _BTP code_regex Store\s\(Arg0,\s\^\^LPCB.EC0.B0AH\) replaceall_matched begin Store(Arg0,^^LPCB.EC0.B0H0) Store(ShiftRight(Arg0, 8), ^^LPCB.EC0.B0H1) end;
into method label _BTP code_regex Store\s\(0x05,\s\^\^LPCB.EC0.B0AH\) replaceall_matched begin Store(0x05,^^LPCB.EC0.B0H0) Store(ShiftRight(0x05, 8), ^^LPCB.EC0.B0H1) end;
into method label _BTP code_regex Store\s\(Arg0,\s\^\^LPCB.EC0.B1AH\) replaceall_matched begin Store(Arg0,^^LPCB.EC0.B1H0) Store(ShiftRight(Arg0, 8), ^^LPCB.EC0.B1H1) end;
into method label _BTP code_regex Store\s\(0x05,\s\^\^LPCB.EC0.B1AH\) replaceall_matched begin Store(0x05,^^LPCB.EC0.B1H0) Store(ShiftRight(0x05, 8),^^LPCB.EC0.B1H1) end;
#32
into device label EC0 code_regex LSFV,\s+32 replace_matched begin LSF0,8,LSF1,8,LSF2,8,LSF3,8 end;
into device label EC0 code_regex SMFV,\s+32 replace_matched begin SMF0,8,SMF1,8,SMF2,8,SMF3,8 end;
into device label EC0 code_regex SLSV,\s+32 replace_matched begin SLS0,8,SLS1,8,SLS2,8,SLS3,8 end;
into device label EC0 code_regex AYFV,\s+32 replace_matched begin AYF0,8,AYF1,8,AYF2,8,AYF3,8 end;
into device label EC0 code_regex ALSV,\s+32 replace_matched begin ALS0,8,ALS1,8,ALS2,8,ALS3,8 end;
into device label EC0 code_regex AGID,\s+32 replace_matched begin AGI0,8,AGI1,8,AGI2,8,AGI3,8 end;
#B1B2
into method label B1B2 remove_entry;
into definitionblock code_regex . insert
begin
Method (B1B2, 2, NotSerialized)\n
{\n
Return(Or(Arg0, ShiftLeft(Arg1, 8)))\n
}\n
end;
# deal with the Mutex problem /修复电量补丁后,有获取的电池状态显示为0%的情况
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
into_all all code_regex Mutex\s+\(([^,]*),\s+[^)]*\) replaceall_matched begin Mutex(%1, 0) end;
# SPEEDY-NUC:battery rehabman$ grep into.*method.*_STA.*Return *.txt /修复修复了“BAT0”和“BAT1”相冲突的错误(禁用了“BAT1”)
into method label _STA parent_label BAT1 replace_content begin Return(0) end;
四. HDMI 音频输出Patch
# 1. Rename GFX0 devices to IGPU
into device label GFX0 set_label begin IGPU end;
into_all all code_regex GFX0 replaceall_matched begin IGPU end;
into scope label _SB.PCI0.GFX0 set_label begin _SB.PCI0.IGPU end;ß
into scope label \_SB.PCI0.GFX0 set_label begin \_SB.PCI0.IGPU end;
#
# To patch more than once, delete from "Run this patch once …" (above) to here.
#
# 2. Add device IGPU and inject Azul framebuffer(HD5K HDMI audio - Part 1/2)
into device name_adr 0x00020000 set_label begin IGPU end;
into device label PCI0 insert
begin
Device (IGPU)\n
{\n
Name (_ADR, 0x00020000)\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"AAPL,ig-platform-id", Buffer() { 0x06, 0x00, 0x26, 0x0a },\n
"hda-gfx", Buffer() { "onboard-1" },\n
})\n
}\n
}\n
end;
# 3. Add device HDAU (HD5K HDMI audio - Part 2/2)
into device name_adr 0x00030000 set_label begin HDAU end;
into device label PCI0 insert
begin
Device (HDAU)\n
{\n
Name (_ADR, 0x00030000)\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 0x03, 0x00, 0x00, 0x00 },\n
"hda-gfx", Buffer() { "onboard-1" },\n
})\n
}\n
}\n
end;
# 4. Insert audio injection into device HDEF (HDEF audio)
into method label _DSM parent_adr 0x001B0000 remove_entry;
into device name_adr 0x001B0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"layout-id", Buffer() { 0x03, 0x00, 0x00, 0x00 },\n
"PinConfigurations", Buffer(Zero) {},\n
})\n
}\n
end;
五. 系统通用补丁(没什么副作用)
IMEI 补丁
#Maintained by: RehabMan for: Laptop Patches
#system_IMEI.txt
# if you already have an IMEI/HECI/MEI device, you should not use this patch
# but if you do, these patches will remove the existing one
into device name_adr 0x00160000 remove_entry;
into device label IMEI parent_label PCI0 remove_entry;
# add missing IMEI device
into device label PCI0 insert
begin
Device (IMEI)\n
{\n
Name (_ADR, 0x00160000)\n
}\n
end;
OS Check Fix (window Vista)
#Maintained by: RehabMan for: Laptop Patches
#system_OSYS.txt
# Cause the DSDT to simulate "Windows 2006" when running under "Darwin" (OS X).
#
# This can fix various DSDT related problems for code within the DSDT
# that is conditional on the operating system version.
# sometimes in Scope (_SB.PCI0)
into method label _INI parent_label _SB.PCI0 code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2006\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2006"))) end;
# sometimes in Scope (_SB)
into method label _INI parent_label _SB code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2006\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2006"))) end;
# enable this one to be a bit more agressive...
#into_all method code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2006\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2006"))) end;
OS Check Fix (Windows 7)
#Maintained by: RehabMan for: Laptop Patches
#system_OSYS_win7.txt
# Cause the DSDT to simulate "Windows 2009" when running under "Darwin" (OS X).
#
# This can fix various DSDT related problems for code within the DSDT
# that is conditional on the operating system version.
#
# Sometimes "Windows 2009" is a better choice than "Windows 2006"
into_all method code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2009\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2009"))) end;
OS Check Fix (Windows 8)
#Maintained by: RehabMan for: Laptop Patches
#system_OSYS_win8.txt
# Cause the DSDT to simulate "Windows 2012" when running under "Darwin" (OS X).
#
# This can fix various DSDT related problems for code within the DSDT
# that is conditional on the operating system version.
#
# Sometimes "Windows 2012" is a better choice than "Windows 2006"
into_all method code_regex If\s+\([\\]?_OSI\s+\(\"Windows\s2012\"\)\) replace_matched begin If(LOr(_OSI("Darwin"),_OSI("Windows 2012"))) end;
RTC fix
#Maintained by: RehabMan for: Laptop Patches
#system_RTC.txt
# RTC fix
into device name_hid PNP0B00 code_regex (IO\s\((?:\s*[^,]+,\s*(?:\/\/\s.*)?\s*\n)+\s*)(\dx\d+)(,\s*(?:\/\/\s.*)?\s*\n\s*\)) replace_matched begin %10x02%3 end;
#Maintained by: RehabMan for: Laptop Patches
#system_SMBUS.txt
# SMBUS fix
into device label BUS0 parent_adr 0x001F0003 remove_entry;
into device name_adr 0x001F0003 insert
begin
Device (BUS0)\n
{\n
Name (_CID, "smbus")\n
Name (_ADR, Zero)\n
Device (DVL0)\n
{\n
Name (_ADR, 0x57)\n
Name (_CID, "diagsvault")\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package() { "address", 0x57 })\n
}\n
}\n
}\n
end;
HPET fix
#Maintained by: RehabMan for: Laptop Patches
#system_HPET.txt
# If you have panic "No HPETs available..." or have a abrubt restart
# after waking from sleep, you may need this patch.
# The patch makes sure the HPET device is always available.
# HPET fix to avoid AppleIntelCPUPowerManagement panic
into method label _STA parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 code_regex Name\s\(_STA\,\s+0x0F\) remove_matched;
into device name_hid PNP0103 insert
begin
Name (_STA, 0x0F)\n
end;
into method label _CRS parent_hid PNP0103 remove_entry;
into device name_hid PNP0103 insert
begin
Method (_CRS, 0, NotSerialized)\n
{\n
Return (BUF0)\n
}\n
end;
SMBUS fix
#Maintained by: RehabMan for: Laptop Patches
#system_SMBUS.txt
# SMBUS fix
into device label BUS0 parent_adr 0x001F0003 remove_entry;
into device name_adr 0x001F0003 insert
begin
Device (BUS0)\n
{\n
Name (_CID, "smbus")\n
Name (_ADR, Zero)\n
Device (DVL0)\n
{\n
Name (_ADR, 0x57)\n
Name (_CID, "diagsvault")\n
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package() { "address", 0x57 })\n
}\n
}\n
}\n
end;
六. 解决睡眠后自动唤醒问题
Fix_WAK Arg0 v2
#Maintained by: RehabMan for: Laptop Patches
#system_WAK2.txt
#
# In 10.8.5 and perhaps later versions of OS X, DSDT method _WAK
# called after resuming from S3 suspend (Sleep, or suspend to RAM),
# is called with garbage in Arg0, where it should be a value
# representing the sleep state being left (1-5).
#
# This causes problems for code in DSDT _WAK method which expects
# and checks against Arg0==3 for wake from sleep to turn on various
# devices or restore internal state to a working state.
#
# This patch adds code at the very beginning of the method to
# force an an out-of-range Arg0 to 3.
#
# See system_WAK1.txt for an alternate patch
#
# Note regarding Yosemite:
# At least in Yosemite 10.10.2, this bug appears to be fixed.
# I didn't notice/verify on other versions of Yosemite
#
into method label _WAK code_regex ([\s\S]*) replace_matched
begin
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }\n
%1
end;
into method label \_WAK code_regex ([\s\S]*) replace_matched
begin
If (LOr(LLess(Arg0,1),LGreater(Arg0,5))) { Store(3,Arg0) }\n
%1
end;
USB3_PRW 0x6D补丁
#Maintained by: RehabMan for: Laptop Patches
#usb_prw_0x6d_xhc.txt
# remove _PRW methods to prevent instant wake
# delete any existing XHC1 device
into device label XHC1 name_adr 0x00140000 remove_entry;
# delete any existing USB2 device
into device label USB2 name_adr 0x001D0000 remove_entry;
# if _PRW objects are methods
into method label _PRW parent_adr 0x001D0000 remove_entry;
into method label _PRW parent_adr 0x001A0000 remove_entry;
into method label _PRW parent_adr 0x00140000 remove_entry;
into method label _PRW parent_adr 0x001B0000 remove_entry;
# some other LAN cards use 0x00190000
into method label _PRW parent_adr 0x00190000 remove_entry;
# if _PRW methods are stuffed into a separate scope
into method label _PRW parent_label _SB.PCI0.EHC1 remove_entry;
into method label _PRW parent_label _SB.PCI0.EHC2 remove_entry;
into method label _PRW parent_label _SB.PCI0.XHC remove_entry;
into method label _PRW parent_label \_SB.PCI0.EHC1 remove_entry;
into method label _PRW parent_label \_SB.PCI0.EHC2 remove_entry;
into method label _PRW parent_label \_SB.PCI0.XHC remove_entry;
# if _PRW objects are names
into device name_adr 0x001D0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001A0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001B0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\}\) remove_matched;
# some _PRW have three entries in the Package
into device name_adr 0x001D0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001A0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00140000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x001B0000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
into device name_adr 0x00190000 code_regex Name.*_PRW.*\n.*\n.*\n.*\n.*\n.*\}\) remove_matched;
# seems to work better if _PRW is present, but returns 0 (original was 3) for sleep state
into device name_adr 0x001D0000 insert begin Name(_PRW, Package() { 0x6D, 0 }) end;
into device name_adr 0x001A0000 insert begin Name(_PRW, Package() { 0x6D, 0 }) end;
into device name_adr 0x00140000 insert begin Name(_PRW, Package() { 0x6D, 0 }) end;
into device name_adr 0x001B0000 insert begin Name(_PRW, Package() { 0x6D, 0 }) end;
into device name_adr 0x00190000 insert begin Name(_PRW, Package() { 0x6D, 0 }) end;
# USB property injection for 7-series boards (originally HM76)
# Insert Apple USB properties into EHC1
into method label _DSM parent_adr 0x001D0000 remove_entry;
into device name_adr 0x001D0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;
# Insert Apple USB properties into EHC2
into method label _DSM parent_adr 0x001A0000 remove_entry;
into device name_adr 0x001A0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;
# Insert Apple USB properties into USB 3.0 XHC
into method label _DSM parent_adr 0x00140000 remove_entry;
into device name_adr 0x00140000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;
# special cases... (not in u430 DSDT)
#into scope label _SB.PCI0.XHC.RHUB.HS05 set_label begin _SB.PCI0.XHC1.RHUB.HS05 end;
7-series/8-series USB
#Maintained by: RehabMan for: Laptop Patches
#usb_USB_7-series.txt
# USB property injection for 7-series boards (originally HM76)
# Insert Apple USB properties into EHC1
into method label _DSM parent_adr 0x001D0000 remove_entry;
into device name_adr 0x001D0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"AAPL,clock-id", Buffer() { 0x01 },\n
"built-in", Buffer() { 0x00 },\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;
# Insert Apple USB properties into EHC2
into method label _DSM parent_adr 0x001A0000 remove_entry;
into device name_adr 0x001A0000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"AAPL,clock-id", Buffer() { 0x01 },\n
"built-in", Buffer() { 0x00 },\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;
# Insert Apple USB properties into USB 3.0 XHC
into method label _DSM parent_adr 0x00140000 remove_entry;
into device name_adr 0x00140000 insert
begin
Method (_DSM, 4, NotSerialized)\n
{\n
If (LEqual (Arg2, Zero)) { Return (Buffer() { 0x03 } ) }\n
Return (Package()\n
{\n
"AAPL,clock-id", Buffer() { 0x02 },\n
"built-in", Buffer() { 0x00 },\n
"subsystem-id", Buffer() { 0x70, 0x72, 0x00, 0x00 },\n
"subsystem-vendor-id", Buffer() { 0x86, 0x80, 0x00, 0x00 },\n
"AAPL,current-available", 2100,\n
"AAPL,current-extra", 2200,\n
"AAPL,current-extra-in-sleep", 1600,\n
"AAPL,device-internal", 0x02,\n
"AAPL,max-port-current-in-sleep", 2100,\n
})\n
}\n
end;