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

//**********************************************************************
// $Header: /Alaska/SOURCE/Modules/OFBD/OFBD.h 20    7/31/13 4:55a Terrylin $
//
// $Revision: 20 $
//
// $Date: 7/31/13 4:55a $
//**********************************************************************
// Revision History
// ----------------
// $Log: /Alaska/SOURCE/Modules/OFBD/OFBD.h $
// 
// 20    7/31/13 4:55a Terrylin
// [TAG]  		EIP125898
// [Category]  	Improvement
// [Description]  	1. Update modules to compliant with PI 1.2 and UEFI
// 2.3.1 specifications. 
// 2. Add OFBD_TC_51_DC_EXT_STRUCT new structure definition.
// [Files]  		OFBD.c
// OFBD.h
// 
// 19    10/11/12 2:34a Terrylin
// [Category]  	New Feature
// [Description]  	Add BatteryCheck component for OEM can use this to
// replace Legacy ECB table check support in Non-CSM environment.
// [Files]  		OFBD.sdl
// OFBD.h
// OFBD.cif
// 
// 18    7/24/12 3:59a Terrylin
// [Category]  	Improvement
// [Description]  	Add new Return Statuses of Type Code 51 for AFU general
// commands.
// 
// 17    2/22/12 4:39a Terrylin
// Add new command status for GAN support
// 
// 16    10/27/11 5:01a Terrylin
// Add new command status of Secure Update.
// 
// 15    10/24/11 2:47a Terrylin
// Adjust the OEM OA module part definitions.
// 
// 14    10/13/11 11:23p Terrylin
// [TAG]  		EIP72332
// [Category]  	Improvement
// [Description]  	Add new Return Statuses of Type Code 51 for AFU general
// commands.
// 
// 13    9/19/11 5:03a Terrylin
// Added OEM OA module part definitions.
// 
// 12    9/15/11 11:43p Calvinchen
// Added Secure Update OFBD definitions.
// 
// 11    7/21/11 5:54a Terrylin
// [TAG]  		EIP46069
// [Category]  	Improvement
// [Description]  	Support Runtime secure flash update mode
// 
// 10    7/07/11 1:52a Terrylin
// [TAG]  		EIP46069
// [Category]  	New Feature
// [Description]  	Support Secure Flash Update interface via OFBD
// protocols
// [Files]  		OFBD.h
// OFBD.cif
// 
// 9     4/20/11 6:46a Terrylin
// [TAG]  		EIP52968
// [Category]  	Improvement
// [Description]  	Adjust OFBD_TC_55_MEUD_STRUCT structure, for new ME
// firmware update rule.
// 
// 8     3/16/11 10:39p Terrylin
// Correct Copyright information.
// 
// 7     3/16/11 10:13p Terrylin
// [TAG]  		EIP51285
// [Category]  	Improvement
// [Description]  	Fill the description of each file for user more
// clearly.
// [Files]  		OFBD.mak
// OFBD.dxs
// OFBD.c
// OFBD.h
// 
// 6     1/17/11 4:01a Terrylin
// [TAG]  		EIP51076
// [Category]  	New Feature
// [Description]  	Add some new statuses for "/CLNEVNLOG" command of AFU.
// 
// 5     8/11/10 11:13p Terrylin
// Add some new statuses for /CMD: command.
// 
// 4     5/06/10 2:10a Lawrencechang
// 1. Modify the Type Code 51 Structure and Return Status.
// 2. Add some new statuses for /ECX command.
// 3. Add new DMI flags for /R command.
// 
// 3     1/11/10 3:45a Lawrencechang
// Modify Type#50 ROM hole structure.
// 
// 2     12/01/09 4:35a Lawrencechang
// Add a new status for /ECX command.
// 
// 1     4/13/09 5:46a Lawrencechang
// Initial check-in.
// 
// 1     3/13/06 1:16a Felixp
// 
//**********************************************************************
//<AMI_FHDR_START>
//
// Name:	OFBD.h
//
// Description: Header file for the OFBD
//
//<AMI_FHDR_END>
//**********************************************************************
#ifndef _EFI_OFBD_H_
#define _EFI_OFBD_H_
#ifdef __cplusplus
extern "C" {
#endif

//----------------------------------------------------------------------------
//	On Flash Block Structure Definition
//----------------------------------------------------------------------------
//=======================
// OFBD Header structure 
//=======================
#pragma pack(1)
typedef struct 
{
	UINT32 OFBD_SIG;            //'OFBD'
    UINT16 OFBD_VER;            //0200
    UINT16 OFBD_Size;     
    UINT32 OFBD_FS;    
    UINT16 OFBD_RS;      
	UINT16 OFBD_HDR_SIZE;
	UINT16 OFBD_OS;	
}OFBD_HDR;
#pragma pack()

//=================
// On Flash Status 
//=================
#define     OFBD_FS_VC		BIT00
#define     OFBD_FS_BBLK 	BIT01
#define     OFBD_FS_NVRAM   BIT02
#define     OFBD_FS_MAIN 	BIT03
#define     OFBD_FS_NCB		BIT04
#define     OFBD_FS_ROMH 	BIT05
#define     OFBD_FS_SFU	    BIT06
#define     OFBD_FS_OA	    BIT07
#define     OFBD_FS_AC_BAT	BIT16
#define     OFBD_FS_SECURUD	BIT22
#define     OFBD_FS_ERR_LOG	BIT23
#define     OFBD_FS_OEM_CMD	BIT24
#define     OFBD_FS_SETUP	BIT25
#define		OFBD_FS_MEUD    BIT26
#define     OFBD_FS_EC		BIT27
#define     OFBD_FS_ORI		BIT28
#define     OFBD_FS_PWD		BIT29
#define     OFBD_FS_CFG		BIT30

//================
// Return  Status 
//================
#define OFBD_RS_SUPPORT         BIT00
#define OFBD_RS_PROTECT	        BIT01
#define OFBD_RS_PROTECT_PART    BIT02
#define OFBD_RS_ERR_OUT         BIT03
#define OFBD_RS_DIS_OEMSTR      BIT04

//================
// OS environment 
//================
#define OFBD_OS_DOS 	BIT00
#define OFBD_OS_WIN 	BIT01
#define OFBD_OS_LINUX 	BIT02
#define OFBD_OS_FREEBSD	BIT03
#define OFBD_OS_EFI	    BIT04

//===============================
// Extended Table Header  Status 
//===============================
#pragma pack(1)
typedef struct
{
	UINT8 TypeCodeID;
	UINT8 NumTCStruct;
	UINT16 TCStructSize;
}OFBD_EXT_HDR;

typedef struct
{
    UINT32 	OFBD_END;
}OFBD_END;
#pragma pack()

#define OFBD_EXT_TBL_END	0x0FFFF55AA

//================
// Type Code ID   
//================
#define OFBD_EXT_TC_ROMHOLE		0x50
#define OFBD_EXT_TC_AFUDEFCFG	0x51
#define OFBD_EXT_TC_PWD			0x52
#define OFBD_EXT_TC_ORI			0x53
#define OFBD_EXT_TC_EC			0x54
#define OFBD_EXT_TC_MEUD		0x55
#define OFBD_EXT_TC_SETUP		0x56
#define OFBD_EXT_TC_OEM_CMD		0x57
#define OFBD_EXT_TC_CLN_ERR_LOG	0x58
#define OFBD_EXT_TC_SECURE_UD	0x59
#define OFBD_EXT_TC_OA_HANDLE   0x5A
#define OFBD_EXT_TC_AC_BAT		0x5B
#define OFBD_EXT_TC_SFU         0x70

//----------------------------------------------------------------------------
//	On Flash Block Type Code Structure Section
//----------------------------------------------------------------------------
#pragma pack(1)
//===============================
// Type Code 50 Struct ROM HOLE  
//===============================
typedef struct
{
    UINT32      ddExtCmd;
    EFI_GUID    HoleGuid;
}OFBD_TC_50_RH_STRUCT;

//===============================
// Type Code 51 Struct Def Cfg   
//===============================
typedef struct
{
	UINT32 ddExtCfg;
	UINT32 ddRetSts;
}OFBD_TC_51_DC_STRUCT;

typedef struct
{
    UINT32 ddIndexCfg;
	UINT16 ddExtCfg;
	UINT16 ddIgnCfg;
}OFBD_TC_51_DC_EXT_STRUCT;

//=======================
// Type Code 52 Struct   
//=======================
typedef struct
{
    UINT16 dwPwdLen;        //Password Length
    UINT8 dbGetCkSts;       //Get Check Status
    UINT8 dbRetSts;         //Return Status
}OFBD_TC_52_PC_STRUCT;
 
//=================================
// Type Code 53 Struct OEM ROM ID  
//=================================
typedef struct
{
	UINT8 dwGetCkSts;
	UINT8 dwRetSts;
	UINT32 ddStartAddrLow;
	UINT32 ddStartAddrHigh;
	UINT32 ddSize;
}OFBD_TC_53_ORI_STRUCT;

//=======================================
// Type Code 54 Struct Standard EC Flash	
//=======================================
typedef struct
{
	UINT8 dbFlaSts;			//EC Set & Check Status
	UINT16 dwRetSts;		//EC Return Status
	UINT32 ddChkSum;		//EC Data CheckSum
	UINT32 ddSize;			//EC Data Size
}OFBD_TC_54_STD_EC_STRUCT;

//=======================================
// Type Code 55 - ME Ignition Firmware Update Structure

//=======================================
typedef struct 
{
    UINT8	bReturnStatus;
    UINT8	bSubFunction;
    UINT32	dMERuntimeBase;
    UINT32	dMERuntimeLength;
    UINT32	dMEBiosRegionBase;
    UINT32	dMEBiosRegionLength;
#if (OFBD_VERSION >= 0x0210)
    UINT32	ddFlashBufOffset;
    UINT32	ddBlockAddr;
    UINT32	ddBlockSize;
#endif
}OFBD_TC_55_MEUD_STRUCT;

//=======================================
// Type Code 56 Struct 
//=======================================
typedef struct
{
    UINT8 dbGetSts;         //Get Status
    UINT8 dbRetSts;         //Return Status
}OFBD_TC_56_SETUP_STRUCT;

//=======================================
// Type Code 57 Struct 
//=======================================
typedef struct 
{
    UINT16 	dwFlaSts;		// 0: Before Flash, 1: After Flash, 2: Before End
    UINT16 	dwRetSts;		// 0: Failure, 1: Successfully
    UINT32 	ddCMD;			// Bit 0~15: OEM CMD
    UINT32	ddReserve;		// Reserve
} OFBD_TC_57_OEM_CMD_STRUCT;


//=======================================
// Type Code 58 Struct 
//=======================================
typedef struct 
{
    UINT16 	dwFunSts;		// 0: Do nothing 1: Clean Event Log
    UINT16 	dwRetSts;		// 0: Failure, 1: Successfully
} OFBD_TC_58_CEL_STRUCT;

//=======================================
// Type Code 59 Struct 
//=======================================
typedef struct 
{
    UINT64      BufAddr;
    UINT32      BlockAddr;      //0 starts at 0xfff0_0000
    UINT32      BlockSize;
    UINT8       ErrorCode;
    UINT8       bSubFunction;
} OFBD_TC_59_SECURE_UD;

//=======================================
// Type Code 5A Struct 
//=======================================
typedef struct 
{
    UINT8 	dbOASts;		// Bit 0: Notification BIOS, utility is now ready to update the OA data.                                - OFBD_TC_OA_UPDATE_NOTIFY
                            // Bit 1~7: Reserved
                            
    UINT8 	dbErrorID;		// 0~255 : Filled by O.E.M.
    
    UINT16 	dwRetSts;		// Bit 0: OA data is invalid, tell the utility stop the flash procedure                                 - OFBD_RS_OA_DATA_IS_INVALID
                            // Bit 1: OA data has be modified, tell the utility use the new data to update                          - OFBD_RS_OA_DATA_IS_MODIFIED
                            // Bit 2: BIOS has updated the OA, so tell the utility doesn't to update                                - OFBD_RS_OA_UPDATE_SKIPPED
                            // Bit 3: BIOS doesn't allow the OA update, tell the utility stop the flash procedure                   - OFBD_RS_OA_UPDATE_DECLINED
                            // Bit 4~14: Reserved
                            // Bit 15: Use dbErrorID field for utility return OEM specific error code, when this Bit is set to 1.   - OFBD_RS_OA_USE_OEM_ERROR_ID
	UINT32  ddOABlockAddr;  // OA Block Address of BIOS ROM (For NCB mode to use)
    UINT64  ddOADataBuffer; // OA Data Buffer
    UINT32  dwOADataSize;   // OA Data Buffer Size
} OFBD_TC_5A_OA_HANDLE_STRUCT;

//=======================================
// Type Code 5B Struct 
//=======================================
typedef struct
{
    UINT8   dbGetSts;         // Get Status
    UINT8   dbRetSts;         // Return Status

} OFBD_TC_5B_AC_BATTERY_STRUCT;

//=======================================
// Type Code 70 Struct 
//=======================================
typedef struct
{
	UINT8	Command;
	UINT8	Status;
} OFBD_TC_70_SFU_STRUCT;
#pragma pack()

//=============================
// Type Code Specific Status   
//=============================
//=============================
// Type Code 50 Return Status 
//=============================
#define  OFBD_TC_GRS_PROTECT		BIT00

//===============================
// Type Code 50 Hole Description 
//===============================
#define OFBD_TC_RH_HD_ROMHOLE		BIT00
#define OFBD_TC_RH_HD_NCB			BIT01

//=============================
// Type Code 51 Return Status  
//=============================
#define OFBD_TC_CFG_P			BIT00
#define OFBD_TC_CFG_B			BIT01
#define OFBD_TC_CFG_N			BIT02
#define OFBD_TC_CFG_K			BIT03
#define OFBD_TC_CFG_E			BIT04
#define OFBD_TC_CFG_Q			BIT05
#define OFBD_TC_CFG_REBOOT		BIT06
#define OFBD_TC_CFG_X			BIT07
#define OFBD_TC_CFG_S			BIT08
#define OFBD_TC_CFG_ECUF		BIT09
#define OFBD_TC_CFG_SHUTDOWN		BIT10
#define OFBD_TC_CFG_SETUPRESERVE	BIT11
#define OFBD_TC_CFG_ROMHOLE     	BIT12
#define OFBD_TC_CFG_NCB 			BIT13
#define OFBD_TC_CFG_CLNEVNLOG		BIT14
#define OFBD_TC_CFG_R		    BIT15
#define OFBD_TC_CFG_O		    BIT16
#define OFBD_TC_CFG_GAN		    BIT17   //Patch for EIP 75281
#define OFBD_TC_CFG_KN          BIT18
#define OFBD_TC_CFG_L           BIT19
#define OFBD_TC_CFG_LN          BIT20
#define OFBD_TC_CFG_A           BIT21
#define OFBD_TC_CFG_OAD         BIT22
#define OFBD_TC_CFG_CAPSULE     BIT23
#define OFBD_TC_CFG_RECOVERY    BIT24
#define OFBD_TC_CFG_CAF         BIT25
     
//===============================
// Type Code 52 Get Check Status 
// See OFBD Spec 5.2, 6.3 for detail
//===============================
#define OFBD_TC_OPC_GET			BIT00
#define OFBD_TC_OPC_CHECK		BIT01
 
//============================
// Type Code 52 Return Status 
// See OFBD Spec 5.2, 6.3 for detail
//============================
#define OEM_RS_PC_REQ			    BIT00
#define OEM_RS_PC_CK_OK			    BIT01
#define OEM_RS_PC_TIMES_EXCEEDED    BIT02

//========================================
// Type Code 53 Get & Check Status
// See OFBD Spec 5.4, 6.4 for detail 
//========================================
#define OFBD_TC_ORI_GET			BIT00
#define OFBD_TC_ORI_CHECK		BIT01

//========================================
// Type Code 53 Return Status
// See OFBD Spec 5.4, 6.4 for detail 
//========================================
#define OFBD_TC_ORI_REQ			BIT00
#define OFBD_TC_ORI_ROM			BIT01
#define OFBD_TC_ORI_MOD			BIT02
#define OFBD_TC_ORI_GUID		BIT03
#define OFBD_TC_ORI_CK_OK		BIT04

//=======================================
// Type Code 54 Set Status		
// See OFBD Spec 5.5, 6.5 for detail	
//=======================================
#define OFBD_TC_STD_EC_START	BIT00
#define OFBD_TC_STD_EC_FLASH	BIT01
#define OFBD_TC_STD_EC_END	    BIT02
#define OFBD_TC_ECX_SIZE		BIT03		//(EIP31739+) Andy+
#define OFBD_TC_ECX_ERASE		BIT04
#define OFBD_TC_ECX_VERIFY		BIT05
#define OFBD_TC_ECX_RETRY		BIT06

//=======================================
// Type Code 54 Return Status		
// See OFBD Spec 5.5, 6.5 for detail	
//=======================================
#define OFBD_RS_EC_OK 		BIT00
#define OFBD_RS_EC_CHKSUM	BIT01
#define OFBD_RS_EC_ENTRY 	BIT02
#define OFBD_RS_EC_ERASE 	BIT03
#define OFBD_RS_EC_INIT 	BIT04
#define OFBD_RS_EC_START	BIT05
#define OFBD_RS_EC_WRITE 	BIT06
#define OFBD_RS_EC_EXIT 	BIT07
#define OFBD_RS_EC_CHIPID 	BIT08

//===============================
// Type Code 55 SubFunction  
//===============================
#define OFBD_TC_MEUD_GETINFO	    0
#define OFBD_TC_MEUD_START		    BIT00
 
//============================
// Type Code 55 Return Status 
//============================
#define OFBD_TC_MEUD_OK			BIT00
#define OFBD_TC_MEUD_ERROR		BIT01

//===============================
// Type Code 56 Get Check Status 
//===============================
#define OFBD_TC_SETUP_SUPPORT	    BIT00
#define OFBD_TC_SETUP_STORE		    BIT01
#define OFBD_TC_SETUP_RESTORE		BIT02
#define OFBD_TC_DMI_STORE		    BIT03
#define OFBD_TC_DMI_RESTORE		    BIT04
 
//============================
// Type Code 56 Return Status 
//============================
#define OFBD_TC_SETUP_OK			BIT00
#define OFBD_TC_SETUP_NOT_SUPPORT	BIT01
#define OFBD_TC_SETUP_STORE_ERROR	BIT02
#define OFBD_TC_SETUP_RESTORE_ERROR	BIT03
#define OFBD_TC_DMI_STORE_ERROR	    BIT04
#define OFBD_TC_DMI_RESTORE_ERROR   BIT05

//===================================//
// Type Code 57 Flash & Return Status//
//===================================//
// OEM CMD - Flash Status.
#define OFBD_TC_OEM_CMD_BF     1
#define OFBD_TC_OEM_CMD_AF     2
#define OFBD_TC_OEM_CMD_BE     3
#define OFBD_TC_OEM_CMD_SF     4
#define OFBD_TC_OEM_CMD_BUF    5    // For /CMD:"" to use (EIP40787+)
#define OFBD_TC_OEM_CMD_BUF_SF 6
#define OFBD_TC_OEM_CMD_BUF_AF 7
#define OFBD_TC_OEM_CMD_BUF_BE 8

// OEM CMD - Return Status.
#define OFBD_TC_OEM_CMD_OK          BIT00
#define OFBD_TC_OEM_CMD_NOT_SUPPORT BIT01
#define OFBD_TC_OEM_CMD_ERROR       BIT02

//===============================
// Type Code 58 Func Status 
//===============================
#define OFBD_TC_CEL_FUNC_REQ            BIT00

//============================
// Type Code 58 Return Status 
//============================
#define OFBD_TC_CEL_OK		            BIT00
#define OFBD_TC_CEL_ERROR	            BIT01
#define OFBD_TC_CEL_BIOS_NOT_SUPPORT	BIT02

//===============================
// Type Code 59 SubFunction  
//===============================
#define OFBD_TC_SECUREUD_LOAD2SMM       BIT00
#define OFBD_TC_SECUREUD_VERIFY_SMM     BIT01
#define OFBD_TC_SECUREUD_DONE           BIT02

//===============================
// Type Code 5A Func Status 
//===============================
#define OFBD_TC_OA_UPDATE_NOTIFY        BIT00

//============================
// Type Code 5A Return Status 
//============================
#define OFBD_RS_OA_DATA_IS_INVALID		BIT00
#define OFBD_RS_OA_DATA_IS_MODIFIED     BIT01
#define OFBD_RS_OA_UPDATE_SKIPPED       BIT02
#define OFBD_RS_OA_UPDATE_DECLINED      BIT03
#define OFBD_RS_OA_USE_OEM_ERROR_ID     BIT15

//===============================
// Type Code 5B Func Status 
//===============================
#define OFBD_TC_AC_BAT_INFO_REQ        BIT00

//============================
// Type Code 5B Return Status 
//============================
#define OFBD_RS_AC_BAT_OK              BIT00
#define OFBD_RS_AC_BAT_ERR             BIT01

//===================================//
// Type Code 70 Get & Set Status     //
//===================================//
#define OFBD_TC_SFU_GET_FLASH_INFO				BIT00
#define OFBD_TC_SFU_LOAD_FIRMWARE_IMAGE			BIT01
#define OFBD_TC_SFU_GET_FLASH_UPDATE_POLICY		BIT02
#define OFBD_TC_SFU_SET_FLASH_UPDATE_METHOD		BIT03
#define OFBD_TC_SFU_RUNTIME_FLASH				BIT04

//==============================//
// Type Code 70 Return Status   //
//==============================//
#define OFBD_TC_SFU_OK									BIT00
#define OFBD_TC_SFU_NOT_SUPPORTED						BIT01
#define OFBD_TC_SFU_FW_AUTH_FAILED						BIT02
#define OFBD_TC_SFU_INVALID_FW_CAPSULE_HDR				BIT03
#define OFBD_TC_SFU_SIGNING_KEYS_DONT_MATCH				BIT04
#define OFBD_TC_SFU_UNSUPPORTED_CERTIFICATE_HDR_FORMAT	BIT05

//----------------------------------------------------------------------------
// OFBD ROM HOLE CORE SERVICE ROUTINE - INVOKE FUNCTION - Function Driven Token
//----------------------------------------------------------------------------
#define OFBD_RH_HOLE_EXIST_CK      0 // This token is to check OEM's ROM Hole's existance. 
#define OFBD_RH_GET_HOLE_PHY_ADDR  1 // Pass Addr, Size, then Get Phy Addr. Notice: If NULL means AFU Does not support
#define OFBD_RH_HOLE_PROTECT       2 // Protect Sts, Addr, Size

//----------------------------------------------------------------------------
//	ROM HOLE - INVOKE FUNCTION RTN STS
//----------------------------------------------------------------------------
#define OFBD_RH_RTN_SUCCESSFUL                0
#define OFBD_RH_RTN_SERVICE_NOT_FOUND         BIT00
#define OFBD_RH_RTN_SERVICE_PARAMETER_ERROR   BIT01
#define OFBD_RH_RTN_HOLE_NOT_EXIST            BIT02
#define OFBD_RH_RTN_PHY_ADDR_NOT_VALID        BIT03

/****** DO NOT WRITE BELOW THIS LINE *******/
#ifdef __cplusplus
}
#endif
#endif

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