summaryrefslogtreecommitdiff
path: root/Core/EM/PCI/PciBus.sd
blob: 404482b6672c630b30d4699fdb15778828f226d5 (plain)
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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/BIN/Core/Modules/PciBus/PciBus.sd 22    9/10/12 12:54p Yakovlevs $
//
// $Revision: 22 $
//
// $Date: 9/10/12 12:54p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/BIN/Core/Modules/PciBus/PciBus.sd $
// 
// 22    9/10/12 12:54p Yakovlevs
// [TAG]  		EIP93341
// [Category]  	Improvement
// [Description]  	Preserve PCI DEV/LNK/SLT control register in S3 resume
// path.
// [Files]  		PciBus.c  PciBus.sd PciBus.uni PciSetup.h PciPort.c
// 
// 21    2/27/12 6:39p Artems
// EIP 83608: Added MANUFACTURING flag to setup controls
// 
// 20    11/09/11 1:54p Yakovlevs
// [TAG]  		EIP71380
// [Category]  	New Feature
// [Description]  	Core support for CSM opt-out feature
// [Files]  		PciBus.c; PciPort.c; PciBus.sd; PciBus.uni; PciSetup.h;
// PciBusSetup.c; 
// 
// 18    4/05/11 11:21a Yakovlevs
// [TAG]  		EIP53475
// [Category]  	New Feature
// [Description]  	PCI Express 3.0 support added. And minor bug fix.
// [Files]  		PciBus.c; PciHostBridge.c;  PciBus.h;  PciHostBridge.c;
// PciPort.c;
// 
// 17    1/20/11 3:13p Yakovlevs
// [TAG]  		EIP48181
// [Category]  	Improvement
// [Description]  	Update the PciBus eModule to utilize Setup
// Customization
// [Files]  		PciBus.sd
// 
// 16    12/08/10 3:18p Yakovlevs
// Removed Setup Option "Selectable DeEmphasis" since it is HwInit Bit.
// 
// 15    11/22/10 10:44a Yakovlevs
// Removed STR_HORIZONTAL_D_LINE string since it creates problems with
// reduced screen resolution.
// 
// 14    10/01/10 12:27p Felixp
// Link Training Defaults changed.
// 
// 13    4/13/10 12:02p Yakovlevs
// Changed Default ADPM settings to disable.
// 
// 12    3/01/10 6:09p Yakovlevs
// Pci Express V2.1 Support Added.
// 
// 10    12/04/09 12:00p Felixp
// UEFI 2.1 support.
// 
// 9     3/23/09 4:57p Yakovlevs
// Added generic support for PCI Express Hot-Plug.
// 
// 8     10/16/08 6:13p Fasihm
// Also added the MANUFACTURING flag to the setup questions.
// 
// 7     9/25/08 11:47a Yakovlevs
// Added Pci Bus Driver version display.
// 
// 5     3/30/07 5:19p Robert
// Updated Strings
// 
// 4     3/30/07 2:57p Robert
// 
// 3     3/14/07 2:04p Yakovlevs
// Hode PciOption Rom Option from PCI Setup Screen
// 
// 2     3/13/07 8:32p Yakovlevs
// 
// 1     3/12/07 12:07p Yakovlevs
// 

// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	PCIBus.sd
//
// Description:	PCI/PCIExpress/PCIX settings
//
//<AMI_FHDR_END>
//**********************************************************************

#ifdef SETUP_DATA_DEFINITION
/***********************************************************/
/* Put NVRAM data definitions here.
/* For example: UINT8 Data1;
/* These definitions will be converted by the build process
/* to a definitions of SETUP_DATA fields.
/***********************************************************/
#if ABOVE_4G_PCI_DECODE
    UINT8   Above4gDecode;          //[Disable]\ Enable 
#endif

	//General PCI Settings: [] - default
	UINT8   PciLatency;				//[32]\ 64 \ 96 \ 128 \ 160 \ 192 \ 224 \ 248
    UINT8   VgaPallete;             //[Disable]\ Enable 
    UINT8   PerrEnable;             //[Disable]\ Enable 
    UINT8   SerrEnable;             //[Disable]\ Enable 

#if PCI_X_SUPPORT
	UINT8 PciXLatency;				// 32 \[64]\ 96 \ 128 \ 160 \ 192 \ 224 \ 248
#endif

#if PCI_EXPRESS_SUPPORT
	//PCI Express Device Settings: [] - default
	UINT8	RelaxedOrdering; 		//[Disable]\ Enable 
	UINT8	ExtTagField; 			//[Disable]\ Enable 
	UINT8	NoSnoop;				// Disable \[Enable]
	UINT8	MaxPayload;				//[Auto]\ 128 \ 256 \ 512 \ 1024 \ 2048 \ 4096 (in bytes)
	UINT8   MaxReadRequest;			//[Auto]\ 128 \ 256 \ 512 \ 1024 \ 2048 \ 4096 (in bytes)
	//PCI Express Link settings: [] - default
	UINT8   AspmMode; 				//[Disable]\ Auto \ Force L0
	UINT8   ExtendedSynch;			//[Disable]\ Enable 
    UINT8   LnkTrRetry;             //[Disable]\ 2 \ 3 \ 5
    UINT16  LnkTrTimeout;           //[1...1000] (Microseconds uS)
    UINT8   LnkDisable;             //[Keep ON == 0] / Disable ==1
    UINT8   S3PciExpressScripts;    //[Disable]\ Enable

