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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
| /** @file
| This file contains the device definitions of the SystemAgent
| PCIE ACPI Reference Code.
|
| Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
| SPDX-License-Identifier: BSD-2-Clause-Patent
| **/
|
| External(\_SB.ISME, MethodObj)
| External(\_SB.SHPO, MethodObj)
| External(\_SB.CAGS, MethodObj)
| External(\_SB.GGOV, MethodObj)
| External(\_SB.SGOV, MethodObj)
| External(\_SB.PC00.PEG0, DeviceObj)
| External(\_SB.PC00.PEG1, DeviceObj)
| External(\_SB.PC00.PEG2, DeviceObj)
| External(\_SB.PC00.PEG3, DeviceObj)
| External(\_SB.PC00.PEG0.PPRW, MethodObj)
| External(\_SB.PC00.PEG1.PPRW, MethodObj)
| External(\_SB.PC00.PEG2.PPRW, MethodObj)
| External(\_SB.PC00.PEG3.PPRW, MethodObj)
| External(\_SB.PC00.PC2M, MethodObj)
| External(P8XH, MethodObj)
| External(SPCO, MethodObj)
| External(PINI, MethodObj) // Platform specific PCIe root port initialization
| External(PRES, MethodObj)
| External(GPRW, MethodObj)
| External(\SLOT)
| External(\P0WK)
| External(\P1WK)
| External(\P2WK)
| External(\P3WK)
| External(\XBAS)
| External(\SBN0)
| External(\SBN1)
| External(\SBN2)
| External(\SBN3)
| External(\EECP)
| External(\EEC1)
| External(\EEC2)
| External(\EEC3)
| External(\SGGP)
| External(\HRE0)
| External(\HRG0)
| External(\HRA0)
| External(\PWE0)
| External(\PWG0)
| External(\PWA0)
| External(\P1GP)
| External(\HRE1)
| External(\HRG1)
| External(\HRA1)
| External(\PWE1)
| External(\PWG1)
| External(\PWA1)
| External(\P2GP)
| External(\HRE2)
| External(\HRG2)
| External(\HRA2)
| External(\PWE2)
| External(\PWG2)
| External(\PWA2)
| External(\P3GP)
| External(\HRE3)
| External(\HRG3)
| External(\HRA3)
| External(\PWE3)
| External(\PWG3)
| External(\PWA3)
| External(\P0SC)
| External(\P1SC)
| External(\P2SC)
| External(\P3SC)
| External(\DLPW)
| External(\DLHR)
| External(\OBFX)
| External(\OBFY)
| External(\OBFZ)
| External(\OBFA)
| External(\OSYS)
|
| //GPE Event handling - Start
| Scope(\_GPE) {
| //
| // _L6F Method call for PEG0/1/2/3 ports to handle 2-tier RTD3 GPE events
| //
| Method(P0L6,0)
| {
| // PEG0 Device Wake Event
| If (\_SB.ISME(P0WK))
| {
| \_SB.SHPO(P0WK, 1) // set gpio ownership to driver(0=ACPI mode, 1=GPIO mode)
| Notify(\_SB.PC00.PEG0, 0x02) // device wake
| \_SB.CAGS(P0WK) // Clear GPE status bit for PEG0 WAKE
| }
| }
|
| Method(P1L6,0)
| {
| // PEG1 Device Wake Event
| If (\_SB.ISME(P1WK))
| {
| \_SB.SHPO(P1WK, 1) // set gpio ownership to driver(0=ACPI mode, 1=GPIO mode)
| Notify(\_SB.PC00.PEG1, 0x02) // device wake
| \_SB.CAGS(P1WK) // Clear GPE status bit for PEG1 WAKE
| }
| }
|
| Method(P2L6,0)
| {
| // PEG2 Device Wake Event
| If (\_SB.ISME(P2WK))
| {
| \_SB.SHPO(P2WK, 1) // set gpio ownership to driver(0=ACPI mode, 1=GPIO mode)
| Notify(\_SB.PC00.PEG2, 0x02) // device wake
| \_SB.CAGS(P2WK) // Clear GPE status bit for PEG2 WAKE
| }
| }
|
| If (CondRefOf(\_SB.PC00.PEG3)) {
| Method(P3L6,0)
| {
| // PEG2 Device Wake Event
| If (\_SB.ISME(P3WK))
| {
| \_SB.SHPO(P3WK, 1) // set gpio ownership to driver(0=ACPI mode, 1=GPIO mode)
| Notify(\_SB.PC00.PEG3, 0x02) // device wake
| \_SB.CAGS(P3WK) // Clear GPE status bit for PEG2 WAKE
| }
| }
| }
| } //Scope(\_GPE)
|
| If(LAnd((LEqual(HGMD,2)), (LEqual(HGST,1)))) {
| ///
| /// P.E.G. Root Port D6F0
| ///
| Scope(\_SB.PC00.PEG0) {
| Name(WKEN, 0)
|
| PowerResource(PG00, 0, 0) {
| Name(_STA, One)
| Method(_ON, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGON(0)
| Store(One, _STA)
| }
| }
| Method(_OFF, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGOF(0)
| Store(Zero, _STA)
| }
| }
| } //End of PowerResource(PG00, 0, 0)
|
| Name(_PR0,Package(){PG00})
| Name(_PR3,Package(){PG00})
|
| ///
| /// This method is used to enable/disable wake from PEG60 (WKEN)
| ///
| Method(_DSW, 3)
| {
| If(Arg1)
| {
| Store(0, WKEN) /// If entering Sx, need to disable WAKE# from generating runtime PME
| }
| Else
| { /// If Staying in S0
| If(LAnd(Arg0, Arg2)) ///- Check if Exiting D0 and arming for wake
| {
| Store(1, WKEN) ///- Set PME
| } Else {
| Store(0, WKEN) ///- Disable runtime PME, either because staying in D0 or disabling wake
| }
| }
| } // End _DSW
|
| ///
| /// This method is used to change the GPIO ownership back to ACPI and will be called in PEG OFF Method
| ///
| Method(P0EW, 0)
| {
| If(WKEN)
| {
| If(LNotEqual(SGGP, 0x0))
| {
| If(LEqual(SGGP, 0x1)) // GPIO mode
| {
| \_SB.SGOV(P0WK, 0x1)
| \_SB.SHPO(P0WK, 0x0) // set gpio ownership to ACPI(0=ACPI mode, 1=GPIO mode)
| }
| }
| }
| } // End P0EW
|
| Method(_S0W, 0) {
| Return(4) //D3cold is supported
| }
| }// end "P.E.G. Root Port D6F0"
|
| ///
| /// P.E.G. Root Port D1F0
| ///
| Scope(\_SB.PC00.PEG1) {
| Name(WKEN, 0)
|
| PowerResource(PG01, 0, 0) {
| Name(_STA, One)
| Method(_ON, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGON(1)
| Store(One, _STA)
| }
| }
| Method(_OFF, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGOF(1)
| Store(Zero, _STA)
| }
| }
| } //End of PowerResource(PG01, 0, 0)
|
| Name(_PR0,Package(){PG01})
| Name(_PR3,Package(){PG01})
|
| ///
| /// This method is used to enable/disable wake from PEG10 (WKEN)
| ///
| Method(_DSW, 3)
| {
| If(Arg1)
| {
| Store(0, WKEN) /// If entering Sx, need to disable WAKE# from generating runtime PME
| }
| Else
| { /// If Staying in S0
| If(LAnd(Arg0, Arg2)) ///- Check if Exiting D0 and arming for wake
| {
| Store(1, WKEN) ///- Set PME
| } Else {
| Store(0, WKEN) ///- Disable runtime PME, either because staying in D0 or disabling wake
| }
| }
| } // End _DSW
|
| ///
| /// This method is used to change the GPIO ownership back to ACPI and will be called in PEG OFF Method
| ///
| Method(P1EW, 0)
| {
| If(WKEN)
| {
| If(LNotEqual(P1GP, 0x0))
| {
| If(LEqual(P1GP, 0x1)) // GPIO mode
| {
| \_SB.SGOV(P1WK, 0x1)
| \_SB.SHPO(P1WK, 0x0) // set gpio ownership to ACPI(0=ACPI mode, 1=GPIO mode)
| }
| }
| }
| } // End P1EW
| }// end "P.E.G. Root Port D1F0"
|
| ///
| /// P.E.G. Root Port D1F1
| ///
| Scope(\_SB.PC00.PEG2) {
| Name(WKEN, 0)
|
| PowerResource(PG02, 0, 0) {
| Name(_STA, One)
| Method(_ON, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGON(2)
| Store(One, _STA)
| }
| }
| Method(_OFF, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGOF(2)
| Store(Zero, _STA)
| }
| }
| } //End of PowerResource(PG02, 0, 0)
|
| Name(_PR0,Package(){PG02})
|
| Name(_PR3,Package(){PG02})
|
| ///
| /// This method is used to enable/disable wake from PEG11 (WKEN)
| ///
| Method(_DSW, 3)
| {
| If(Arg1)
| {
| Store(0, WKEN) /// If entering Sx, need to disable WAKE# from generating runtime PME
| }
| Else
| { /// If Staying in S0
| If(LAnd(Arg0, Arg2)) ///- Check if Exiting D0 and arming for wake
| {
| Store(1, WKEN) ///- Set PME
| } Else {
| Store(0, WKEN) ///- Disable runtime PME, either because staying in D0 or disabling wake
| }
| }
| } // End _DSW
|
| ///
| /// This method is used to change the GPIO ownership back to ACPI and will be called in PEG OFF Method
| ///
| Method(P2EW, 0)
| {
| If(WKEN)
| {
| If(LNotEqual(P2GP, 0x0))
| {
| If(LEqual(P2GP, 0x1)) // GPIO mode
| {
| \_SB.SGOV(P2WK, 0x1)
| \_SB.SHPO(P2WK, 0x0) // set gpio ownership to ACPI(0=ACPI mode, 1=GPIO mode)
| }
| }
| }
| } // End P2EW
| }// end "P.E.G. Root Port D1F1"
|
| ///
| /// P.E.G. Root Port D1F2
| ///
| Scope(\_SB.PC00.PEG3) {
| Name(WKEN, 0)
|
| PowerResource(PG03, 0, 0) {
| Name(_STA, One)
| Method(_ON, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGON(3)
| Store(One, _STA)
| }
| }
| Method(_OFF, 0, Serialized) {
| If(LGreater(OSYS,2009)) {
| PGOF(3)
| Store(Zero, _STA)
| }
| }
| } //End of PowerResource(PG03, 0, 0)
|
| Name(_PR0,Package(){PG03})
| Name(_PR3,Package(){PG03})
|
| ///
| /// This method is used to enable/disable wake from PEG12 (WKEN)
| ///
| Method(_DSW, 3)
| {
| If(Arg1)
| {
| Store(0, WKEN) /// If entering Sx, need to disable WAKE# from generating runtime PME
| }
| Else
| { /// If Staying in S0
| If(LAnd(Arg0, Arg2)) ///- Check if Exiting D0 and arming for wake
| {
| Store(1, WKEN) ///- Set PME
| } Else {
| Store(0, WKEN) ///- Disable runtime PME, either because staying in D0 or disabling wake
| }
| }
| } // End _DSW
|
| ///
| /// This method is used to change the GPIO ownership back to ACPI and will be called in PEG OFF Method
| ///
| Method(P3EW, 0)
| {
| If(WKEN)
| {
| If(LNotEqual(P3GP, 0x0))
| {
| If(LEqual(P3GP, 0x1)) // GPIO mode
| {
| \_SB.SGOV(P3WK, 0x1)
| \_SB.SHPO(P3WK, 0x0) // set gpio ownership to ACPI(0=ACPI mode, 1=GPIO mode)
| }
| }
| }
| } // End P3EW
| }// end "P.E.G. Root Port D1F2"
|
| Scope (\_SB.PC00) {
|
| Name(IVID, 0xFFFF) //Invalid Vendor ID
|
| Name(PEBA, 0) //PCIE base address
|
| Name(PION, 0) //PEG index for ON Method
| Name(PIOF, 0) //PEG index for OFF Method
|
| Name(PBUS, 0) //PEG Rootport bus no
| Name(PDEV, 0) //PEG Rootport device no
| Name(PFUN, 0) //PEG Rootport function no
|
| Name(EBUS, 0) //Endpoint bus no
| Name(EDEV, 0) //Endpoint device no
| Name(EFN0, 0) //Endpoint function no 0
| Name(EFN1, 1) //Endpoint function no 1
|
| Name(LTRS, 0)
| Name(OBFS, 0)
|
| Name(DSOF, 0x06) //Device status PCI offset
| Name(CPOF, 0x34) //Capabilities pointer PCI offset
| Name(SBOF, 0x19) //PCI-2-PCI Secondary Bus number
|
| // PEG0 Endpoint variable to save/restore Link Capability, Link control, Subsytem VendorId and Device Id
| Name (ELC0, 0x00000000)
| Name (ECP0, 0xffffffff)
| Name (H0VI, 0x0000)
| Name (H0DI, 0x0000)
|
| // PEG1 Endpoint variable to save/restore Link Capability, Link control, Subsytem VendorId and Device Id
| Name (ELC1, 0x00000000)
| Name (ECP1, 0xffffffff)
| Name (H1VI, 0x0000)
| Name (H1DI, 0x0000)
|
| // PEG2 Endpoint variable to save/restore Link Capability, Link control, Subsytem VendorId and Device Id
| Name (ELC2, 0x00000000)
| Name (ECP2, 0xffffffff)
| Name (H2VI, 0x0000)
| Name (H2DI, 0x0000)
|
| // PEG3 Endpoint variable to save/restore Link Capability, Link control, Subsytem VendorId and Device Id
| Name (ELC3, 0x00000000)
| Name (ECP3, 0xffffffff)
| Name (H3VI, 0x0000)
| Name (H3DI, 0x0000)
|
| // PEG_AFELN[15:0]VMTX2_OFFSET variables
| Name(AFL0, 0)
| Name(AFL1, 0)
| Name(AFL2, 0)
| Name(AFL3, 0)
| Name(AFL4, 0)
| Name(AFL5, 0)
| Name(AFL6, 0)
| Name(AFL7, 0)
| Name(AFL8, 0)
| Name(AFL9, 0)
| Name(AFLA, 0)
| Name(AFLB, 0)
| Name(AFLC, 0)
| Name(AFLD, 0)
| Name(AFLE, 0)
| Name(AFLF, 0)
|
| //
| // Define a Memory Region for PEG60 root port that will allow access to its
| // Register Block.
| //
| OperationRegion(OPG0, SystemMemory, Add(XBAS,0x30000), 0x1000)
| Field(OPG0, AnyAcc,NoLock,Preserve)
| {
| Offset(0),
| P0VI, 16, //Vendor ID PCI offset
| P0DI, 16, //Device ID PCI offset
| Offset(0x06),
| DSO0, 16, //Device status PCI offset
| Offset(0x34),
| CPO0, 8, //Capabilities pointer PCI offset
| Offset(0x0B0),
| , 4,
| P0LD, 1, //Link Disable
| Offset(0x11A),
| , 1,
| P0VC, 1, //VC0RSTS.VC0NP
| Offset(0x214),
| , 16,
| P0LS, 4, //PEGSTS.LKS
| Offset(0x248),
| , 7,
| Q0L2, 1, //L23_Rdy Entry Request for RTD3
| Q0L0, 1, //L23 to Detect Transition for RTD3
| Offset(0x504),
| HST0, 32,
| Offset(0x508),
| P0TR, 1, //TRNEN.TREN
| Offset(0xC74),
| P0LT, 4, //LTSSM_FSM_RESTORE.LTSSM_FSM_PS
| Offset(0xD0C),
| LRV0, 32,
| }
|
| //
| // Define a Memory Region for Endpoint on PEG60 root port
| //
| OperationRegion (PCS0, SystemMemory, Add(XBAS,ShiftLeft(SBN0,20)), 0xF0)
| Field(PCS0, DWordAcc, Lock, Preserve)
| {
| Offset(0x0),
| D0VI, 16,
| Offset(0x2C),
| S0VI, 16,
| S0DI, 16,
| }
|
| OperationRegion(CAP0, SystemMemory, Add(Add(XBAS,ShiftLeft(SBN0,20)),EECP),0x14)
| Field(CAP0,DWordAcc, NoLock,Preserve)
| {
| Offset(0x0C), // Link Capabilities Register
| LCP0, 32, // Link Capabilities Register Data
| Offset(0x10),
| LCT0, 16, // Link Control register
| }
|
| //
| // Define a Memory Region for PEG10 root port that will allow access to its
| // Register Block.
| //
| OperationRegion(OPG1, SystemMemory, Add(XBAS,0x8000), 0x1000)
| Field(OPG1, AnyAcc,NoLock,Preserve)
| {
| Offset(0),
| P1VI, 16, //Vendor ID PCI offset
| P1DI, 16, //Device ID PCI offset
| Offset(0x06),
| DSO1, 16, //Device status PCI offset
| Offset(0x34),
| CPO1, 8, //Capabilities pointer PCI offset
| Offset(0x0B0),
| , 4,
| P1LD, 1, //Link Disable
| Offset(0x11A),
| , 1,
| P1VC, 1, //VC0RSTS.VC0NP
| Offset(0x214),
| , 16,
| P1LS, 4, //PEGSTS.LKS
| Offset(0x248),
| , 7,
| Q1L2, 1, //L23_Rdy Entry Request for RTD3
| Q1L0, 1, //L23 to Detect Transition for RTD3
| Offset(0x504),
| HST1, 32,
| Offset(0x508),
| P1TR, 1, //TRNEN.TREN
| Offset(0x70C),
| PA0V, 32, //PEG_AFELN0VMTX2_OFFSET
| Offset(0x71C),
| PA1V, 32, //PEG_AFELN1VMTX2_OFFSET
| Offset(0x72C),
| PA2V, 32, //PEG_AFELN2VMTX2_OFFSET
| Offset(0x73C),
| PA3V, 32, //PEG_AFELN3VMTX2_OFFSET
| Offset(0x74C),
| PA4V, 32, //PEG_AFELN4VMTX2_OFFSET
| Offset(0x75C),
| PA5V, 32, //PEG_AFELN5VMTX2_OFFSET
| Offset(0x76C),
| PA6V, 32, //PEG_AFELN6VMTX2_OFFSET
| Offset(0x77C),
| PA7V, 32, //PEG_AFELN7VMTX2_OFFSET
| Offset(0x78C),
| PA8V, 32, //PEG_AFELN8VMTX2_OFFSET
| Offset(0x79C),
| PA9V, 32, //PEG_AFELN9VMTX2_OFFSET
| Offset(0x7AC),
| PAAV, 32, //PEG_AFELNAVMTX2_OFFSET
| Offset(0x7BC),
| PABV, 32, //PEG_AFELNBVMTX2_OFFSET
| Offset(0x7CC),
| PACV, 32, //PEG_AFELNCVMTX2_OFFSET
| Offset(0x7DC),
| PADV, 32, //PEG_AFELNDVMTX2_OFFSET
| Offset(0x7EC),
| PAEV, 32, //PEG_AFELNEVMTX2_OFFSET
| Offset(0x7FC),
| PAFV, 32, //PEG_AFELNFVMTX2_OFFSET
| Offset(0x91C),
| , 31,
| BSP1, 1,
| Offset(0x93C),
| , 31,
| BSP2, 1,
| Offset(0x95C),
| , 31,
| BSP3, 1,
| Offset(0x97C),
| , 31,
| BSP4, 1,
| Offset(0x99C),
| , 31,
| BSP5, 1,
| Offset(0x9BC),
| , 31,
| BSP6, 1,
| Offset(0x9DC),
| , 31,
| BSP7, 1,
| Offset(0x9FC),
| , 31,
| BSP8, 1,
| Offset(0xC20),
| , 4,
| P1AP, 2, //AFEOVR.RXSQDETOVR
| Offset(0xC38),
| , 3,
| P1RM, 1, //CMNSPARE.PCUNOTL1
| Offset(0xC3C),
| , 31,
| PRST, 1,
| Offset(0xC74),
| P1LT, 4, //LTSSM_FSM_RESTORE.LTSSM_FSM_PS
| Offset(0xD0C),
| LRV1, 32,
| }
|
| //
| // Define a Memory Region for Endpoint on PEG10 root port
| //
| OperationRegion (PCS1, SystemMemory, Add(XBAS,ShiftLeft(SBN1,20)), 0xF0)
| Field(PCS0, DWordAcc, Lock, Preserve)
| {
| Offset(0x0),
| D1VI, 16,
| Offset(0x2C),
| S1VI, 16,
| S1DI, 16,
| }
|
| OperationRegion(CAP1, SystemMemory, Add(Add(XBAS,ShiftLeft(SBN1,20)),EEC1),0x14)
| Field(CAP0,DWordAcc, NoLock,Preserve)
| {
| Offset(0x0C), // Link Capabilities Register
| LCP1, 32, // Link Capabilities Register Data
| Offset(0x10),
| LCT1, 16, // Link Control register
| }
|
| //
| // Define a Memory Region for PEG11 root port that will allow access to its
| // Register Block.
| //
| OperationRegion(OPG2, SystemMemory, Add(XBAS,0x9000), 0x1000)
| Field(OPG2, AnyAcc,NoLock,Preserve)
| {
| Offset(0),
| P2VI, 16, //Vendor ID PCI offset
| P2DI, 16, //Device ID PCI offset
| Offset(0x06),
| DSO2, 16, //Device status PCI offset
| Offset(0x34),
| CPO2, 8, //Capabilities pointer PCI offset
| Offset(0x0B0),
| , 4,
| P2LD, 1, //Link Disable
| Offset(0x11A),
| , 1,
| P2VC, 1, //VC0RSTS.VC0NP
| Offset(0x214),
| , 16,
| P2LS, 4, //PEGSTS.LKS
| Offset(0x248),
| , 7,
| Q2L2, 1, //L23_Rdy Entry Request for RTD3
| Q2L0, 1, //L23 to Detect Transition for RTD3
| Offset(0x504),
| HST2, 32,
| Offset(0x508),
| P2TR, 1, //TRNEN.TREN
| Offset(0xC20),
| , 4,
| P2AP, 2, //AFEOVR.RXSQDETOVR
| Offset(0xC38),
| , 3,
| P2RM, 1, //CMNSPARE.PCUNOTL1
| Offset(0xC74),
| P2LT, 4, //LTSSM_FSM_RESTORE.LTSSM_FSM_PS
| Offset(0xD0C),
| LRV2, 32,
| }
|
| //
| // Define a Memory Region for Endpoint on PEG11 root port
| //
| OperationRegion (PCS2, SystemMemory, Add(XBAS,ShiftLeft(SBN2,20)), 0xF0)
| Field(PCS2, DWordAcc, Lock, Preserve)
| {
| Offset(0x0),
| D2VI, 16,
| Offset(0x2C),
| S2VI, 16,
| S2DI, 16,
| }
|
| OperationRegion(CAP2, SystemMemory, Add(Add(XBAS,ShiftLeft(SBN2,20)),EEC2),0x14)
| Field(CAP2,DWordAcc, NoLock,Preserve)
| {
| Offset(0x0C), // Link Capabilities Register
| LCP2, 32, // Link Capabilities Register Data
| Offset(0x10),
| LCT2, 16, // Link Control register
| }
|
|
| //
| // Define a Memory Region for PEG12 root port that will allow access to its
| // Register Block.
| //
| OperationRegion(OPG3, SystemMemory, Add(XBAS,0xA000), 0x1000)
| Field(OPG3, AnyAcc,NoLock,Preserve)
| {
| Offset(0),
| P3VI, 16, //Vendor ID PCI offset
| P3DI, 16, //Device ID PCI offset
| Offset(0x06),
| DSO3, 16, //Device status PCI offset
| Offset(0x34),
| CPO3, 8, //Capabilities pointer PCI offset
| Offset(0x0B0),
| , 4,
| P3LD, 1, //Link Disable
| Offset(0x11A),
| , 1,
| P3VC, 1, //VC0RSTS.VC0NP
| Offset(0x214),
| , 16,
| P3LS, 4, //PEGSTS.LKS
| Offset(0x248),
| , 7,
| Q3L2, 1, //L23_Rdy Entry Request for RTD3
| Q3L0, 1, //L23 to Detect Transition for RTD3
| Offset(0x504),
| HST3, 32,
| Offset(0x508),
| P3TR, 1, //TRNEN.TREN
| Offset(0xC20),
| , 4,
| P3AP, 2, //AFEOVR.RXSQDETOVR
| Offset(0xC38),
| , 3,
| P3RM, 1, //CMNSPARE.PCUNOTL1
| Offset(0xC74),
| P3LT, 4, //LTSSM_FSM_RESTORE.LTSSM_FSM_PS
| Offset(0xD0C),
| LRV3, 32,
| }
|
| //
| // Define a Memory Region for Endpoint on PEG2 root port
| //
| OperationRegion (PCS3, SystemMemory, Add(XBAS,ShiftLeft(SBN3,20)), 0xF0)
| Field(PCS2, DWordAcc, Lock, Preserve)
| {
| Offset(0x0),
| D3VI, 16,
| Offset(0x2C),
| S3VI, 16,
| S3DI, 16,
| }
|
| OperationRegion(CAP3, SystemMemory, Add(Add(XBAS,ShiftLeft(SBN3,20)),EEC3),0x14)
| Field(CAP3,DWordAcc, NoLock,Preserve)
| {
| Offset(0x0C), // Link Capabilities Register
| LCP3, 32, // Link Capabilities Register Data
| Offset(0x10),
| LCT3, 16, // Link Control register
| }
|
| //
| // Name: PGON
| // Description: Function to put the Pcie Endpoint in ON state
| // Input: Arg0 -> PEG index
| // Return: Nothing
| //
| Method(PGON,1,Serialized)
| {
| Store(Arg0, PION)
|
| //
| // Check for the GPIO support on PEG0/1/2/3 Configuration and Return if it is not supported.
| //
| If (LEqual(PION, 0))
| {
| If (LEqual(SGGP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PION, 1))
| {
| If (LEqual(P1GP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PION, 2))
| {
| If (LEqual(P2GP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PION, 3))
| {
| If (LEqual(P3GP, 0x0))
| {
| Return ()
| }
| }
| Store(\XBAS, PEBA)
| Store(GDEV(PIOF), PDEV)
| Store(GFUN(PIOF), PFUN)
|
| /// de-assert CLK_REQ MSK
| PGSC(Arg0, 1)
|
| If (LEqual(CCHK(PION, 1), 0))
| {
| Return ()
| }
|
| //Power on the Endpoint
| GPPR(PION, 1)
|
| // Restore PEG Recipe before program L23R2DT
| //\_SB.PC00.PEG1.RAVR()
|
| // Enable link for RTD3
| RTEN()
|
| // Re-store the DGPU Subsystem VendorID, DeviceID & Link control register data
| If (LEqual(PION, 0))
| {
| Store(H0VI, S0VI)
| Store(H0DI, S0DI)
| Or(And(ELC0,0x0043),And(LCT0,0xFFBC),LCT0)
| }
| ElseIf (LEqual(PION, 1))
| {
| Store(H1VI, S1VI)
| Store(H1DI, S1DI)
| Or(And(ELC1,0x0043),And(LCT1,0xFFBC),LCT1)
| }
| ElseIf (LEqual(PION, 2))
| {
| Store(H2VI, S2VI)
| Store(H2DI, S2DI)
| Or(And(ELC2,0x0043),And(LCT2,0xFFBC),LCT2)
| }
| ElseIf (LEqual(PION, 3))
| {
| Store(H3VI, S3VI)
| Store(H3DI, S3DI)
| Or(And(ELC3,0x0043),And(LCT3,0xFFBC),LCT3)
| }
| Return ()
| } // End of Method(PGON,1,Serialized)
|
| //
| // Name: PGOF
| // Description: Function to put the Pcie Endpoint in OFF state
| // Input: Arg0 -> PEG index
| // Return: Nothing
| //
| Method(PGOF,1,Serialized)
| {
|
| Store(Arg0, PIOF)
| //
| // Check for the GPIO support on PEG0/1/2 Configuration and Return if it is not supported.
| //
| If (LEqual(PIOF, 0))
| {
| If (LEqual(SGGP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PIOF, 1))
| {
| If (LEqual(P1GP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PIOF, 2))
| {
| If (LEqual(P2GP, 0x0))
| {
| Return ()
| }
| }
| ElseIf (LEqual(PIOF, 3))
| {
| If (LEqual(P3GP, 0x0))
| {
| Return ()
| }
| }
|
| Store(\XBAS, PEBA)
| Store(GDEV(PIOF), PDEV)
| Store(GFUN(PIOF), PFUN)
|
| If (LEqual(CCHK(PIOF, 0), 0))
| {
| Return ()
| }
|
| // Save Endpoint Link Control register, Subsystem VendorID & Device ID, Link capability Data
| If (LEqual(Arg0, 0)) //PEG60
| {
| Store(LCT0, ELC0)
| Store(S0VI, H0VI)
| Store(S0DI, H0DI)
| Store(LCP0, ECP0)
| }
| ElseIf (LEqual(Arg0, 1)) //PEG10
| {
| Store(LCT1, ELC1)
| Store(S1VI, H1VI)
| Store(S1DI, H1DI)
| Store(LCP1, ECP1)
| }
| ElseIf (LEqual(Arg0, 2)) //PEG11
| {
| Store(LCT2, ELC2)
| Store(S2VI, H2VI)
| Store(S2DI, H2DI)
| Store(LCP2, ECP2)
| }
| ElseIf (LEqual(Arg0, 3)) //PEG12
| {
| Store(LCT3, ELC3)
| Store(S3VI, H3VI)
| Store(S3DI, H3DI)
| Store(LCP3, ECP3)
| }
|
| //\_SB.PC00.PEG0.SAVR()
|
| // Put link in L2
| RTDS()
|
| /// assert CLK_REQ MSK
| ///
| /// On RTD3 entry, BIOS will instruct the PMC to disable source clocks.
| /// This is done through sending a PMC IPC command.
| ///
| PGSC(Arg0, 0)
|
| //Power-off the Endpoint
| GPPR(PIOF, 0)
| //Method to set Wake GPIO ownership from GPIO to ACPI for Device Initiated RTD3
| DIWK(PIOF)
|
| Return ()
| } // End of Method(PGOF,1,Serialized)
|
|
| //
| // Name: GDEV
| // Description: Function to return the PEG device no for the given PEG index
| // Input: Arg0 -> PEG index
| // Return: PEG device no for the given PEG index
| //
| Method(GDEV,1)
| {
| If(LEqual(Arg0, 0))
| {
| Store(0x6, Local0) //Device6-Function0 = 00110.000
| }
| ElseIf(LEqual(Arg0, 1))
| {
| Store(0x1, Local0) //Device1-Function0 = 00001.000
| }
| ElseIf(LEqual(Arg0, 2))
| {
| Store(0x1, Local0) //Device1-Function2 = 00001.001
| }
| ElseIf(LEqual(Arg0, 3))
| {
| Store(0x1, Local0) //Device1-Function3 = 00001.010
| }
|
| Return(Local0)
| } // End of Method(GDEV,1)
|
| //
| // Name: GFUN
| // Description: Function to return the PEG function no for the given PEG index
| // Input: Arg0 -> PEG index
| // Return: PEG function no for the given PEG index
| //
| Method(GFUN,1)
| {
| If(LEqual(Arg0, 0))
| {
| Store(0x0, Local0) //Device6-Function0 = 00110.000
| }
| ElseIf(LEqual(Arg0, 1))
| {
| Store(0x0, Local0) //Device1-Function0 = 00001.000
| }
| ElseIf(LEqual(Arg0, 2))
| {
| Store(0x1, Local0) //Device1-Function1 = 00001.001
| }
| ElseIf(LEqual(Arg0, 2))
| {
| Store(0x2, Local0) //Device1-Function2 = 00001.010
| }
|
| Return(Local0)
| } // End of Method(GFUN,1)
|
| //
| // Name: CCHK
| // Description: Function to check whether _ON/_OFF sequence is allowed to execute for the given PEG controller or not
| // Input: Arg0 -> PEG index
| // Arg1 -> 0 means _OFF sequence, 1 means _ON sequence
| // Return: 0 - Don't execute the flow, 1 - Execute the flow
| //
| Method(CCHK,2)
| {
|
| //Check for Referenced PEG controller is present or not
| If(LEqual(Arg0, 0))
| {
| Store(P0VI, Local7)
| }
| ElseIf(LEqual(Arg0, 1))
| {
| Store(P1VI, Local7)
| }
| ElseIf(LEqual(Arg0, 2))
| {
| Store(P2VI, Local7)
| }
| ElseIf(LEqual(Arg0, 3))
| {
| Store(P3VI, Local7)
| }
|
| If(LEqual(Local7, IVID))
| {
| Return(0)
| }
|
| If(LNotEqual(Arg0, 1))
| {
| //Check for PEG10 controller presence
| Store(P1VI, Local7)
| If(LEqual(Local7, IVID))
| {
| Return(0)
| }
| }
|
| //If Endpoint is not present[already disabled] before executing PGOF then don't call the PGOF method
| //If Endpoint is present[already enabled] before executing PGON then don't call the PGON method
| If(LEqual(Arg1, 0))
| {
| //_OFF sequence condition check
| If(LEqual(Arg0, 0))
| {
| If(LEqual(SGPI(SGGP, PWE0, PWG0, PWA0), 0))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 1))
| {
| If(LEqual(SGPI(P1GP, PWE1, PWG1, PWA1), 0))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 2))
| {
| If(LEqual(SGPI(P2GP, PWE2, PWG2, PWA2), 0))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 3))
| {
| If(LEqual(SGPI(P3GP, PWE3, PWG3, PWA3), 0))
| {
| Return(0)
| }
| }
| }
| ElseIf(LEqual(Arg1, 1))
| {
| //_ON sequence condition check
| If(LEqual(Arg0, 0))
| {
| If(LEqual(SGPI(SGGP, PWE0, PWG0, PWA0), 1))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 1))
| {
| If(LEqual(SGPI(P1GP, PWE1, PWG1, PWA1), 1))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 2))
| {
| If(LEqual(SGPI(P2GP, PWE2, PWG2, PWA2), 1))
| {
| Return(0)
| }
| }
| If(LEqual(Arg0, 3))
| {
| If(LEqual(SGPI(P3GP, PWE3, PWG3, PWA3), 1))
| {
| Return(0)
| }
| }
| }
|
| Return(1)
| }
|
|
| //
| // Name: SGPI [PCIe GPIO Read]
| // Description: Function to Read from PCIe GPIO
| // Input: Arg0 -> Gpio Support
| // Arg1 -> Expander Number
| // Arg2 -> Gpio Number
| // Arg3 -> Active Information
| // Return: GPIO value
| //
| Method(SGPI, 4, Serialized)
| {
| If (LEqual(Arg0, 0x01))
| {
| //
| // PCH based GPIO
| //
| If (CondRefOf(\_SB.GGOV))
| {
| Store(\_SB.GGOV(Arg2), Local0)
| }
| }
| //
| // Invert if Active Low
| //
| If (LEqual(Arg3,0))
| {
| Not(Local0, Local0)
| And (Local0, 0x01, Local0)
| }
|
| Return(Local0)
| }// End of Method(SGPI)
|
| // Name: PGSC [PEG port source clock control]
| // Description: Function to enable/disable PEG port source clocks
| // Input: Arg0 -> PEG index
| // Arg1 -> Enable/Disable Clock (0 = Disable, 1 = Enable)
| // Return: Nothing
| //
|
| Method(PGSC, 2, Serialized)
| {
| If(LEqual(Arg0, 0)) { // PEG0
| Store (P0SC, Local0)
| } ElseIf(LEqual(Arg0, 1)) { // PEG1
| Store (P1SC, Local0)
| } ElseIf(LEqual(Arg0, 2)) { // PEG2
| Store (P2SC, Local0)
| } ElseIf(LEqual(Arg0, 3)) {// PEG3
| Store (P3SC, Local0)
| } Else {
| Return()
| }
|
| SPCO (Local0, Arg1)
| }// End of Method(PGSC)
|
| //
| // Name: GPPR
| // Description: Function to do Endpoint ON/OFF using GPIOs
| // There are two GPIOs currently used to control Third Party Vendor[TPV] DGPU Endpoint devices:
| // (1) DGPU_PWR_EN [used for Power control]
| // (2) DGPU_HOLD_RST[used for Reset control]
| // Input: Arg0 -> PEG index
| // Arg1 -> 0 means _OFF sequence, 1 means _ON sequence
| // Return: Nothing
| //
| Method(GPPR,2)
| {
|
| If(LEqual(Arg1, 0))
| {
| //_OFF sequence GPIO programming
| If(LEqual(Arg0, 0))
| {
| SGPO(SGGP, HRE0, HRG0, HRA0, 1) // Assert PCIe0/dGPU_HOLD_RST# (PERST#)
| //Sleep(DLHR) // As per the PCIe spec, Wait for 'given'ms after Assert the Reset
| SGPO(SGGP, PWE0, PWG0, PWA0, 0) // Deassert PCIe0/dGPU_PWR_EN#
| }
|
| If(LEqual(Arg0, 1))
| {
| SGPO(P1GP, HRE1, HRG1, HRA1, 1) // Assert PCIe1_HOLD_RST# (PERST#)
| //Sleep(DLHR) // As per the PCIe spec, Wait for 'given'ms after Assert the Reset
| SGPO(P1GP, PWE1, PWG1, PWA1, 0) // Deassert PCIe1_PWR_EN#
| }
|
| If(LEqual(Arg0, 2))
| {
| SGPO(P2GP, HRE2, HRG2, HRA2, 1) // Assert PCIe2_HOLD_RST# (PERST#)
| //Sleep(DLHR) // As per the PCIe spec, Wait for 'given'ms after Assert the Reset
| SGPO(P2GP, PWE2, PWG2, PWA2, 0) // Deassert PCIe2_PWR_EN#
| }
|
| If(LEqual(Arg0, 3))
| {
| SGPO(P3GP, HRE3, HRG3, HRA3, 1) // Assert PCIe3_HOLD_RST# (PERST#)
| //Sleep(DLHR) // As per the PCIe spec, Wait for 'given'ms after Assert the Reset
| SGPO(P3GP, PWE3, PWG3, PWA3, 0) // Deassert PCIe2_PWR_EN#
| }
| }
| ElseIf(LEqual(Arg1, 1))
| {
| //_ON sequence GPIO programming
| If(LEqual(Arg0, 0))
| {
| SGPO(SGGP, PWE0, PWG0, PWA0, 1) //Assert dGPU_PWR_EN#
|
| //Sleep(DLPW) // Wait for 'given'ms for power to get stable
| SGPO(SGGP, HRE0, HRG0, HRA0, 0) //Deassert dGPU_HOLD_RST# as per the PCIe spec
|
| //Sleep(DLHR) // Wait for 'given'ms after Deassert
| }
|
| If(LEqual(Arg0, 1))
| {
| SGPO(P1GP, PWE1, PWG1, PWA1, 1) //Assert dGPU_PWR_EN#
|
| //Sleep(DLPW) // Wait for 'given'ms for power to get stable
| SGPO(P1GP, HRE1, HRG1, HRA1, 0) //Deassert dGPU_HOLD_RST# as per the PCIe spec
|
| //Sleep(DLHR) // Wait for 'given'ms after Deassert
| }
|
| If(LEqual(Arg0, 2))
| {
| SGPO(P2GP, PWE2, PWG2, PWA2, 1) //Assert dGPU_PWR_EN#
|
| //Sleep(DLPW) // Wait for 'given'ms for power to get stable
| SGPO(P2GP, HRE2, HRG2, HRA2, 0) //Deassert dGPU_HOLD_RST# as per the PCIe spec
|
| //Sleep(DLHR) // Wait for 'given'ms after Deassert
| }
|
| If(LEqual(Arg0, 3))
| {
| SGPO(P3GP, PWE3, PWG3, PWA3, 1) //Assert dGPU_PWR_EN#
|
| //Sleep(DLPW) // Wait for 'given'ms for power to get stable
| SGPO(P3GP, HRE3, HRG3, HRA3, 0) //Deassert dGPU_HOLD_RST# as per the PCIe spec
|
| //Sleep(DLHR) // Wait for 'given'ms after Deassert
| }
| }
| } // End of Method(GPPR,2)
|
| //
| // Name: SGPO [PCIe GPIO Write]
| // Description: Function to write into PCIe GPIO
| // Input: Arg0 -> Gpio Support
| // Arg1 -> Expander Number
| // Arg2 -> Gpio Number
| // Arg3 -> Active Information
| // Arg4 -> Value to write
| // Return: Nothing
| //
|
| Method(SGPO, 5, Serialized)
| {
| //
| // Invert if Active Low
| //
| If (LEqual(Arg3,0))
| {
| Not(Arg4, Arg4)
| And(Arg4, 0x01, Arg4)
| }
| If (LEqual(Arg0, 0x01))
| {
| //
| // PCH based GPIO
| //
| If (CondRefOf(\_SB.SGOV))
| {
| \_SB.SGOV(Arg2, Arg4)
| }
| }
| } // End of Method(SGPO)
|
| //
| // Name: DIWK
| // Description: Function which set the GPIO ownership to ACPI for device initiated RTD3
| // Input: PEG Index
| // Return: Nothing
| //
| Method(DIWK,1)
| {
| If (LEqual(Arg0, 0))
| {
| \_SB.PC00.PEG0.P0EW()
| }
| ElseIf (LEqual(Arg0, 1))
| {
| \_SB.PC00.PEG1.P1EW()
| }
| ElseIf (LEqual(Arg0, 2))
| {
| \_SB.PC00.PEG2.P2EW()
| }
| ElseIf (LEqual(Arg0, 3))
| {
| \_SB.PC00.PEG3.P3EW()
| }
| }
| }// End of Scope (\_SB.PC00)
| }
|
|