hc
2024-03-25 edb30157bad0c0001c32b854271ace01d3b9a16a
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
/** @file
  This file contains the CPU PCIe Root Port configuration
 
  Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
  SPDX-License-Identifier: BSD-2-Clause-Patent
**/
External(LTRX) // CPU PCIe Root Port 0 Latency Tolerance Reporting Enable
External(LTRY) // CPU PCIe Root Port 1 Latency Tolerance Reporting Enable
External(LTRZ) // CPU PCIe Root Port 2 Latency Tolerance Reporting Enable
External(LTRW) // CPU PCIe Root Port 3 Latency Tolerance Reporting Enable
External(SMSL) // CPU PCIe Root Port Latency Tolerance Reporting Max Snoop Latency
External(SNSL) // CPU PCIe Root Port Latency Tolerance Reporting Max No Snoop Latency
External(PG0E) // CpuPcieRp0Enable <b>0: Disable</b>; 1: Enable
External(PG1E) // CpuPcieRp1Enable <b>0: Disable</b>; 1: Enable
External(PG2E) // CpuPcieRp2Enable <b>0: Disable</b>; 1: Enable
External(PG3E) // CpuPcieRp3Enable <b>0: Disable</b>; 1: Enable
External(\_SB.PC00.PEG0, DeviceObj)
External(\_SB.PC00.PEG1, DeviceObj)
External(\_SB.PC00.PEG2, DeviceObj)
External(\_SB.PC00.PEG3, DeviceObj)
External(\_SB.PC00.PEG0.PEGP, DeviceObj)
External(\_SB.PC00.PEG1.PEGP, DeviceObj)
External(\_SB.PC00.PEG2.PEGP, DeviceObj)
External(\_SB.PC00.PEG3.PEGP, DeviceObj)
External(\AR02)
External(\PD02)
External(\AR0A)
External(\PD0A)
External(\AR0B)
External(\PD0B)
External(\AR0C)
External(\PD0C)
External(VMDE)
External(VMCP)
External(MPGN)
External(PBR1)
External(PBR2)
External(PBR3)
 
Scope (\_SB.PC00.PEG0) {
 
  Name(SLOT, 0) // CPU PCIe root port index 0 corresponds to PEG60 (0/6/0)
 
  Method (_STA, 0x0, NotSerialized) {
    if(PG0E == 1) { // If CPU PCIe RP0 enabled?
      Return(0x0F)
    }
    Return(0x00)
  }
 
  Name(LTEN, 0)
  Name(LMSL, 0)
  Name(LNSL, 0)
 
  Method(_INI)
  {
    Store (LTRX, LTEN)
    Store (SMSL, LMSL)
    Store (SNSL, LNSL)
    If(LAnd(CondRefOf(VMCP),CondRefOf(VMDE))) {
      If(LAnd(LEqual(VMDE,1),LNotEqual(And(VMCP,0x8),0))) {
        Store (1, CPMV)
      }
    }
  }
 
  Method(_PRT,0) {
    If(PICM) {
      Return(AR02)
    } // APIC mode
    Return (PD02) // PIC Mode
  } // end _PRT
 
  Include("CpuPcieRpCommon.asl")
} // PEG0 scope end
 
Scope (\_SB.PC00.PEG1) {
 
  Name(SLOT, 1) // CPU PCIe root port index 1 corresponds to PEG10 (0/1/0)
 
  Method (_STA, 0x0, NotSerialized) {
    if(PG1E == 1) { // If CPU PCIe RP1 enabled?
      Return(0x0F)
    }
    Return(0x00)
  }
 
  Name(LTEN, 0)
  Name(LMSL, 0)
  Name(LNSL, 0)
 
  Method(_INI)
  {
    Store (LTRY, LTEN)
    Store (SMSL, LMSL)
    Store (SNSL, LNSL)
    If(LAnd(CondRefOf(VMCP),CondRefOf(VMDE))) {
      If(LAnd(LEqual(VMDE,1),LNotEqual(And(VMCP,0x1),0))) {
        Store (1, CPMV)
      }
    }
  }
 
  Method(_PRT,0) {
    If(PICM) {
      Return(AR0A)
    } // APIC mode
    Return (PD0A) // PIC Mode
  } // end _PRT
 
  Include("CpuPcieRpCommon.asl")
} // PEG1 scope end
 
