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