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

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/PTT/FastBoot.sd 16    7/11/13 10:13p Simonchen $
//
// $Revision: 16 $
//
// $Date: 7/11/13 10:13p $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/PTT/FastBoot.sd $
// 
// 16    7/11/13 10:13p Simonchen
// [TAG]  		EIP126196
// [Category]  	Bug Fix
// [Severity]  	Minor
// [Symptom]  	If set two HDD password and use Raid mode, fastboot will
// [RootCause]  	Because when AHCI driver unlock first HDD, Raid driver
// will try to read all HDD, but second HDD is still lock, so access will
// fail.
// [Solution]  	Make sure all HDD unlock then Raid can access HDD. 
// And add "Support Raid Driver" token to control fastboot support Raid
// feature or not.
// [Files]  		FastBoot.c
// FastBoot.sd
// FastBoot.sdl
// FastBootRuntime.c
// FastBoot.h
// 
// 15    4/18/13 5:39a Simonchen
// [TAG]  		EIP113454
// [Category]  	New Feature
// [Description]  	This eip is created for implement or experiment for
// Intel raid mode on fastboot.
// [Files]  		FastBoot.sdl
// FastBootRuntime.c
// FastBoot.c
// FastBoot.sd
// FastBoot.uni
// 
// 14    1/28/13 10:10p Bibbyyeh
// [TAG]           EIP113574
// [Category]      Spec Update
// [Severity]      Normal
// [Description]   Update the PTT eModule to utilize Setup Customization
// [Files]         FastBoot.sd FastBoot.uni
// 
// 13    8/10/12 3:23a Bibbyyeh
// [TAG]           EIP96276
// [Category]      New Feature
// [Description]   Function request for PTT_12
// EIP96276.2 Fixed USB skip table issue. 
// EIP96276.3 Add token ¡¥CONNECT_ALL_SATA_DEVICE_IN_FASTBOOT¡¦ to
// gFastBootPolicy.
// EIP96276.4 Add IsValidFBBootOptionPtr support by driver type. Exp : usb
// type skip or other type
// EIP96276.5 Add token ¡¥Test mode¡¨ to gFastBootPolicy Setup menu.
// EIP96276.6 Disable Tse Hotkey support in fastboot path.
// EIP96276.7 Modify TRACE message.
// [Files]         FastBoot.c FastBoot.sd FastBoot.sdl FastBoot.uni
// FastBootRuntime.c FastBootProtocol.c
// 
// 12    6/15/12 6:28a Bibbyyeh
// Add token "DEFAULT_VGA_SUPPORT_SETTING" ,
// "DEFAULT_USB_SUPPORT_SETTING", "DEFAULT_PS2_SUPPORT_SETTING", and
// "DEFAULT_NETWORK_STACK_SUPPORT_SETTING" for Fast Boot default setup
// option.
// 
// 11    6/12/12 10:14p Bibbyyeh
// Add a item "Auto" for fastboot "VGA Support". Only install Legacy OpRom
// only when previous boot is Legacy OS.
// 
// 10    6/01/12 6:58a Bibbyyeh
// [TAG]           EIP90455
// [Category]      New Feature
// [Description]   PTT improvement - fastboot policy protocol for dynamic
// control fast boot behavior.
// [Files]         FastBoot.c FastBoot.sdl FastBoot.sd FastBoot.uni
// FastBootRuntime.c FastBootTseHook.c FastBootProtocol.h FastBoot.h
// 
// 9     5/29/12 4:44a Bibbyyeh
// Fix build fail issue if CSM and CsmOpOut moudle are removed.
// 
// 8     4/09/12 8:05a Bibbyyeh
// Modify the default of SETUP_DATA.FastBoot as token DEFAULT_FAST_BOOT.
// 
// 7     10/18/11 7:47a Bibbyyeh
// [TAG]           EIP68563
// [Category]      Improvement
// [Description]  	Manufacturing Mode not set for the FastBoot setup
// options.
// [Files]         FastBoot.sd
// 
// 6     8/29/11 4:14a Bibbyyeh
// [TAG]           EIP67571 
// [Category]      Bug Fix
// [Severity]      Important
// [Symptom]       All FastBoot setup options are enabled in manufacturing
// mode.
// [RootCause]     MANUFACTURING is set in FastBoot Setup option.
// [Solution]      Remove MANUFACTURING flag.
// [Files]         FastBoot.sd
// 
// 5     3/17/11 8:40a Bibbyyeh
// [TAG]  		EIP56151
// [Category]  	Improvement
// [Description]   PTT eModule has several compiled errors if CSM eModule
// is removed, that must be solved.
// [Files]  	FastBoot.c FastBoot.sd
// 
// 4     3/17/11 7:18a Bibbyyeh
// [TAG]  		EIP56151
// [Category]  	Improvement
// [Description]  	 PTT eModule has several compiled errors if CSM eModule
// is removed, that must be solved.
// [Files]  		FastBoot.c FastBoot.sd
// 
// 3     3/11/11 10:01p Bibbyyeh
// [TAG]		EIP54993
// [Category]	Improvement
// [Description]
// 1.Sync with Fastboot_10
// 2.Remove token "SAVE_LAST_BOOT_DEVICE_CHECKSUM"
// 3.Add token "CALL_DISPATCHER_AGAIN_IN_FASTBOOT"
// 4.Use SimpleText protocol to detect mode change hotkey instead of
// pBS->ConIn.
// 5.Simplify the code about "AMILEGACY16_FASTBOOT_SOLUTION".
// 6.Fixed a bug that SATA device can't be found if keep TSE execution on
// fastboot path.
// [Files]		PPT.cif FastBoot.sdl FastBootRuntime.c FastBootTseHook.c
// FastBoot.c FastBoot.h FastBoot.sd FastBootProtocol.cif
// FastBootProtocol.h FastBootSMI.cif FastBootSMI.sdl FastBootSMI.c
// FastBootSMI.dxs FastBootSMI.mak
// 
// 2     11/17/10 9:44a Bibbyyeh
// [TAG]  		EIP47397
// [Category]  	Improvement
// [Description]  	1. Move all console related functions into PTT module
// to avoid uncompatible with different core version.
// 2. Install dumy SimpleTextCoin protocol when pBS->ConIn & pBS-ConOut is
// Null.
// 3. Raise timer call back as TPL_HIGH_LEVEL level, it will give BIOS
// more chance to mode change successfully.
// 4. Remove FASTBOOT_CONSOLE_SETTING token.Add setup option for fastboot
// setting, "Skip VGA", "Skip USB", Skip "PS2".
// [Files]  		FastBoot.c
// FastBoot.h
// FastBoot.sd
// FastBoot.sdl
// FastBoot.uni
// 
// 1     10/12/10 9:04a Bibbyyeh
// Initial check in
// 
//**********************************************************************