#if PCI_EXPRESS_GEN2_SUPPORT
    //Gen2 Device Settings
    UINT8   ComplTimeOut;           //[Disable]\ Default \ SHORT \ LONG
    UINT8   AriFwd;                 //[Disable]\ Enable
    UINT8   AtomOpReq;              //[Disable]\ Enable
    UINT8   AtomOpEgressBlk;        //[Disable]\ Enable
    UINT8   IDOReq;                 //[Disable]\ Enable
    UINT8   IDOCompl;               //[Disable]\ Enable
    UINT8   LtrReport;              //[Disable]\ Enable
    UINT8   E2ETlpPrBlk;            //[Disable]\ Enable

    //Gen2 Link Settings
    UINT8   LnkSpeed;               //[Auto]\ Forse to 5.0 GT/s \Force to 2.5 GT/s
    UINT8   DeEmphasis;             //[-3.5 dB]\ -6.0 dB
    UINT8   ClockPm;                 //[Disable]\ Enable
    UINT8   ComplSos;               //[Disable]\ Enable
    UINT8   HwAutoWidth;            //[Enable]\ Disable   LNK_CNT_REG #1
    UINT8   HwAutoSpeed;            //[Enable]\ Disable
#endif        

#endif

//Hotplug stuff.
#if AMI_HOTPLUG_INIT_SUPPORT
    UINT8   HotPlugEnable;          // Disable \[Enable]
    UINT8   BusPadd;                // Disable \[1]\ 2 \ 3 \ 4 \ 5
    //Following field stored in units of KB
    UINT8   IoPadd;                 // Disable \[ 4K]\ 8K \ 16K \ 32K  
    //Following fields stored in units of MB
    UINT8   Mmio32Padd;             // Disable \  1M \ 4M \  8M \[16M]\ 32M \ 64M \128M  
    UINT8   Mmio32PfPadd;           // Disable \  1M \ 4M \  8M \[16M]\ 32M \ 64M \128M  
    //for 512 and 1G 1 byte storege is not enough...
    UINT16  Mmio64Padd;             //[Disable]\  1M \ 4M \  8M \ 16M \ 32M \ 64M \ 128M \ 256M \ 512M \ 1G
    UINT16  Mmio64PfPadd;           //[Disable]\  1M \ 4M \  8M \ 16M \ 32M \ 64M \ 128M \ 256M \ 512M \ 1G
#endif

#endif //SETUP_DATA_DEFINITION

#if defined(VFRCOMPILE) && !defined(CONTROLS_ARE_DEFINED)
#define CONTROL_DEFINITION
#endif

#ifdef CONTROL_DEFINITION

#if ABOVE_4G_PCI_DECODE
#define PCIBUS_ONEOF_ABOVE4GDECODE\
		oneof varid  = SETUP_DATA.Above4gDecode,\
			prompt = STRING_TOKEN(STR_PCI_4G_PROMPT),\
			help = STRING_TOKEN(STR_PCI_4G_HELP),\
			option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
		endoneof;
#else
#define PCIBUS_ONEOF_ABOVE4GDECODE
#endif // #if ABOVE_4G_PCI_DECODE

#define PCIBUS_ONEOF_PCILATENCY\
		oneof varid  = SETUP_DATA.PciLatency,\
			prompt = STRING_TOKEN(STR_PCI_LATENCY_PROMPT),\
			help = STRING_TOKEN(STR_PCI_LATENCY_HELP),\
			option text = STRING_TOKEN(STR_PCI_32),  value = 32, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_64),  value = 64, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_96),  value = 96, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_128), value = 128, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_160), value = 160, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_192), value = 192, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_224), value = 224, flags = RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_PCI_248), value = 248, flags = RESET_REQUIRED;\
		endoneof;

#define PCIBUS_ONEOF_VGAPALLETE\
		oneof varid  = SETUP_DATA.VgaPallete,\
			prompt = STRING_TOKEN(STR_PCI_VGASNOOP_PROMPT),\
			help = STRING_TOKEN(STR_PCI_VGASNOOP_HELP),\
			option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
		endoneof;

#define PCIBUS_ONEOF_PERRENABLE\
		oneof varid  = SETUP_DATA.PerrEnable,\
			prompt = STRING_TOKEN(STR_PCI_PERR_PROMPT),\
			help = STRING_TOKEN(STR_PCI_PERR_HELP),\
			option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
		endoneof;