Scope (\_SB.PC00.PEG2) {
 
  Name(SLOT, 2) // CPU PCIe root port index 2 corresponds to PEG11 (0/1/1)
 
  Method (_STA, 0x0, NotSerialized) {
    if(PG2E == 1) { // If CPU PCIe RP2 enabled?
      Return(0x0F)
    }
    Return(0x00)
  }
 
  Name(LTEN, 0)
  Name(LMSL, 0)
  Name(LNSL, 0)
 
  Method(_INI)
  {
    Store (LTRZ, LTEN)
    Store (SMSL, LMSL)
    Store (SNSL, LNSL)
    If(LAnd(CondRefOf(VMCP),CondRefOf(VMDE))) {
      If(LAnd(LEqual(VMDE,1),LNotEqual(And(VMCP,0x2),0))) {
        Store (1, CPMV)
      }
    }
  }
 
  Method(_PRT,0) {
    If(PICM) {
      Return(AR0B)
    } // APIC mode
    Return (PD0B) // PIC Mode
  } // end _PRT
 
  Include("CpuPcieRpCommon.asl")
} // PEG2 scope end
 
If (CondRefOf(\_SB.PC00.PEG3)) {
  Scope (\_SB.PC00.PEG3) {
 
    Name(SLOT, 3) // CPU PCIe root port index 3 corresponds to PEG12 (0/1/2)
 
    Method (_STA, 0x0, NotSerialized) {
      if(PG3E == 1) { // If CPU PCIe RP3 enabled?
        Return(0x0F)
      }
      Return(0x00)
    }
 
    Name(LTEN, 0)
    Name(LMSL, 0)
    Name(LNSL, 0)
 
    Method(_INI)
    {
      Store (LTRW, LTEN)
      Store (SMSL, LMSL)
      Store (SNSL, LNSL)
      If(LAnd(CondRefOf(VMCP),CondRefOf(VMDE))) {
        If(LAnd(LEqual(VMDE,1),LNotEqual(And(VMCP,0x4),0))) {
          Store (1, CPMV)
        }
      }
    }
 
    Method(_PRT,0) {
      If(PICM) {
        Return(AR0C)
      } // APIC mode
      Return (PD0C) // PIC Mode
    } // end _PRT
 
    Include("CpuPcieRpCommon.asl")
  } // PEG3 scope end
}
 
Scope(\_SB.PC00.PEG0.PEGP) {
  Method(_PRW, 0) {
    Return(GPRW(0x69, 4)) // can wakeup from S4 state
  }
}
 
 
If (PBR1) {
  Scope(\_SB.PC00.PEG1.PEGP) {
    Method(_S0W, 0) { Return(4)} //D3cold is supported
 
    Device (PEGD) {
      Method(_S0W, 0) { Return(4)} //D3cold is supported
      Name(_ADR, 0x00000000)
      Method(_PRW, 0) { Return(GPRW(0x69, 4)) } // can wakeup from S4 state
    }
  } // end "P.E.G. Port Slot x16"
}
 
Scope(\_SB.PC00.PEG1.PEGP) {
  Method(_PRW, 0) {
    Return(GPRW(0x69, 4)) // can wakeup from S4 state
  }
}
 
 
If (PBR2) {
  Scope(\_SB.PC00.PEG2.PEGP) {
    Method(_S0W, 0) { Return(4)} //D3cold is supported
 
    Device (PEGD) {
      Method(_S0W, 0) { Return(4)} //D3cold is supported
      Name(_ADR, 0x00000000)
      Method(_PRW, 0) { Return(GPRW(0x69, 4)) } // can wakeup from S4 state
    }
  } // end "P.E.G. Port Slot 2x8"
}
 
Scope(\_SB.PC00.PEG2.PEGP) {
  Method(_PRW, 0) {
    Return(GPRW(0x69, 4)) // can wakeup from S4 state
  }
}
 
If (PBR3) {
  Scope(\_SB.PC00.PEG3.PEGP) {
    Method(_S0W, 0) { Return(4)} //D3cold is supported
 
    Device (PEGD) {
      Method(_S0W, 0) { Return(4)} //D3cold is supported
      Name(_ADR, 0x00000000)
      Method(_PRW, 0) { Return(GPRW(0x69, 4)) } // can wakeup from S4 state
    }
  } // end "P.E.G. Port Slot 1x8 - 2x4"
}
 
If (CondRefOf(\_SB.PC00.PEG3)) {
  Scope(\_SB.PC00.PEG3.PEGP) {
    Method(_PRW, 0) {
      Return(GPRW(0x69, 4)) // can wakeup from S4 state
    }
  }
}