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