#define PCIBUS_ONEOF_SERRENABLE\
		oneof varid  = SETUP_DATA.SerrEnable,\
			prompt = STRING_TOKEN(STR_PCI_SERR_PROMPT),\
			help = STRING_TOKEN(STR_PCI_SERR_HELP),\
			option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
			option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
		endoneof;

#if PCI_X_SUPPORT
#define PCIBUS_ONEOF_PCIXLATENCY\
				oneof varid  = SETUP_DATA.PciXLatency,\
					prompt = STRING_TOKEN(STR_PCIX_LATENCY_PROMPT),\
					help = STRING_TOKEN(STR_PCI_LATENCY_HELP),\
					option text = STRING_TOKEN(STR_PCI_32),  value = 32, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_64),  value = 64, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_96),  value = 96, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_128), value = 128, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_160), value = 160, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_192), value = 192, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_224), value = 224, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_PCI_248), value = 248, flags = RESET_REQUIRED;\
				endoneof;
#else
#define PCIBUS_ONEOF_PCIXLATENCY
#endif // #if PCI_X_SUPPORT

#if PCI_EXPRESS_SUPPORT

#define PCIBUS_ONEOF_RELAXEDORDERING\
				oneof varid  = SETUP_DATA.RelaxedOrdering,\
					prompt = STRING_TOKEN(STR_PCIE_RELAXEDORDERING_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_RELAXEDORDERING_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_EXTTAGFIELD\
				oneof varid  = SETUP_DATA.ExtTagField,\
					prompt = STRING_TOKEN(STR_PCIE_EXTTAGFLD_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_EXTTAGFLD_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_NOSNOOP\
				oneof varid  = SETUP_DATA.NoSnoop,\
					prompt = STRING_TOKEN(STR_PCIE_NOSNOOP_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_NOSNOOP_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_MAXPAYLOAD\
				oneof varid  = SETUP_DATA.MaxPayload,\
					prompt = STRING_TOKEN(STR_PCIE_MAXPAYLOAD_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_MAXPAYLOAD_HELP),\
					option text = STRING_TOKEN(STR_AUTO), value = 55, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP128),  value = 0, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP256),  value = 1, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP512),  value = 2, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP1024),  value = 3, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP2048),  value = 4, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP4096),  value = 5, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_MAXREADREQUEST\
				oneof varid  = SETUP_DATA.MaxReadRequest,\
					prompt = STRING_TOKEN(STR_PCIE_MAXREADREQUEST_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_MAXREADREQUEST_HELP),\
					option text = STRING_TOKEN(STR_AUTO), value = 55, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP128),  value = 0, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP256),  value = 1, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP512),  value = 2, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP1024),  value = 3, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP2048),  value = 4, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_MP4096),  value = 5, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_ASPMMODE\
				oneof varid  = SETUP_DATA.AspmMode,\
					prompt = STRING_TOKEN(STR_PCIE_ASPM_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_ASPM_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_AUTO), value = 55, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_FORCE_L0),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_EXTENDEDSYNCH\
				oneof varid  = SETUP_DATA.ExtendedSynch,\
					prompt = STRING_TOKEN(STR_PCIE_EXTD_SYNCH_PROMPT),\
					help = STRING_TOKEN(STR_PCIE_EXTD_SYNCH_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_LNKTRRETRY\
				oneof varid  = SETUP_DATA.LnkTrRetry,\
					prompt = STRING_TOKEN(STR_LNK_TR_RETRY_PROMPT),\
					help = STRING_TOKEN(STR_LNK_TR_RETRY_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_2),  value = 2, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_3),  value = 3, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_5),  value = 5, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
				endoneof;

#define PCIBUS_NUM_LNKTRTIMEOUT\
                numeric varid = SETUP_DATA.LnkTrTimeout,\
					prompt = STRING_TOKEN(STR_LNK_TR_TIMEOUT_PROMPT),\
					help = STRING_TOKEN(STR_LNK_TR_TIMEOUT_HELP),\
                    flags     = RESET_REQUIRED,\
                    minimum   = 10,\
                    maximum   = 10000,\
                    step      = 10,\
                    option text = STRING_TOKEN(STR_EMPTY), value = 100, flags = DEFAULT | MANUFACTURING;\
                endnumeric;

#define PCIBUS_ONEOF_LNKDISABLE\
				oneof varid  = SETUP_DATA.LnkDisable,\
					prompt = STRING_TOKEN(STR_LNK_UNPOPULATED_PROMPT),\
					help = STRING_TOKEN(STR_LNK_UNPOPULATED_HELP),\
					option text = STRING_TOKEN(STR_KEEP_ON), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_DISABLE),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_S3PCIEXPRESSSCRIPTS\
				oneof varid  = SETUP_DATA.S3PciExpressScripts,\
					prompt = STRING_TOKEN(STR_DEV_S3_PCIE_SCRIPTS_PROMPT),\
					help = STRING_TOKEN(STR_DEV_S3_PCIE_SCRIPTS_HELP),\
					option text = STRING_TOKEN(STR_ENABLED), value = 0xFF, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_DISABLED), value = 0x00, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
				endoneof;

