6 Copyright (c) 1999 Intel Corporation
14 Iflash64.efi protocol to abstract iflash from
22 // Guid that identifies the IFLASH protocol
24 #define IFLASH64_PROTOCOL_PROTOCOL \
25 { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 };
28 // Unlock FLASH from StartAddress to EndAddress and return a LockKey
32 (EFIAPI
*UNLOCK_FLASH_API
)(
33 IN
struct _IFLASH64_PROTOCOL_INTERFACE
*This
37 // Lock the flash represented by the LockKey
41 (EFIAPI
*LOCK_FLASH_API
)(
42 IN
struct _IFLASH64_PROTOCOL_INTERFACE
*This
46 // Status callback for a utility like IFLASH64
48 // Token would map to a list like Ted proposed. The utility has no idea what
49 // happens on the other side.
50 // ErrorStatus - Level of Error or success. Independent of Token. If you
51 // don't know the token you will at least know pass or fail.
52 // String - Optional extra information about the error. Could be used for
53 // debug or future expansion
55 // Attributes - Options screen attributes for String. Could allow the string to be different colors.
59 (EFIAPI
*UTILITY_PROGRESS_API
)(
60 IN
struct _IFLASH64_PROTOCOL_INTERFACE
*This
,
62 IN EFI_STATUS ErrorStatus
,
63 IN CHAR16
*String
, OPTIONAL
64 IN UINTN
*Attributes OPTIONAL
70 // IFlash64 Token Codes
71 #define IFLASH_TOKEN_IFLASHSTART 0xB0 // IFlash64 has started
72 #define IFLASH_TOKEN_READINGFILE 0xB1 // Reading File
73 #define IFLASH_TOKEN_INITVPP 0xB2 // Initializing Vpp
74 #define IFLASH_TOKEN_DISABLEVPP 0x10 // Disable Vpp
75 #define IFLASH_TOKEN_FLASHUNLOCK 0xB3 // Unlocking FLASH Devices
76 #define IFLASH_TOKEN_FLASHERASE 0xB4 // Erasing FLASH Devices
77 #define IFLASH_TOKEN_FLASHPROGRAM 0xB5 // Programming FLASH
78 #define IFLASH_TOKEN_FLASHVERIFY 0xB6 // Verifying FLASH
79 #define IFLASH_TOKEN_UPDATESUCCES 0xB7 // FLASH Updage Success!
81 #define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 // % Reading File
82 #define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 // % Unlocking FLASH Devices
83 #define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 // % Erasing FLASH Devices
84 #define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 // % Programming FLASH
85 #define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 // % Verifying FLASH
87 #define IFLASH_TOKEN_READINGFILE_ER 0xB8 // File Read Error
88 #define IFLASH_TOKEN_INITVPP_ER 0xB9 // Initialization of IFB Error
89 #define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA // FLASH Unlock Error
90 #define IFLASH_TOKEN_FLASHERASE_ER 0xBB // FLASH Erase Error
91 #define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC // FLASH Verify Error
92 #define IFLASH_TOKEN_FLASHPROG_ER 0xBD // FLASH Program Error
94 #define IFLASH_TABLE_END 0x00
97 // If this number changes one of the existing API's has changes
99 #define IFLASH_PI_MAJOR_VERSION 0x01
102 // This number changes when new APIs or data variables get added to the end
103 // of the data structure
105 #define IFLASH_PI_MINOR_VERSION 0x01
107 typedef struct _IFLASH64_PROTOCOL_INTERFACE
{
110 UNLOCK_FLASH_API UnlockFlash
;
111 LOCK_FLASH_API LockFlash
;
112 UTILITY_PROGRESS_API Progress
;
115 // Future expansion goes here
118 } IFLASH64_PROTOCOL_INTERFACE
;