summaryrefslogtreecommitdiff
path: root/Board/EM/AmiGopPolicy/AmiGopPolicy.sd
blob: 4bdc9103223d25329d9b42fbfe8cda35ccf061b0 (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
//**********************************************************************
//**********************************************************************
//**                                                                  **
//**        (C)Copyright 1985-2012, American Megatrends, Inc.         **
//**                                                                  **
//**                       All Rights Reserved.                       **
//**                                                                  **
//**      5555 Oakbrook Parkway, Suite 200, Norcross, GA 30093        **
//**                                                                  **
//**                       Phone: (770)-246-8600                      **
//**                                                                  **
//**********************************************************************
//**********************************************************************

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/AmiGopPolicy/AmiGopPolicy.sd 3     6/26/14 3:19a Josephlin $
//
// $Revision: 3 $
//
// $Date: 6/26/14 3:19a $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/AmiGopPolicy/AmiGopPolicy.sd $
// 
// 3     6/26/14 3:19a Josephlin
// [TAG]  		EIP168961
// [Category]  	Bug Fix
// [Severity]  	Important
// [Symptom]  	All output device are displayed to "Unknow" if CSM has not
// disabled.
// [RootCause]  	In EIP168961, this module had changed module specific
// variable's GUID not equal to AMI_GLOBAL_VARIABLE_GUID but without
// changed AmiGopPolicy.sd.
// [Solution]  	Change guid from SETUP_GUID to
// AMI_GOP_POLICY_VARIABLE_GUID.
// [Files]  		AmiGopPolicy.sd
// 
// 2     7/26/12 7:30a Josephlin
// Update File Header.
// 
// 1     6/29/12 3:44a Josephlin
// [TAG]  		EIP91970
// [Category]  	New Feature
// [Description]  	Initial Release for Display Switch with UEFI GOP driver
// support.
// [Files]  		AmiGopPolicy.cif
// AmiGopPolicy.c
// AmiGopPolicy.h
// AmiGopPolicy.mak
// AmiGopPolicy.sd
// AmiGopPolicy.sdl
// AmiGopPolicy.uni
// AmiGopPolicyLib.c
// AmiGopPolicySetup.c
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:        AmiGopPolicy.sd
//
// Description:	AmiGopPolicy Setup Form.
//
//<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.
    UINT8   GopOutputSelect;
#endif //SETUP_DATA_DEFINITION

#ifdef FORM_SET_TYPEDEF
	#include "AmiGopPolicy.h"
#endif

//Select Top level menu itmem (forset) for you pages
#ifdef ADVANCED_FORM_SET
    #ifndef SUPPRESS_GRAYOUT_ENDIF //old Core
    #define SUPPRESS_GRAYOUT_ENDIF endif;
    #endif

    #ifdef FORM_SET_VARSTORE
       varstore AMI_GOP_POLICY_SETUP_DATA,
       key   = AUTO_ID(AMI_GOP_POLICY_SETUP_DATA_ID),
       name  = AmiGopPolicySetupData,
       guid  = AMI_GOP_POLICY_VARIABLE_GUID;
    #endif

#ifdef FORM_SET_GOTO
// Define goto commands for the forms defined in this file
//	goto ID_OF_MY_FORM, 
//		prompt = STRING_TOKEN(STR_FORM_TITLE),
//		help = STRING_TOKEN(STR_FORM_HELP);
	suppressif  ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x0;
       goto AGP_FORM_ID, 
           prompt = STRING_TOKEN(STR_TITLE),
           help = STRING_TOKEN(STR_TITLE_HELP);
	endif; //suppressif GopDeviceCount < 1
#endif //FORM_SET_GOTO

#ifdef FORM_SET_FORM
// Define forms
//	form formid = AUTO_ID(ID_OF_MY_FORM),
//		title = STRING_TOKEN(STR_FORM_TITLE);
//	endform;
	form formid = AUTO_ID(AGP_FORM_ID),
		title = STRING_TOKEN(STR_TITLE);

	//suppressif  ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x0;
		SUBTITLE(STRING_TOKEN(STR_GOP_DEVICE_NAME_0))
		SUBTITLE(STRING_TOKEN(STR_GOP_DRIVER_NAME_0))

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x1;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_0);
		endoneof;
		endif; //suppressif GopOutputCount != 1

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x2;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_1);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 2

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x3;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_2);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 3

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x4;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_3);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_3), value = 3, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 4

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x5;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_4);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_3), value = 3, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_4), value = 4, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 5

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x6;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_5);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_3), value = 3, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_4), value = 4, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_5), value = 5, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 6

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x7;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_6);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_3), value = 3, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_4), value = 4, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_5), value = 5, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_6), value = 6, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 7

		suppressif NOT ideqval AMI_GOP_POLICY_SETUP_DATA.GopOutputCount == 0x8;
		oneof varid		= SETUP_DATA.GopOutputSelect,
			prompt		= STRING_TOKEN(STR_GOP_OUTPUT_SELECT),
			help		= STRING_TOKEN(STR_GOP_OUTPUT_HELP),
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_0), value = 0, flags = DEFAULT | MANUFACTURING | INTERACTIVE, key = AUTO_ID(AGP_KEY_7);
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_1), value = 1, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_2), value = 2, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_3), value = 3, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_4), value = 4, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_5), value = 5, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_6), value = 6, flags = 0;
			option text	= STRING_TOKEN(STR_GOP_OUTPUT_NAME_7), value = 7, flags = 0;
		endoneof;
		endif; //suppressif GopOutputCount != 8
	//endif; //suppressif GopDeviceCount < 1
/*
	SEPARATOR

	suppressif  ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x0 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x1;
		SUBTITLE(STRING_TOKEN(STR_GOP_DEVICE_NAME_1))
		SUBTITLE(STRING_TOKEN(STR_GOP_DRIVER_NAME_1))
	endif; //suppressif GopDeviceCount < 2

	SEPARATOR

	suppressif  ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x0 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x1 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x2;
		SUBTITLE(STRING_TOKEN(STR_GOP_DEVICE_NAME_2))
		SUBTITLE(STRING_TOKEN(STR_GOP_DRIVER_NAME_2))
	endif; //suppressif GopDeviceCount < 3

	SEPARATOR

	suppressif  ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x0 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x1 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x2 OR
				ideqval AMI_GOP_POLICY_SETUP_DATA.GopDeviceCount == 0x3;
		SUBTITLE(STRING_TOKEN(STR_GOP_DEVICE_NAME_3))
		SUBTITLE(STRING_TOKEN(STR_GOP_DRIVER_NAME_3))
	endif; //suppressif GopDeviceCount < 4
*/
	endform;

#endif //FORM_SET_FORM

#endif //ADVANCED_FORM_SET

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