#if PCI_EXPRESS_GEN2_SUPPORT
#define PCIBUS_ONEOF_COMPLTIMEOUT\
				oneof varid  = SETUP_DATA.ComplTimeOut,\
					prompt = STRING_TOKEN(STR_DEV_COMPL_TIMEOUT_PROMPT),\
					help = STRING_TOKEN(STR_DEV_COMPL_TIMEOUT_HELP),\
					option text = STRING_TOKEN(STR_DEFAULT), value = 0xFF, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_SHORT),   value = 0x55, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_LONG),    value = 0xAA, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_DISABLED),value = 0x00, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_ARIFWD\
				oneof varid  = SETUP_DATA.AriFwd,\
					prompt = STRING_TOKEN(STR_DEV_ARI_PROMPT),\
					help = STRING_TOKEN(STR_DEV_ARI_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_ATOMOPREQ\
				oneof varid  = SETUP_DATA.AtomOpReq,\
					prompt = STRING_TOKEN(STR_DEV_AOP_REQ_PROMPT),\
					help = STRING_TOKEN(STR_DEV_AOP_REQ_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_ATOMOPEGRESSBLK\
				oneof varid  = SETUP_DATA.AtomOpEgressBlk,\
					prompt = STRING_TOKEN(STR_DEV_AOP_EGRESS_BLK_PROMPT),\
					help = STRING_TOKEN(STR_DEV_AOP_EGRESS_BLK_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_IDOREQ\
				oneof varid  = SETUP_DATA.IDOReq,\
					prompt = STRING_TOKEN(STR_DEV_IDO_REQ_PROMPT),\
					help = STRING_TOKEN(STR_DEV_IDO_REQ_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_IDOCOMPL\
				oneof varid  = SETUP_DATA.IDOCompl,\
					prompt = STRING_TOKEN(STR_DEV_IDO_COMPL_PROMPT),\
					help = STRING_TOKEN(STR_DEV_IDO_COMPL_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_LTRREPORT\
				oneof varid  = SETUP_DATA.LtrReport,\
					prompt = STRING_TOKEN(STR_DEV_LTR_REPORT_PROMPT),\
					help = STRING_TOKEN(STR_DEV_LTR_REPORT_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_E2ETLPPRBLK\
				oneof varid  = SETUP_DATA.E2ETlpPrBlk,\
					prompt = STRING_TOKEN(STR_DEV_E2E_TLP_BLK_PROMPT),\
					help = STRING_TOKEN(STR_DEV_E2E_TLP_BLK_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;


#define PCIBUS_ONEOF_LNKSPEED\
				oneof varid  = SETUP_DATA.LnkSpeed,\
					prompt = STRING_TOKEN(STR_LNK_SPEED_PROMPT),\
					help = STRING_TOKEN(STR_LNK_SPEED_HELP),\
					option text = STRING_TOKEN(STR_AUTO), value = 55, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_2_5G),  value = 1, flags = RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_5_0G),    value = 2, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_CLOCKPM\
				oneof varid  = SETUP_DATA.ClockPm,\
					prompt = STRING_TOKEN(STR_LNK_CLOCK_PM_PROMPT),\
					help = STRING_TOKEN(STR_LNK_CLOCK_PM_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_COMPLSOS\
				oneof varid  = SETUP_DATA.ComplSos,\
					prompt = STRING_TOKEN(STR_LNK_COMPL_SOS_PROMPT),\
					help = STRING_TOKEN(STR_LNK_COMPL_SOS_HELP),\
					option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_HWAUTOWIDTH\
				oneof varid  = SETUP_DATA.HwAutoWidth,\
					prompt = STRING_TOKEN(STR_LNK_HW_AUTO_WIDTH_PROMPT),\
					help = STRING_TOKEN(STR_LNK_HW_AUTO_WIDTH_HELP),\
					option text = STRING_TOKEN(STR_ENABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_DISABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;

#define PCIBUS_ONEOF_HWAUTOSPEED\
				oneof varid  = SETUP_DATA.HwAutoSpeed,\
					prompt = STRING_TOKEN(STR_LNK_HW_AUTO_SPEED_PROMPT),\
					help = STRING_TOKEN(STR_LNK_HW_AUTO_SPEED_HELP),\
					option text = STRING_TOKEN(STR_ENABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
					option text = STRING_TOKEN(STR_DISABLED),  value = 1, flags = RESET_REQUIRED;\
				endoneof;
#else

#define PCIBUS_ONEOF_COMPLTIMEOUT
#define PCIBUS_ONEOF_ARIFWD
#define PCIBUS_ONEOF_ATOMOPREQ
#define PCIBUS_ONEOF_ATOMOPEGRESSBLK
#define PCIBUS_ONEOF_IDOREQ
#define PCIBUS_ONEOF_IDOCOMPL
#define PCIBUS_ONEOF_LTRREPORT
#define PCIBUS_ONEOF_E2ETLPPRBLK
#define PCIBUS_ONEOF_LNKSPEED
#define PCIBUS_ONEOF_CLOCKPM
#define PCIBUS_ONEOF_COMPLSOS
#define PCIBUS_ONEOF_HWAUTOWIDTH
#define PCIBUS_ONEOF_HWAUTOSPEED

#endif//PCI_EXPRESS_GEN2_SUPPORT

#else
#define PCIBUS_ONEOF_RELAXEDORDERING
#define PCIBUS_ONEOF_EXTTAGFIELD
#define PCIBUS_ONEOF_NOSNOOP
#define PCIBUS_ONEOF_MAXPAYLOAD
#define PCIBUS_ONEOF_MAXREADREQUEST
#define PCIBUS_ONEOF_ASPMMODE
#define PCIBUS_ONEOF_EXTENDEDSYNCH
#define PCIBUS_ONEOF_LNKTRRETRY
#define PCIBUS_NUM_LNKTRTIMEOUT
#define PCIBUS_ONEOF_LNKDISABLE
#define PCIBUS_ONEOF_S3PCIEXPRESSSCRIPTS

#endif // #if PCI_EXPRESS_SUPPORT

#if AMI_HOTPLUG_INIT_SUPPORT
#define PCIBUS_ONEOF_HOTPLUGENABLE\
    		oneof varid  = SETUP_DATA.HotPlugEnable,\
        		prompt = STRING_TOKEN(STR_HOTPLUG_ENABLE_PROMPT),\
                help = STRING_TOKEN(STR_HOTPLUG_ENABLE_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_ENABLED),  value = 1, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_BUSPADD\
		    oneof varid  = SETUP_DATA.BusPadd,\
                prompt = STRING_TOKEN(STR_BUS_PADD_PROMPT),\
                help = STRING_TOKEN(STR_BUS_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1),  value = 1, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_2),  value = 2, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_3),  value = 3, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4),  value = 4, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_5),  value = 5, flags = RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_IOPADD\
		    oneof varid  = SETUP_DATA.IoPadd,\
                prompt = STRING_TOKEN(STR_IO_PADD_PROMPT),\
                help = STRING_TOKEN(STR_IO_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4K),  value = 4, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_8K),  value = 8, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_16K), value = 16, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_32K), value = 32, flags = RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_MMIO32PADD\
		    oneof varid  = SETUP_DATA.Mmio32Padd,\
                prompt = STRING_TOKEN(STR_MMIO32_PADD_PROMPT),\
                help = STRING_TOKEN(STR_MMIO32_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1M),  value = 1, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_2M),  value = 2, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4M),  value = 4, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_8M),  value = 8, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_16M), value = 16, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_32M), value = 32, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_64M), value = 64, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_128M),value = 128, flags = RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_MMIO32PFPADD\
		    oneof varid  = SETUP_DATA.Mmio32PfPadd,\
                prompt = STRING_TOKEN(STR_MMIO32PF_PADD_PROMPT),\
                help = STRING_TOKEN(STR_MMIO32PF_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1M),  value = 1, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_2M),  value = 2, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4M),  value = 4, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_8M),  value = 8, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_16M), value = 16, flags = DEFAULT | MANUFACTURING |RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_32M), value = 32, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_64M), value = 64, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_128M),value = 128, flags = RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_MMIO64PADD\
		    oneof varid  = SETUP_DATA.Mmio64Padd,\
                prompt = STRING_TOKEN(STR_MMIO64_PADD_PROMPT),\
                help = STRING_TOKEN(STR_MMIO64_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1M),  value = 1, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_2M),  value = 2, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4M),  value = 4, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_8M),  value = 8, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_16M), value = 16, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_32M), value = 32, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_64M), value = 64, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_128M),value = 128, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_256M), value = 256, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_512M), value = 512, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1G), value = 1024, flags = RESET_REQUIRED;\
            endoneof;

