-
Notifications
You must be signed in to change notification settings - Fork 2
/
USB-SSDT.command
executable file
·165 lines (139 loc) · 46.9 KB
/
USB-SSDT.command
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
#!/usr/bin/env python
import sys, os
from subprocess import call
from time import sleep
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
END = '\033[0m'
currentpath = os.path.dirname(os.path.abspath(sys.argv[0]))
savepath = os.path.join(os.path.expanduser("~"),"Desktop/")
HSPorts = {}
SSPorts = {}
HUBC = ""
UMAP = ""
USBSSDT = '/*\n* Intel ACPI Component Architecture\n* AML/ASL+ Disassembler version 20160422-64(RM)\n* Copyright (c) 2000 - 2016 Intel Corporation\n*\n* Disassembling to non-symbolic legacy ASL operators\n*\n* Disassembly of iASLADoB6K.aml, Mon Jul 18 01:54:11 2016\n*\n* Original Table Header:\n* Signature "SSDT"\n* Length 0x00002B83 (11139)\n* Revision 0x02\n* Checksum 0x97\n* OEM ID "INTEL"\n* OEM Table ID "xh_rvp10"\n* OEM Revision 0x00000000 (0)\n* Compiler ID "INTL"\n* Compiler Version 0x20160422 (538313762)\n*/\nDefinitionBlock ("", "SSDT", 2, "INTEL", "xh_rvp10", 0x00000000)\n{\nExternal (_SB_.PCI0.XHC_.RHUB, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS01.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS01.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS01.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS01.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS02.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS02.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS02.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS02.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS03.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS03.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS03.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS03.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS04.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS04.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS04.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS04.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS05, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS05.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS05.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS05.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS05.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS06, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS06.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS06.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS06.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS06.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS07, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS07.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS07.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS07.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS07.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS08, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS08.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS08.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS08.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS08.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS09, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS09.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS09.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS09.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS09.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS10, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS10.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS10.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS10.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS10.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS11, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS12, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS13, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.HS14, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS01.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS01.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS01.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS01.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS02.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS02.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS02.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS02.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS03.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS03.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS03.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS03.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS04.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS04.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS04.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS04.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS05, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS05.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS05.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS05.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS05.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS06, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS06.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS06.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS06.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS06.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS07, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS07.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS07.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS07.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS07.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS08, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS08.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS08.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS08.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS08.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS09, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS09.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS09.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS09.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS09.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS10, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS10.DP01, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS10.DP02, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS10.DP03, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.SS10.DP04, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.USR1, DeviceObj) // (from opcode)\nExternal (_SB_.PCI0.XHC_.RHUB.USR2, DeviceObj) // (from opcode)\nExternal (HUBC, UnknownObj) // (from opcode)\nExternal (PCHV, UnknownObj) // (from opcode)\nExternal (SPTH, UnknownObj) // (from opcode)\nExternal (UMAP, UnknownObj) // (from opcode)\n\n\nScope (\_SB)\n{\nMethod (_INI, 0, NotSerialized) // _INI: Initialize\n{\nStore ("Method \\\\_SB._INI Called", Debug)\nStore ([REPLACEHUBC], \HUBC)\nStore ([REPLACEUMAP], \UMAP)\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB)\n{\nMethod (GPLD, 2, Serialized)\n{\nName (PCKG, Package (One)\n{\nBuffer (0x10) {}\n})\nCreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV)\nStore (One, REV)\nCreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI)\nStore (Arg0, VISI)\nCreateField (DerefOf (Index (PCKG, Zero)), 0x57, 0x08, GPOS)\nStore (Arg1, GPOS)\nReturn (PCKG)\n}\n\n\nMethod (GUPC, 2, Serialized)\n{\nName (PCKG, Package (0x04)\n{\nZero,\n0xFF,\nZero,\nZero\n})\nStore (Arg0, Index (PCKG, Zero))\nStore (Arg1, Index (PCKG, One))\nReturn (PCKG)\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, One), One))\n{\nReturn (GUPC (Zero, [HS01]))\n}\nElse\n{\nReturn (GUPC (One, [HS01]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, One), One))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS01GPLD], One))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x02), 0x02))\n{\nReturn (GUPC (Zero, [HS02]))\n}\nElse\n{\nReturn (GUPC (One, [HS02]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x02), 0x02))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS02GPLD], 0x02))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x04), 0x04))\n{\nReturn (GUPC (Zero, [HS03]))\n}\nElse\n{\nReturn (GUPC (One, [HS03]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x04), 0x04))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS03GPLD], 0x03))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x08), 0x08))\n{\nReturn (GUPC (Zero, [HS04]))\n}\nElse\n{\nReturn (GUPC (One, [HS04]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x08), 0x08))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS04GPLD], 0x04))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS05)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x10), 0x10))\n{\nReturn (GUPC (Zero, [HS05]))\n}\nElse\n{\nReturn (GUPC (One, [HS05]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x10), 0x10))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS05GPLD], 0x05))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS06)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x20), 0x20))\n{\nReturn (GUPC (Zero, [HS06]))\n}\nElse\n{\nReturn (GUPC (One, [HS06]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x20), 0x20))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS06GPLD], 0x06))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS07)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x40), 0x40))\n{\nReturn (GUPC (Zero, [HS07]))\n}\nElse\n{\nReturn (GUPC (One, [HS07]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x40), 0x40))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS07GPLD], 0x07))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS08)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x80), 0x80))\n{\nReturn (GUPC (Zero, [HS08]))\n}\nElse\n{\nReturn (GUPC (One, [HS08]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x80), 0x80))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS08GPLD], 0x08))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS09)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x0100), 0x0100))\n{\nReturn (GUPC (Zero, [HS09]))\n}\nElse\n{\nReturn (GUPC (One, [HS09]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x0100), 0x0100))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS09GPLD], 0x09))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS10)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x0200), 0x0200))\n{\nReturn (GUPC (Zero, [HS10]))\n}\nElse\n{\nReturn (GUPC (One, [HS10]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x0200), 0x0200))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS10GPLD], 0x0A))\n}\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS11)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x0400), 0x0400))\n{\nReturn (GUPC (Zero, [HS11]))\n}\nElse\n{\nReturn (GUPC (One, [HS11]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x0400), 0x0400))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS11GPLD], 0x0B))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS12)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x0800), 0x0800))\n{\nReturn (GUPC (Zero, [HS12]))\n}\nElse\n{\nReturn (GUPC (One, [HS12]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x0800), 0x0800))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS12GPLD], 0x0C))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS13)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x1000), 0x1000))\n{\nReturn (GUPC (Zero, [HS13]))\n}\nElse\n{\nReturn (GUPC (One, [HS13]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x1000), 0x1000))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS13GPLD], 0x0D))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS14)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (HUBC, 0x2000), 0x2000))\n{\nReturn (GUPC (Zero, [HS14]))\n}\nElse\n{\nReturn (GUPC (One, [HS14]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (HUBC, 0x2000), 0x2000))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([HS14GPLD], 0x0E))\n}\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.USR1)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (Zero, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.USR2)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (Zero, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, One), One))\n{\nIf (LEqual (And (HUBC, One), One))\n{\nReturn (GUPC (Zero, [SS01]))\n}\nElse\n{\nReturn (GUPC (One, [SS01]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS01]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, One), One))\n{\nIf (LEqual (And (HUBC, One), One))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS01GPLD], One))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x02), 0x02))\n{\nIf (LEqual (And (HUBC, 0x02), 0x02))\n{\nReturn (GUPC (Zero, [SS02]))\n}\nElse\n{\nReturn (GUPC (One, [SS02]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS02]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x02), 0x02))\n{\nIf (LEqual (And (HUBC, 0x02), 0x02))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS02GPLD], 0x02))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x04), 0x04))\n{\nIf (LEqual (And (HUBC, 0x04), 0x04))\n{\nReturn (GUPC (Zero, [SS03]))\n}\nElse\n{\nReturn (GUPC (One, [SS03]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS03]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x04), 0x04))\n{\nIf (LEqual (And (HUBC, 0x04), 0x04))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS03GPLD], 0x03))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x08), 0x08))\n{\nIf (LEqual (And (HUBC, 0x08), 0x08))\n{\nReturn (GUPC (Zero, [SS04]))\n}\nElse\n{\nReturn (GUPC (One, [SS04]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS04]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x08), 0x08))\n{\nIf (LEqual (And (HUBC, 0x08), 0x08))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS04GPLD], 0x04))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS05)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x10), 0x10))\n{\nIf (LEqual (And (HUBC, 0x10), 0x10))\n{\nReturn (GUPC (Zero, [SS05]))\n}\nElse\n{\nReturn (GUPC (One, [SS05]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS05]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x10), 0x10))\n{\nIf (LEqual (And (HUBC, 0x10), 0x10))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS05GPLD], 0x05))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS06)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x20), 0x20))\n{\nIf (LEqual (And (HUBC, 0x20), 0x20))\n{\nReturn (GUPC (Zero, [SS06]))\n}\nElse\n{\nReturn (GUPC (One, [SS06]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS06]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x20), 0x20))\n{\nIf (LEqual (And (HUBC, 0x20), 0x20))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS06GPLD], 0x06))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.SS07)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x40), 0x40))\n{\nIf (LEqual (And (HUBC, 0x40), 0x40))\n{\nReturn (GUPC (Zero, [SS07]))\n}\nElse\n{\nReturn (GUPC (One, [SS07]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS07]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x40), 0x40))\n{\nIf (LEqual (And (HUBC, 0x40), 0x40))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS07GPLD], 0x07))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS08)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x80), 0x80))\n{\nIf (LEqual (And (HUBC, 0x80), 0x80))\n{\nReturn (GUPC (Zero, [SS08]))\n}\nElse\n{\nReturn (GUPC (One, [SS08]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS08]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x80), 0x80))\n{\nIf (LEqual (And (HUBC, 0x80), 0x80))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS08GPLD], 0x08))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS09)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x0100), 0x0100))\n{\nIf (LEqual (And (HUBC, 0x0100), 0x0100))\n{\nReturn (GUPC (Zero, [SS09]))\n}\nElse\n{\nReturn (GUPC (One, [SS09]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS09]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x0100), 0x0100))\n{\nIf (LEqual (And (HUBC, 0x0100), 0x0100))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS09GPLD], 0x09))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS10)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nIf (LEqual (And (UMAP, 0x0200), 0x0200))\n{\nIf (LEqual (And (HUBC, 0x0200), 0x0200))\n{\nReturn (GUPC (Zero, [SS10]))\n}\nElse\n{\nReturn (GUPC (One, [SS10]))\n}\n}\nElse\n{\nReturn (GUPC (Zero, [SS10]))\n}\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nIf (LEqual (And (UMAP, 0x0200), 0x0200))\n{\nIf (LEqual (And (HUBC, 0x0200), 0x0200))\n{\nReturn (GPLD (Zero, Zero))\n}\nElse\n{\nReturn (GPLD ([SS10GPLD], 0x0A))\n}\n}\nElse\n{\nReturn (GPLD (Zero, Zero))\n}\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, One), One))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS01.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS01.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS01.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS01.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS01.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS01.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS01.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS01.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x02), 0x02))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS02.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS02.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS02.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS02.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS02.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS02.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS02.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS02.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x04), 0x04))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS03.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS03.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS03.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS03.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS03.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS03.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS03.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS03.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x08), 0x08))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS04.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS04.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS04.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS04.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS04.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS04.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS04.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS04.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x10), 0x10))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS05.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS05.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS05.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS05.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS05.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS05.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS05.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS05.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x20), 0x20))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS06.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS06.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS06.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS06.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS06.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS06.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS06.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS06.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x40), 0x40))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS07.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS07.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS07.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS07.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.SS07.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS07.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS07.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS07.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x80), 0x80))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS08.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS08.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS08.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS08.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.SS08.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS08.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS08.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS08.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x0100), 0x0100))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS09.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS09.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS09.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS09.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.SS09.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS09.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS09.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS09.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n}\n\n\nIf (LEqual (And (HUBC, 0x0200), 0x0200))\n{\nScope (\_SB.PCI0.XHC.RHUB.HS10.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS10.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS10.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.HS10.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n\n\nIf (LEqual (PCHV, SPTH))\n{\nScope (\_SB.PCI0.XHC.RHUB.SS10.DP01)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, One))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS10.DP02)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x02))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS10.DP03)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x03))\n}\n}\n\n\nScope (\_SB.PCI0.XHC.RHUB.SS10.DP04)\n{\nMethod (_UPC, 0, NotSerialized) // _UPC: USB Port Capabilities\n{\nReturn (GUPC (One, 0xFF))\n}\n\n\nMethod (_PLD, 0, NotSerialized) // _PLD: Physical Location of Device\n{\nReturn (GPLD (One, 0x04))\n}\n}\n}\n}\n}'
try:
os.remove(os.path.join(savepath,"USB-SSDT.dsl"))
except OSError:
pass
try:
os.remove(os.path.join(savepath,"USB-SSDT.aml"))
except OSError:
pass
def query_yes_no(question, default="yes"):
"""Ask a yes/no question via raw_input() and return their answer.
"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
It must be "yes" (the default), "no" or None (meaning
an answer is required of the user).
The "answer" return value is True for "yes" or False for "no".
"""
valid = {"yes": True, "y": True, "ye": True,
"no": False, "n": False}
if default is None:
prompt = " [y/n] "
elif default == "yes":
prompt = " [Y/n] "
elif default == "no":
prompt = " [y/N] "
else:
raise ValueError("invalid default answer: '%s'" % default)
while True:
sys.stdout.write(question + prompt)
choice = raw_input().lower()
if default is not None and choice == '':
return valid[default]
elif choice in valid:
return valid[choice]
else:
sys.stdout.write("Please respond with 'yes' or 'no' "
"(or 'y' or 'n').\n")
print "Script written by cnrd and is a generic version of my GA-Z170X-UD3 script."
print "Thanks to Pike R. Alpha for the idea."
sleep(0.5)
print "\n" * 4
if ((len(sys.argv) > 1) and (str(sys.argv[1]) == "ORIGINAL")):
pass
else:
for i in range(1, 15):
portName = "HS" + str(i).zfill(2)
if query_yes_no("Do you want to enable: " + color.BOLD + portName + color.END + "?"):
HUBC = "0" + HUBC
if query_yes_no("You enabled: " + color.BOLD + portName + color.END + ", are you using it as an internally connected port (For example WiFi/Bluetooth module)?" ,"no"):
HSPorts[portName] = "0xFF"
else:
if query_yes_no("Is: " + color.BOLD + portName + color.END + " a USB 3.0 connector?"):
HSPorts[portName] = "0x03"
else:
HSPorts[portName] = "0x00"
else:
HUBC = "1" + HUBC
HSPorts[portName] = "0xFF"
# HUBC is 2 bytes long
HUBC = ("1" * (16 - len(HUBC))) + HUBC
for i in range(1, 11):
portName = "SS" + str(i).zfill(2)
if query_yes_no("Do you want to enable: " + color.BOLD + portName + color.END + "?"):
UMAP = "1" + UMAP
if query_yes_no("You enabled: " + color.BOLD + portName + color.END + ", are you using it as an internally connected port (For example WiFi/Bluetooth module)?", "no"):
SSPorts[portName] = "0xFF"
else:
SSPorts[portName] = "0x03"
else:
UMAP = "0" + UMAP
SSPorts[portName] = "0xFF"
# UMAP is 2 bytes long
UMAP = ("0" * (16 - len(UMAP))) + UMAP
if (HUBC.count("0") + UMAP.count("1")) > 15:
if not query_yes_no("You have more than 15 ports enabled, this require the ports patch, do you want to continue?", "no"):
print "\n"
print "Okay the program will exit now, run again and choose max 15 ports to avoid ports patch."
exit()
else:
pass
# Convert from bits to hex
HUBC = str(hex(int(HUBC, 2)))
UMAP = str(hex(int(UMAP, 2)))
# add to included DSL file
USBSSDT = USBSSDT.replace("[REPLACEHUBC]", HUBC)
USBSSDT = USBSSDT.replace("[REPLACEUMAP]", UMAP)
# Add port configuration according to answers.
for port in HSPorts:
if (HSPorts[port] == "0xFF"):
USBSSDT = USBSSDT.replace("[" + port + "]", HSPorts[port])
USBSSDT = USBSSDT.replace("[" + port + "GPLD]", "Zero")
else:
USBSSDT = USBSSDT.replace("[" + port + "]", HSPorts[port])
USBSSDT = USBSSDT.replace("[" + port + "GPLD]", "One")
for port in SSPorts:
if (SSPorts[port] == "0xFF"):
USBSSDT = USBSSDT.replace("[" + port + "]", SSPorts[port])
USBSSDT = USBSSDT.replace("[" + port + "GPLD]", "Zero")
else:
USBSSDT = USBSSDT.replace("[" + port + "]", SSPorts[port])
USBSSDT = USBSSDT.replace("[" + port + "GPLD]", "One")
# Write .dsl file to desktop
with open(os.path.join(savepath,"USB-SSDT.dsl"), "w") as dsl_file:
dsl_file.write(USBSSDT)
# Compile .dsl file using iasl61 (included with script)
with open(os.devnull, "w") as f:
call([os.path.join(currentpath,"iasl61"), os.path.join(savepath,"USB-SSDT.dsl")], stdout=f)
# Don't delete .dsl file on debug
if (len(sys.argv) > 1) and ((str(sys.argv[1]) == "DEBUG") or (str(sys.argv[1]) == "ORIGINAL")):
pass
else:
os.remove(os.path.join(savepath,"USB-SSDT.dsl"))
print "\n\n"
print "The file USB-SSDT.aml was added to your " + color.BOLD + "Desktop." + color.END + "\n"
print "Remove any other USB patches (Like USBInjectAll).\n"
print "Place the file in /EFI/Clover/ACPI/patched\n"
print "Add the following to ACPI in your config.plist"
print "<key>DropTables</key>\n <array>\n <dict>\n <key>Signature</key>\n <string>SSDT</string>\n <key>TableId</key>\n <string>xh_rvp10</string>\n </dict>\n </array>"