//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	FastBoot.sd
//
// Description:	FastBoot Setup data definitions, currently go under Boot page
//
//<AMI_FHDR_END>
//**********************************************************************

#ifdef SETUP_DATA_DEFINITION
    UINT8   FastBoot;
    UINT8   FbSata;
    UINT8   FbVga;
    UINT8   FbUsb;
    UINT8   FbPs2;
    UINT8   FbNetWrokStack;
    UINT8   FbTestMode;			//(EIP96276.5+)
#endif

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

#ifdef CONTROL_DEFINITION
//
// Put control definitions here.
//

#define FB_ONEOF_FASTBOOT\
        oneof varid = SETUP_DATA.FastBoot,\
            prompt = STRING_TOKEN(STR_FAST_BOOT),\
            help = STRING_TOKEN(STR_FAST_BOOT_HELP),\
            default = DEFAULT_FAST_BOOT,\
            option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = MANUFACTURING | RESET_REQUIRED;\
            option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = RESET_REQUIRED;\
        endoneof;

#if SUPPORT_RAID_DRIVER
#define FB_ONEOF_FBSATA\
            oneof varid = SETUP_DATA.FbSata,\
                prompt = STRING_TOKEN(STR_FB_SATA),\
                help = STRING_TOKEN(STR_FB_SATA_HELP),\
                default = DEFAULT_SATA_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_SATA_LAST_BOOT_ONLY),  value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_SATA_ALL), value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_SATA_HDD_ONLY), value = 2, flags = RESET_REQUIRED;\
            endoneof;
#else
#define FB_ONEOF_FBSATA\
            oneof varid = SETUP_DATA.FbSata,\
                prompt = STRING_TOKEN(STR_FB_SATA),\
                help = STRING_TOKEN(STR_FB_SATA_HELP),\
                default = DEFAULT_SATA_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_SATA_LAST_BOOT_ONLY),  value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_SATA_ALL), value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
            endoneof;    
#endif

