forked from RehabMan/OS-X-Clover-Laptop-Config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSSDT-SATA.dsl
54 lines (53 loc) · 1.69 KB
/
SSDT-SATA.dsl
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
// Fix certain unsupported SATA devices
#ifndef NO_DEFINITIONBLOCK
DefinitionBlock("", "SSDT", 2, "hack", "_SATA", 0)
{
#endif
External(_SB.PCI0.SATA, DeviceObj)
Scope(_SB.PCI0.SATA)
{
OperationRegion(RMP1, PCI_Config, 2, 2)
Field(RMP1, AnyAcc, NoLock, Preserve)
{
SDID,16
}
Name(SDDL, Package()
{
// 8086:282a is RAID mode, remap to supported 8086:2829
// 8086:2822 is RAID mode on others
0x282a, 0x2822, 0,
Package()
{
"device-id", Buffer() { 0x29, 0x28, 0, 0 },
"compatible", Buffer() { "pci8086,2829" },
},
// Skylake 8086:a103 not supported currently, remap to supported 8086:a102
// same with Skylake 8086:9d03
0xa103, 0x9d03,
// same with 200-series 8086:a282
0xa282, 0,
Package()
{
"device-id", Buffer() { 0x02, 0xa1, 0, 0 },
"compatible", Buffer() { "pci8086,a102" },
}
})
Method(_DSM, 4)
{
If (!Arg2) { Return (Buffer() { 0x03 } ) }
// search for matching device-id in device-id list, SDDL
Local0 = Match(SDDL, MEQ, ^SDID, MTR, 0, 0)
If (Ones != Local0)
{
// start search for zero-terminator (prefix to injection package)
Local0 = Match(SDDL, MEQ, 0, MTR, 0, Local0+1)
Return (DerefOf(SDDL[Local0+1]))
}
// if no match, assume it is supported natively... no inject
Return (Package() { })
}
}
#ifndef NO_DEFINITIONBLOCK
}
#endif
//EOF