[e16e8f2] | 1 | #ifndef _PIFLASH64_H |
---|
| 2 | #define _PIFLASH64_H |
---|
| 3 | |
---|
| 4 | /*++ |
---|
| 5 | |
---|
| 6 | Copyright (c) 1999 Intel Corporation |
---|
| 7 | |
---|
| 8 | Module Name: |
---|
| 9 | |
---|
| 10 | PIflash64.h |
---|
| 11 | |
---|
| 12 | Abstract: |
---|
| 13 | |
---|
| 14 | Iflash64.efi protocol to abstract iflash from |
---|
| 15 | the system. |
---|
| 16 | |
---|
| 17 | Revision History |
---|
| 18 | |
---|
| 19 | --*/ |
---|
| 20 | |
---|
| 21 | // |
---|
| 22 | // Guid that identifies the IFLASH protocol |
---|
| 23 | // |
---|
| 24 | #define IFLASH64_PROTOCOL_PROTOCOL \ |
---|
| 25 | { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }; |
---|
| 26 | |
---|
| 27 | // |
---|
| 28 | // Unlock FLASH from StartAddress to EndAddress and return a LockKey |
---|
| 29 | // |
---|
| 30 | typedef |
---|
| 31 | EFI_STATUS |
---|
| 32 | (EFIAPI *UNLOCK_FLASH_API)( |
---|
| 33 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
---|
| 34 | ); |
---|
| 35 | |
---|
| 36 | // |
---|
| 37 | // Lock the flash represented by the LockKey |
---|
| 38 | // |
---|
| 39 | typedef |
---|
| 40 | EFI_STATUS |
---|
| 41 | (EFIAPI *LOCK_FLASH_API)( |
---|
| 42 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
---|
| 43 | ); |
---|
| 44 | |
---|
| 45 | // |
---|
| 46 | // Status callback for a utility like IFLASH64 |
---|
| 47 | // |
---|
| 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 |
---|
| 54 | // |
---|
| 55 | // Attributes - Options screen attributes for String. Could allow the string to be different colors. |
---|
| 56 | // |
---|
| 57 | typedef |
---|
| 58 | EFI_STATUS |
---|
| 59 | (EFIAPI *UTILITY_PROGRESS_API)( |
---|
| 60 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This, |
---|
| 61 | IN UINTN Token, |
---|
| 62 | IN EFI_STATUS ErrorStatus, |
---|
| 63 | IN CHAR16 *String, OPTIONAL |
---|
| 64 | IN UINTN *Attributes OPTIONAL |
---|
| 65 | ); |
---|
| 66 | |
---|
| 67 | // |
---|
| 68 | // Token Values |
---|
| 69 | // |
---|
| 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! |
---|
| 80 | |
---|
| 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 |
---|
| 86 | |
---|
| 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 |
---|
| 93 | |
---|
| 94 | #define IFLASH_TABLE_END 0x00 |
---|
| 95 | |
---|
| 96 | // |
---|
| 97 | // If this number changes one of the existing API's has changes |
---|
| 98 | // |
---|
| 99 | #define IFLASH_PI_MAJOR_VERSION 0x01 |
---|
| 100 | |
---|
| 101 | // |
---|
| 102 | // This number changes when new APIs or data variables get added to the end |
---|
| 103 | // of the data structure |
---|
| 104 | // |
---|
| 105 | #define IFLASH_PI_MINOR_VERSION 0x01 |
---|
| 106 | |
---|
| 107 | typedef struct _IFLASH64_PROTOCOL_INTERFACE { |
---|
| 108 | UINT32 MajorVersion; |
---|
| 109 | UINT32 MinorVersion; |
---|
| 110 | UNLOCK_FLASH_API UnlockFlash; |
---|
| 111 | LOCK_FLASH_API LockFlash; |
---|
| 112 | UTILITY_PROGRESS_API Progress; |
---|
| 113 | |
---|
| 114 | // |
---|
| 115 | // Future expansion goes here |
---|
| 116 | // |
---|
| 117 | |
---|
| 118 | } IFLASH64_PROTOCOL_INTERFACE; |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | #endif |
---|