#define PCIBUS_ONEOF_MMIO64PFPADD\
		    oneof varid  = SETUP_DATA.Mmio64PfPadd,\
                prompt = STRING_TOKEN(STR_MMIO64PF_PADD_PROMPT),\
                help = STRING_TOKEN(STR_MMIO64PF_PADD_HELP),\
                option text = STRING_TOKEN(STR_DISABLED), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1M),  value = 1, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_2M),  value = 2, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_4M),  value = 4, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_8M),  value = 8, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_16M), value = 16, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_32M), value = 32, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_64M), value = 64, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_128M), value = 128, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_256M), value = 256, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_512M), value = 512, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_1G), value = 1024, flags = RESET_REQUIRED;\
            endoneof;

#else
#define PCIBUS_ONEOF_HOTPLUGENABLE
#define PCIBUS_ONEOF_BUSPADD
#define PCIBUS_ONEOF_IOPADD
#define PCIBUS_ONEOF_MMIO32PADD
#define PCIBUS_ONEOF_MMIO32PFPADD
#define PCIBUS_ONEOF_MMIO64PADD
#define PCIBUS_ONEOF_MMIO64PFPADD
#endif

#endif //#ifdef CONTROL_DEFINITION

#ifdef CONTROLS_WITH_DEFAULTS
	// PCIBUS_FORM_PCI
	PCIBUS_ONEOF_ABOVE4GDECODE
	PCIBUS_ONEOF_PCILATENCY
	PCIBUS_ONEOF_VGAPALLETE
	PCIBUS_ONEOF_PERRENABLE
	PCIBUS_ONEOF_SERRENABLE
	PCIBUS_ONEOF_PCIXLATENCY

	//PCIBUS_FORM_PCI_EXPRESS
	PCIBUS_ONEOF_RELAXEDORDERING
	PCIBUS_ONEOF_EXTTAGFIELD
	PCIBUS_ONEOF_NOSNOOP
	PCIBUS_ONEOF_MAXPAYLOAD
	PCIBUS_ONEOF_MAXREADREQUEST
	PCIBUS_ONEOF_ASPMMODE
	PCIBUS_ONEOF_EXTENDEDSYNCH
    PCIBUS_ONEOF_LNKTRRETRY
    PCIBUS_NUM_LNKTRTIMEOUT
    PCIBUS_ONEOF_LNKDISABLE
    PCIBUS_ONEOF_S3PCIEXPRESSSCRIPTS

	// PCIBUS_FORM_PCI_EXPRESS2