#define FB_ONEOF_FBVGA\
            oneof varid = SETUP_DATA.FbVga,\
                prompt = STRING_TOKEN(STR_FB_VGA),\
                help = STRING_TOKEN(STR_FB_VGA_HELP),\
                default = DEFAULT_VGA_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_AUTO),  value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_VGA_DRIVER), value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
            endoneof;      


#if (((USB_DRIVER_MAJOR_VER*100 ) + (USB_DRIVER_MINOR_VER*10) + (USB_DRIVER_BUILD_VER)) >= 920)  

#define FB_ONEOF_FBUSB\
            oneof varid = SETUP_DATA.FbUsb,\
                prompt = STRING_TOKEN(STR_FB_USB),\
                help = STRING_TOKEN(STR_FB_USB_HELP),\
                default = DEFAULT_USB_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_FULL_INIT), value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_PATIAL_INIT), value = 2, flags = RESET_REQUIRED;\
            endoneof;

#else

#define FB_ONEOF_FBUSB\
            oneof varid = SETUP_DATA.FbUsb,\
                prompt = STRING_TOKEN(STR_FB_USB),\
                help = STRING_TOKEN(STR_FB_USB_HELP),\
                default = DEFAULT_USB_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_FULL_INIT), value = 1, flags = MANUFACTURING | RESET_REQUIRED;
            endoneof;
#endif

#define FB_ONEOF_FBPS2\
            oneof varid = SETUP_DATA.FbPs2,\
                prompt = STRING_TOKEN(STR_FB_PS2),\
                help = STRING_TOKEN(STR_FB_PS2_HELP),\
                default = DEFAULT_PS2_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
            endoneof;

#define FB_ONEOF_FBNETWORKSTACK\
            oneof varid = SETUP_DATA.FbNetWrokStack,\
                prompt = STRING_TOKEN(STR_FB_NETWORK_STACK),\
                help = STRING_TOKEN(STR_FB_NETWORK_STACK_HELP),\
                default = DEFAULT_NETWORK_STACK_SUPPORT_SETTING,\
                option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = MANUFACTURING | RESET_REQUIRED;\
            endoneof;

#define FB_ONEOF_FBTESTMODE\
            oneof varid = SETUP_DATA.FbTestMode,\
                prompt = STRING_TOKEN(STR_FB_TEST),\
                help = STRING_TOKEN(STR_FB_TEST_HELP),\
                option text = STRING_TOKEN(STR_DISABLE), value = 0, flags = DEFAULT | MANUFACTURING | RESET_REQUIRED;\
                option text = STRING_TOKEN(STR_ENABLE),  value = 1, flags = RESET_REQUIRED;\
            endoneof;\

#endif //#ifdef CONTROL_DEFINITION

#ifdef CONTROLS_WITH_DEFAULTS
//
// List macros of all the controls attached to the actual data.
//
    FB_ONEOF_FASTBOOT
    FB_ONEOF_FBSATA
    FB_ONEOF_FBVGA
    FB_ONEOF_FBUSB
    FB_ONEOF_FBPS2
    FB_ONEOF_FBNETWORKSTACK
    FB_ONEOF_FBTESTMODE

#endif //#ifdef CONTROLS_WITH_DEFAULTS

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

#ifdef FORM_SET_ITEM

    FB_ONEOF_FASTBOOT
       

    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 0;    
        FB_ONEOF_FBSATA
    SUPPRESS_GRAYOUT_ENDIF
     
#if CSM_SUPPORT
    suppressif ideqval SETUP_DATA.FastBoot == 0;   
        FB_ONEOF_FBVGA  
    endif;
#else
    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 1;    
        FB_ONEOF_FBVGA
    SUPPRESS_GRAYOUT_ENDIF
#endif //#if CSM_SUPPORT

    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 0;    
        FB_ONEOF_FBUSB
    SUPPRESS_GRAYOUT_ENDIF

    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 0;           
        FB_ONEOF_FBPS2
    SUPPRESS_GRAYOUT_ENDIF   

    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 0;           
        FB_ONEOF_FBNETWORKSTACK
    SUPPRESS_GRAYOUT_ENDIF 

//(EIP96276.5+)>>
#if FAST_BOOT_TEST_MODE
    suppressif ideqval SETUP_DATA.FastBoot == 0;
    grayoutif ideqval SETUP_DATA.FastBoot == 0;           
         FB_ONEOF_FBTESTMODE
    SUPPRESS_GRAYOUT_ENDIF 
#endif //#if FAST_BOOT_TEST_MODE
//<<(EIP96276.5+)

#endif //#ifdef FORM_SET_ITEM

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