Rev 2726 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2726 | Rev 3386 | ||
---|---|---|---|
1 | #ifndef _PIFLASH64_H |
1 | #ifndef _PIFLASH64_H |
2 | #define _PIFLASH64_H |
2 | #define _PIFLASH64_H |
3 | 3 | ||
4 | /*++ |
4 | /*++ |
5 | 5 | ||
6 | Copyright (c) 1999 Intel Corporation |
6 | Copyright (c) 1999 Intel Corporation |
7 | 7 | ||
8 | Module Name: |
8 | Module Name: |
9 | 9 | ||
10 | PIflash64.h |
10 | PIflash64.h |
11 | |
11 | |
12 | Abstract: |
12 | Abstract: |
13 | 13 | ||
14 | Iflash64.efi protocol to abstract iflash from |
14 | Iflash64.efi protocol to abstract iflash from |
15 | the system. |
15 | the system. |
16 | 16 | ||
17 | Revision History |
17 | Revision History |
18 | 18 | ||
19 | --*/ |
19 | --*/ |
20 | 20 | ||
21 | // |
21 | // |
22 | // Guid that identifies the IFLASH protocol |
22 | // Guid that identifies the IFLASH protocol |
23 | // |
23 | // |
24 | #define IFLASH64_PROTOCOL_PROTOCOL \ |
24 | #define IFLASH64_PROTOCOL_PROTOCOL \ |
25 | { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }; |
25 | { 0x65cba110, 0x74ab, 0x11d3, 0xbb, 0x89, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 }; |
26 | 26 | ||
27 | // |
27 | // |
28 | // Unlock FLASH from StartAddress to EndAddress and return a LockKey |
28 | // Unlock FLASH from StartAddress to EndAddress and return a LockKey |
29 | // |
29 | // |
30 | typedef |
30 | typedef |
31 | EFI_STATUS |
31 | EFI_STATUS |
32 | (EFIAPI *UNLOCK_FLASH_API)( |
32 | (EFIAPI *UNLOCK_FLASH_API)( |
33 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
33 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
34 | ); |
34 | ); |
35 | 35 | ||
36 | // |
36 | // |
37 | // Lock the flash represented by the LockKey |
37 | // Lock the flash represented by the LockKey |
38 | // |
38 | // |
39 | typedef |
39 | typedef |
40 | EFI_STATUS |
40 | EFI_STATUS |
41 | (EFIAPI *LOCK_FLASH_API)( |
41 | (EFIAPI *LOCK_FLASH_API)( |
42 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
42 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This |
43 | ); |
43 | ); |
44 | 44 | ||
45 | // |
45 | // |
46 | // Status callback for a utility like IFLASH64 |
46 | // Status callback for a utility like IFLASH64 |
47 | // |
47 | // |
48 | // Token would map to a list like Ted proposed. The utility has no idea what |
48 | // Token would map to a list like Ted proposed. The utility has no idea what |
49 | // happens on the other side. |
49 | // happens on the other side. |
50 | // ErrorStatus - Level of Error or success. Independent of Token. If you |
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. |
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 |
52 | // String - Optional extra information about the error. Could be used for |
53 | // debug or future expansion |
53 | // debug or future expansion |
54 | // |
54 | // |
55 | // Attributes - Options screen attributes for String. Could allow the string to be different colors. |
55 | // Attributes - Options screen attributes for String. Could allow the string to be different colors. |
56 | // |
56 | // |
57 | typedef |
57 | typedef |
58 | EFI_STATUS |
58 | EFI_STATUS |
59 | (EFIAPI *UTILITY_PROGRESS_API)( |
59 | (EFIAPI *UTILITY_PROGRESS_API)( |
60 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This, |
60 | IN struct _IFLASH64_PROTOCOL_INTERFACE *This, |
61 | IN UINTN Token, |
61 | IN UINTN Token, |
62 | IN EFI_STATUS ErrorStatus, |
62 | IN EFI_STATUS ErrorStatus, |
63 | IN CHAR16 *String, OPTIONAL |
63 | IN CHAR16 *String, OPTIONAL |
64 | IN UINTN *Attributes OPTIONAL |
64 | IN UINTN *Attributes OPTIONAL |
65 | ); |
65 | ); |
66 | 66 | ||
67 | // |
67 | // |
68 | // Token Values |
68 | // Token Values |
69 | // |
69 | // |
70 | // IFlash64 Token Codes |
70 | // IFlash64 Token Codes |
71 | #define IFLASH_TOKEN_IFLASHSTART 0xB0 // IFlash64 has started |
71 | #define IFLASH_TOKEN_IFLASHSTART 0xB0 // IFlash64 has started |
72 | #define IFLASH_TOKEN_READINGFILE 0xB1 // Reading File |
72 | #define IFLASH_TOKEN_READINGFILE 0xB1 // Reading File |
73 | #define IFLASH_TOKEN_INITVPP 0xB2 // Initializing Vpp |
73 | #define IFLASH_TOKEN_INITVPP 0xB2 // Initializing Vpp |
74 | #define IFLASH_TOKEN_DISABLEVPP 0x10 // Disable Vpp |
74 | #define IFLASH_TOKEN_DISABLEVPP 0x10 // Disable Vpp |
75 | #define IFLASH_TOKEN_FLASHUNLOCK 0xB3 // Unlocking FLASH Devices |
75 | #define IFLASH_TOKEN_FLASHUNLOCK 0xB3 // Unlocking FLASH Devices |
76 | #define IFLASH_TOKEN_FLASHERASE 0xB4 // Erasing FLASH Devices |
76 | #define IFLASH_TOKEN_FLASHERASE 0xB4 // Erasing FLASH Devices |
77 | #define IFLASH_TOKEN_FLASHPROGRAM 0xB5 // Programming FLASH |
77 | #define IFLASH_TOKEN_FLASHPROGRAM 0xB5 // Programming FLASH |
78 | #define IFLASH_TOKEN_FLASHVERIFY 0xB6 // Verifying FLASH |
78 | #define IFLASH_TOKEN_FLASHVERIFY 0xB6 // Verifying FLASH |
79 | #define IFLASH_TOKEN_UPDATESUCCES 0xB7 // FLASH Updage Success! |
79 | #define IFLASH_TOKEN_UPDATESUCCES 0xB7 // FLASH Updage Success! |
80 | 80 | ||
81 | #define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 // % Reading File |
81 | #define IFLASH_TOKEN_PROGRESS_READINGFILE 0x11 // % Reading File |
82 | #define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 // % Unlocking FLASH Devices |
82 | #define IFLASH_TOKEN_PROGRESS_FLASHUNLOCK 0x13 // % Unlocking FLASH Devices |
83 | #define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 // % Erasing FLASH Devices |
83 | #define IFLASH_TOKEN_PROGRESS_FLASHERASE 0x14 // % Erasing FLASH Devices |
84 | #define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 // % Programming FLASH |
84 | #define IFLASH_TOKEN_PROGRESS_FLASHPROGRAM 0x15 // % Programming FLASH |
85 | #define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 // % Verifying FLASH |
85 | #define IFLASH_TOKEN_PROGRESS_FLASHVERIFY 0x16 // % Verifying FLASH |
86 | 86 | ||
87 | #define IFLASH_TOKEN_READINGFILE_ER 0xB8 // File Read Error |
87 | #define IFLASH_TOKEN_READINGFILE_ER 0xB8 // File Read Error |
88 | #define IFLASH_TOKEN_INITVPP_ER 0xB9 // Initialization of IFB Error |
88 | #define IFLASH_TOKEN_INITVPP_ER 0xB9 // Initialization of IFB Error |
89 | #define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA // FLASH Unlock Error |
89 | #define IFLASH_TOKEN_FLASHUNLOCK_ER 0xBA // FLASH Unlock Error |
90 | #define IFLASH_TOKEN_FLASHERASE_ER 0xBB // FLASH Erase Error |
90 | #define IFLASH_TOKEN_FLASHERASE_ER 0xBB // FLASH Erase Error |
91 | #define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC // FLASH Verify Error |
91 | #define IFLASH_TOKEN_FLASHVERIFY_ER 0xBC // FLASH Verify Error |
92 | #define IFLASH_TOKEN_FLASHPROG_ER 0xBD // FLASH Program Error |
92 | #define IFLASH_TOKEN_FLASHPROG_ER 0xBD // FLASH Program Error |
93 | 93 | ||
94 | #define IFLASH_TABLE_END 0x00 |
94 | #define IFLASH_TABLE_END 0x00 |
95 | 95 | ||
96 | // |
96 | // |
97 | // If this number changes one of the existing API's has changes |
97 | // If this number changes one of the existing API's has changes |
98 | // |
98 | // |
99 | #define IFLASH_PI_MAJOR_VERSION 0x01 |
99 | #define IFLASH_PI_MAJOR_VERSION 0x01 |
100 | 100 | ||
101 | // |
101 | // |
102 | // This number changes when new APIs or data variables get added to the end |
102 | // This number changes when new APIs or data variables get added to the end |
103 | // of the data structure |
103 | // of the data structure |
104 | // |
104 | // |
105 | #define IFLASH_PI_MINOR_VERSION 0x01 |
105 | #define IFLASH_PI_MINOR_VERSION 0x01 |
106 | 106 | ||
107 | typedef struct _IFLASH64_PROTOCOL_INTERFACE { |
107 | typedef struct _IFLASH64_PROTOCOL_INTERFACE { |
108 | UINT32 MajorVersion; |
108 | UINT32 MajorVersion; |
109 | UINT32 MinorVersion; |
109 | UINT32 MinorVersion; |
110 | UNLOCK_FLASH_API UnlockFlash; |
110 | UNLOCK_FLASH_API UnlockFlash; |
111 | LOCK_FLASH_API LockFlash; |
111 | LOCK_FLASH_API LockFlash; |
112 | UTILITY_PROGRESS_API Progress; |
112 | UTILITY_PROGRESS_API Progress; |
113 | 113 | ||
114 | // |
114 | // |
115 | // Future expansion goes here |
115 | // Future expansion goes here |
116 | // |
116 | // |
117 | 117 | ||
118 | } IFLASH64_PROTOCOL_INTERFACE; |
118 | } IFLASH64_PROTOCOL_INTERFACE; |
119 | 119 | ||
120 | 120 | ||
121 | #endif |
121 | #endif |
122 | 122 |