#if PCI_EXPRESS_GEN2_SUPPORT
	PCIBUS_ONEOF_COMPLTIMEOUT
	PCIBUS_ONEOF_ARIFWD
	PCIBUS_ONEOF_ATOMOPREQ
	PCIBUS_ONEOF_ATOMOPEGRESSBLK
	PCIBUS_ONEOF_IDOREQ
	PCIBUS_ONEOF_IDOCOMPL
	PCIBUS_ONEOF_LTRREPORT
	PCIBUS_ONEOF_E2ETLPPRBLK
	PCIBUS_ONEOF_LNKSPEED
	PCIBUS_ONEOF_CLOCKPM
	PCIBUS_ONEOF_COMPLSOS
	PCIBUS_ONEOF_HWAUTOWIDTH
	PCIBUS_ONEOF_HWAUTOSPEED
#endif

	// PCIBUS_FORM_PCIHP
	PCIBUS_ONEOF_HOTPLUGENABLE
	PCIBUS_ONEOF_BUSPADD
	PCIBUS_ONEOF_IOPADD
	PCIBUS_ONEOF_MMIO32PADD
	PCIBUS_ONEOF_MMIO32PFPADD
	PCIBUS_ONEOF_MMIO64PADD
	PCIBUS_ONEOF_MMIO64PFPADD

#endif //#ifdef CONTROLS_WITH_DEFAULTS


#ifdef ADVANCED_FORM_SET

    #ifndef SUPPRESS_GRAYOUT_ENDIF //old Core
    #define SUPPRESS_GRAYOUT_ENDIF endif;
    #endif

	#ifdef FORM_SET_ITEM
	// Define controls to be added to the main page of the formset
	#endif

	#ifdef FORM_SET_GOTO
	// Define goto commands for the forms defined in this file
		goto PCI_FORM_ID, 
			prompt = STRING_TOKEN(STR_PCI_FORM),
			help = STRING_TOKEN(STR_PCI_FORM_HELP);
	#endif


#ifdef FORM_SET_FORM
//
// Define forms
//

//////////////////////////////////////////////////////////////
//============================================================
//Main PCI Form START
//------------------------------------------------------------
#ifndef PCIBUS_FORM_PCI
#define PCIBUS_FORM_PCI
//------------------------------------------------------------

	form formid = AUTO_ID(PCI_FORM_ID),
		title = STRING_TOKEN(STR_PCI_FORM);

    //Display PCI Bus Driver Version. 
	text
	help   = STRING_TOKEN(STR_PCI_FORM_HELP),
	text   = STRING_TOKEN(STR_PCI_DRIVER_VER_PROMPT),
	text   = STRING_TOKEN(STR_PCI_DRIVER_VER),
	flags  = 0,
	key    = 0;

	SEPARATOR

#if ABOVE_4G_PCI_DECODE == 1
	SEPARATOR
    //Display PCI 64 bit Handling Subtitle 
	SUBTITLE(STRING_TOKEN(STR_PCI_64_SUB))
//  UINT8   Above4gDecode           //[Disable]\ Enable 
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
        PCIBUS_ONEOF_ABOVE4GDECODE
	endif;			
#endif


	SEPARATOR

	SUBTITLE(STRING_TOKEN(STR_PCI_SETTINGS))

//	UINT8 PciLatency;				//[32]\ 64 \ 96 \ 128 \ 160 \ 192 \ 224 \ 248
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
		PCIBUS_ONEOF_PCILATENCY
	endif;

//  UINT8   VgaPallete;             //[Disable]\ Enable 
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
		PCIBUS_ONEOF_VGAPALLETE
	endif;

//  UINT8   PerrEnable              //[Disable]\ Enable 
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
		PCIBUS_ONEOF_PERRENABLE
	endif;

