forked from RehabMan/HP-ProBook-4x30s-DSDT-Patch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path09_USB3_4x40s_Mieze.txt
267 lines (259 loc) · 7.4 KB
/
09_USB3_4x40s_Mieze.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#Maintained by: RehabMan for: HP Probook 4x30s/4x40s
# 09_USB3_4x40s_Mieze.txt
#
# Courtesy: BigDonkey
# USB 3.0 patch for ProBook 4x40s based on Mieze's DSDT examples
#
# These patches can be used instead of GenericUSBXHCI.kext in order to use
# native AppleUSBXHCI.kext.
#
# Please note: You must remove GenericUSBXHCI.kext installed by the
# Probook Installer to use this solution.
#
# Only for ProBooks that have native Intel USB3 (7-series chipset)
#
into device label XHC replace_content
begin
Name (_ADR, 0x00140000)\n
OperationRegion (XPRT, PCI_Config, 0x74, 0x10)\n
Field (XPRT, DWordAcc, NoLock, Preserve)\n
{\n
Offset (0x01),\n
PMEE, 1,\n
, 6,\n
PMES, 1\n
}\n
OperationRegion (XH1C, PCI_Config, 0xD0, 0x10)\n
Field (XH1C, ByteAcc, NoLock, Preserve)\n
{\n
PAHC, 1,\n
PBHC, 1,\n
PCHC, 1,\n
PDHC, 1,\n
Offset (0x08),\n
PASS, 1,\n
PBSS, 1,\n
PCSS, 1,\n
PDSS, 1\n
}\n
OperationRegion (XHC2, PCI_Config, 0x44, 0x04)\n
Field (XHC2, ByteAcc, NoLock, Preserve)\n
{\n
Offset (0x01),\n
MIAI, 2\n
}\n
Name (XRST, Zero)\n
Method (_INI, 0, NotSerialized)\n
{\n
Store (Zero, MIAI)\n
//rehabman: not necessary because system is always Darwin
//If (LAnd (LGreaterEqual (OSYS, 0x07DC), LLess (OSYS, 0x2710)))\n
//{\n
// Store (One, PASS)\n
// Store (One, PAHC)\n
// Store (One, PBSS)\n
// Store (One, PBHC)\n
// Store (One, PCSS)\n
// Store (One, PCHC)\n
// Store (One, PDSS)\n
// Store (One, PDHC)\n
//}\n
}\n
Name (_S3D, 0x02)\n
Name (_S4D, 0x02)\n
Device (RHUB)\n
{\n
Name (_ADR, Zero)\n
Device (PRT1)\n
{\n
Name (_ADR, One)\n
Name (_UPC, Package() { 0xFF, 0x03, Zero, Zero } )\n
Name (_PLD, Package()\n
{\n
Buffer()\n
{\n
/* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,\n
/* 0008 */ 0x69, 0x0C, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00\n
}\n
})\n
Name (MUXS, "EHCA")\n
}\n
Device (PRT2)\n
{\n
Name (_ADR, 0x02)\n
Name (_UPC, Package() { 0xFF, 0x03, Zero, Zero } )\n
Name (_PLD, Package()\n
{\n
Buffer()\n
{\n
/* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,\n
/* 0008 */ 0x69, 0x0C, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00\n
}\n
})\n
Name (MUXS, "EHCB")\n
}\n
Device (PRT3)\n
{\n
Name (_ADR, 0x03)\n
Name (_UPC, Package() { 0xFF, 0x03, Zero, Zero } )\n
Name (_PLD, Package()\n
{\n
Buffer()\n
{\n
/* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,\n
/* 0008 */ 0x69, 0x0C, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00\n
}\n
})\n
Name (MUXS, "EHCC")\n
}\n
Device (PRT4)\n
{\n
Name (_ADR, 0x04)\n
Name (_UPC, Package() { 0xFF, 0x03, Zero, Zero } )\n
Name (_PLD, Package()\n
{\n
Buffer()\n
{\n
/* 0000 */ 0x01, 0xC6, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00,\n
/* 0008 */ 0x69, 0x0C, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00\n
}\n
})\n
Name (MUXS, "EHCD")\n
}\n
}\n
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,max-port-current-in-sleep", 2100,\n
"AAPL,device-internal", Zero,\n
})\n
}\n
Method (XHCA, 0, NotSerialized)\n
{\n
Store (One, PAHC)\n
}\n
Method (XHCB, 0, NotSerialized)\n
{\n
Store (One, PBHC)\n
}\n
Method (XHCC, 0, NotSerialized)\n
{\n
Store (One, PCHC)\n
}\n
Method (XHCD, 0, NotSerialized)\n
{\n
Store (One, PDHC)\n
}\n
Method (EHCA, 0, NotSerialized)\n
{\n
Store (Zero, PAHC)\n
}\n
Method (EHCB, 0, NotSerialized)\n
{\n
Store (Zero, PBHC)\n
}\n
Method (EHCC, 0, NotSerialized)\n
{\n
Store (Zero, PCHC)\n
}\n
Method (EHCD, 0, NotSerialized)\n
{\n
Store (Zero, PDHC)\n
}\n
end;
#Replace all instances of XHC with XHC1
into_all all code_regex \.XHC replaceall_matched begin .XHC1 end;
into_all all code_regex XHC\. replaceall_matched begin XHC1. end;
into all label XHC set_label begin XHC1 end;
#fix PR3 and XWAK XSEL errors
into method label _PTS code_regex \s+And\s\(Local0,\s\\_SB\.PCI0\.XHC1\.PR3,\s\\_SB\.PCI0\.XHC1\.PR3\) remove_matched;
into method label PWAK code_regex \s+\\_SB\.PCI0\.XHC1\.XWAK\s\(\) replace_matched begin \n\\_SB.PCI0.XHC1._INI() end;
into method label _OSC replace_content
begin
CreateDWordField (Arg3, 0x00, CDW1)\n
CreateDWordField (Arg3, 0x04, CDW2)\n
CreateDWordField (Arg3, 0x08, CDW3)\n
Store (Arg0, Local1)\n
If (LEqual (\SRCP (Local1, PUID), 0x01))\n
{\n
Store (CDW2, Local2)\n
Store (CDW3, Local3)\n
If (LNotEqual (And (Local2, 0x16), 0x16))\n
{\n
And (Local3, 0x1E, Local3)\n
}\n
And (Local3, 0x1D, Local3)\n
If (LNot (And (CDW1, 0x01)))\n
{\n
POSC (Local3, 0x01)\n
If (And (Local3, 0x10)) {}\n
}\n
If (LNotEqual (Arg1, One))\n
{\n
Or (CDW1, 0x08, CDW1)\n
}\n
If (LNotEqual (CDW3, Local3))\n
{\n
Or (CDW1, 0x10, CDW1)\n
}\n
Store (Local3, CDW3)\n
Store (Local3, OSCC)\n
Return (Arg3)\n
}\n
Else\n
{\n
Or (CDW1, 0x04, CDW1)\n
Return (Arg3)\n
}\n
end;
into device label EHC1 insert
begin
Method (XHCA, 0, NotSerialized)\n
{\n
Store (One, ^^XHC1.PAHC)\n
}\n
Method (XHCB, 0, NotSerialized)\n
{\n
Store (One, ^^XHC1.PBHC)\n
}\n
Method (XHCC, 0, NotSerialized)\n
{\n
Store (One, ^^XHC1.PCHC)\n
}\n
Method (XHCD, 0, NotSerialized)\n
{\n
Store (One, ^^XHC1.PDHC)\n
}\n
Method (EHCA, 0, NotSerialized)\n
{\n
Store (Zero, ^^XHC1.PAHC)\n
}\n
Method (EHCB, 0, NotSerialized)\n
{\n
Store (Zero, ^^XHC1.PBHC)\n
}\n
Method (EHCC, 0, NotSerialized)\n
{\n
Store (Zero, ^^XHC1.PCHC)\n
}\n
Method (EHCD, 0, NotSerialized)\n
{\n
Store (Zero, ^^XHC1.PDHC)\n
}\n
Name (XHCN, One)\n
end;
into device label EHC2 insert
begin
Name (XHCN, One)\n
end;
into device label HPT1 insert begin Name (MUXS, "XHCA") end;
into device label HPT2 insert begin Name (MUXS, "XHCB") end;
into device label HPT3 insert begin Name (MUXS, "XHCC") end;
into device label HPT5 insert begin Name (MUXS, "XHCD") end;