//  UINT8   SerrEnable              //[Disable]\ Enable 
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
		PCIBUS_ONEOF_SERRENABLE
	endif;


#if PCI_X_SUPPORT
			SEPARATOR
			SUBTITLE(STRING_TOKEN(STR_PCIX))
//	UINT8 PciXLatency;				// 32 \[64]\ 96 \ 128 \ 160 \ 192 \ 224 \ 248

			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_PCIXLATENCY
			endif;
#endif

#if PCI_EXPRESS_SUPPORT

	SEPARATOR
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
	goto PCI_PCIE1_FORM_ID, 
		prompt = STRING_TOKEN(STR_PCI_PCIE1_FORM),
		help = STRING_TOKEN(STR_PCI_PCIE1_FORM_HELP);
    endif;

#if PCI_EXPRESS_GEN2_SUPPORT == 1
	SEPARATOR
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
	goto PCI_PCIE2_FORM_ID, 
		prompt = STRING_TOKEN(STR_PCI_PCIE2_FORM),
		help = STRING_TOKEN(STR_PCI_PCIE2_FORM_HELP);
    endif;
#endif


#endif

#if AMI_HOTPLUG_INIT_SUPPORT

	SEPARATOR
	grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
	goto PCI_HP_FORM_ID, 
		prompt = STRING_TOKEN(STR_PCI_HP_FORM),
		help = STRING_TOKEN(STR_PCI_HP_FORM_HELP);
    endif;

#endif

endform;  // PCI_FORM_ID
//------------------------------------------------------------
#endif //PCIBUS_FORM_PCI
//------------------------------------------------------------

//------------------------------------------------------------
//Main PCI Form END
//============================================================

//============================================================
//PCI Express Form START
//------------------------------------------------------------
#if PCI_EXPRESS_SUPPORT

#ifndef PCIBUS_FORM_PCI_EXPRESS
#define PCIBUS_FORM_PCI_EXPRESS

    // Define PCIe Settings Form
	form formid = AUTO_ID(PCI_PCIE1_FORM_ID),
		title = STRING_TOKEN(STR_PCI_PCIE1_FORM);

//PCI Express Device Settings: [] - default
			SUBTITLE(STRING_TOKEN(STR_PCIE_DEVICE))

//	UINT8	RelaxedOrdering; 		//[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_RELAXEDORDERING
			endif;			
//	UINT8	ExtTagField; 			//[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_EXTTAGFIELD
			endif;			

//	UINT8	NoSnoop;				// Disable \[Enable]
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_NOSNOOP
			endif;			


//	UINT8	MaxPayload				//[Auto]\ 128 \ 256 \ 512 \ 1024 \ 2048 \ 4096 (in bytes)
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_MAXPAYLOAD
			endif;			

			
//	UINT8   MaxReadRequest			//[Auto]\ 128 \ 256 \ 512 \ 1024 \ 2048 \ 4096 (in bytes)
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_MAXREADREQUEST
			endif;			

//PCI Express Link settings: [] - default
			SEPARATOR
			SUBTITLE(STRING_TOKEN(STR_PCIE_LINK))
//	UINT8 AspmMode; 				//[Disabled]\ Auto \ Force L0
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_ASPMMODE
			endif;			

			SUBTITLE(STRING_TOKEN(STR_PCIE_LINK_WARN3))
			SUBTITLE(STRING_TOKEN(STR_PCIE_LINK_WARN4))


//	UINT8 ExtendedSynch				//[Disable]\ Enable

			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_EXTENDEDSYNCH
			endif;			

			SEPARATOR
//  UINT8   LnkTrRetry;             //[Disable]\ 2 \ 3 \ 5
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_LNKTRRETRY
			endif;			

//  UINT8   LnkTrTimeout;             //[10...1000] uS 
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
                PCIBUS_NUM_LNKTRTIMEOUT
			endif;			

//  UINT8   EmptyLnkDisable             //[Enable]\ Disable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_LNKDISABLE
			endif;			
//  UINT8   S3PciExpressScripts;           //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_S3PCIEXPRESSSCRIPTS
			endif;

    endform; //PCI_PCIE2_FORM_ID
#endif //PCIBUS_FORM_PCI_EXPRESS
//------------------------------------------------------------
//PCI Express Form END
//============================================================


#if PCI_EXPRESS_GEN2_SUPPORT == 1
//============================================================
//PCI Express Gen II Form START
//------------------------------------------------------------

#ifndef PCIBUS_FORM_PCI_EXPRESS2
#define PCIBUS_FORM_PCI_EXPRESS2

	form formid = AUTO_ID(PCI_PCIE2_FORM_ID),
		title = STRING_TOKEN(STR_PCI_PCIE2_FORM);

			SUBTITLE(STRING_TOKEN(STR_PCIE2_DEVICE))
//  UINT8   ComplTimeOut;           //[Disable]\ Auto \ Default
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_COMPLTIMEOUT
			endif;			

//  UINT8   AriFwd;                 //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_ARIFWD
			endif;			

//  UINT8   AtomOpReq;              //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_ATOMOPREQ
			endif;			

//  UINT8   AtomOpEgressBlk;        //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_ATOMOPEGRESSBLK
			endif;			

//  UINT8   IDOReq;                 //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_IDOREQ
			endif;			

//  UINT8   IDOCompl;               //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_IDOCOMPL
			endif;			

//    UINT8   LtrReport;              //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_LTRREPORT
			endif;			


//    UINT8   E2ETlpPrBlk;            //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_E2ETLPPRBLK
			endif;			
//============================================================

			SEPARATOR
			SUBTITLE(STRING_TOKEN(STR_PCIE2_LINK))
//Gen2 Link Settings
//  UINT8   LnkSpeed;               //[Auto]\ Force to 2.5 GHz 
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_LNKSPEED
			endif;			


//  UINT8   ComplSos;               //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_CLOCKPM
			endif;			


//  UINT8   ComplSos;               //[Disable]\ Enable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_COMPLSOS
			endif;			

//  UINT8   HwAutoWidth;            //[Enable]\ Disable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_HWAUTOWIDTH
			endif;			

//  UINT8   HwAutoSpeed;            //[Enable]\ Disable
			grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
				PCIBUS_ONEOF_HWAUTOSPEED
			endif;			
    endform; //PCIBUS_FORM_PCI_EXPRESS2

#endif//PCIBUS_FORM_PCI_EXPRESS2

#endif//PCI_EXPRESS_GEN2_SUPPORT

#endif//PCI_EXPRESS_SUPPORT
//PCI Express Form END
//-----------------------------------------------------------

//-----------------------------------------------------------
//Hotplug Form
#if AMI_HOTPLUG_INIT_SUPPORT == 1
    // Define HOTPLUG form

#ifndef PCIBUS_FORM_PCIHP
#define PCIBUS_FORM_PCIHP

	form formid = AUTO_ID(PCI_HP_FORM_ID),
		title = STRING_TOKEN(STR_PCI_HP_FORM);

		SEPARATOR
        SUBTITLE(STRING_TOKEN(STR_PCI_HP_FORM))
		SEPARATOR
        
		grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_HOTPLUGENABLE
        endif;

		SEPARATOR

#if PCI_FIXED_BUS_ASSIGNMENT == 0
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_BUSPADD
        SUPPRESS_GRAYOUT_ENDIF
#endif

        //UINT8   IoPadd;                 // Disable \[ 4K]\ 8K \ 16K \ 32K  
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_IOPADD
        SUPPRESS_GRAYOUT_ENDIF
        
        //Following fields stored in units of MB
        //UINT8   Mmio32Padd;             // Disable \  1M \ 2M \4M \  8M \[16M]\ 32M \ 64M \128M  
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_MMIO32PADD
        SUPPRESS_GRAYOUT_ENDIF

        //UINT8   Mmio32PfPadd;           // Disable \  1M \ 4M \  8M \[16M]\ 32M \ 64M \128M  
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_MMIO32PFPADD
        SUPPRESS_GRAYOUT_ENDIF


//-----------------------------------------------------------
#if ABOVE_4G_PCI_DECODE == 1

        //for 512 and 1G 1 byte storege is not enough...
        //UINT16  Mmio64Padd;             //[Disable]\  1M \ 4M \  8M \ 16M \ 32M \ 64M \ 128M \ 256M \ 512M \ 1G
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0 OR 
                   ideqval SETUP_DATA.Above4gDecode == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_MMIO64PADD
        SUPPRESS_GRAYOUT_ENDIF

        //UINT16  Mmio64PfPadd;           //[Disable]\  1M \ 4M \  8M \ 16M \ 32M \ 64M \ 128M \ 256M \ 512M \ 1G
        suppressif ideqval SETUP_DATA.HotPlugEnable == 0 OR 
                   ideqval SETUP_DATA.Above4gDecode == 0;
        grayoutif ideqval SYSTEM_ACCESS.Access == SYSTEM_PASSWORD_USER;
			PCIBUS_ONEOF_MMIO64PFPADD
        SUPPRESS_GRAYOUT_ENDIF

#endif //ABOVE_4G_PCI_DECODE

    endform; //PCI_HP_FORM_ID
#endif // #ifndef PCIBUS_FORM_PCIHP

#endif //HOTPLUG_SUPPORT
//-----------------------------------------------------------

//-----------------------------------------------------------
#endif  // FORM_SET_FORM

//-----------------------------------------------------------
#endif  // ADVANCED_FORM_SET

//*************************************************************************
//*************************************************************************
//**                                                                     **
//**        (C)Copyright 1985-2011, American Megatrends, Inc.            **
//**                                                                     **
//**                       All Rights Reserved.                          **
//**                                                                     **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093           **
//**                                                                     **
//**                       Phone: (770)-246-8600                         **
//**                                                                     **
//*************************************************************************
//*************************************************************************