3 Copyright (c) 1998 Intel Corporation
18 // The variable store protocol interface is specific to the reference
19 // implementation. The initialization code adds variable store devices
20 // to the system, and the FW connects to the devices to provide the
21 // variable store interfaces through these devices.
25 // Variable Store Device protocol
28 #define VARIABLE_STORE_PROTOCOL \
29 { 0xf088cd91, 0xa046, 0x11d2, {0x8e, 0x42, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b} }
31 INTERFACE_DECL(_EFI_VARIABLE_STORE
);
35 (EFIAPI
*EFI_STORE_CLEAR
) (
36 IN
struct _EFI_VARIABLE_STORE
*This
,
44 (EFIAPI
*EFI_STORE_READ
) (
45 IN
struct _EFI_VARIABLE_STORE
*This
,
54 (EFIAPI
*EFI_STORE_UPDATE
) (
55 IN
struct _EFI_VARIABLE_STORE
*This
,
64 (EFIAPI
*EFI_STORE_SIZE
) (
65 IN
struct _EFI_VARIABLE_STORE
*This
,
71 (EFIAPI
*EFI_TRANSACTION_UPDATE
) (
72 IN
struct _EFI_VARIABLE_STORE
*This
,
77 typedef struct _EFI_VARIABLE_STORE
{
80 // Number of banks and bank size
88 // Functions to access the storage banks
91 EFI_STORE_CLEAR ClearStore
;
92 EFI_STORE_READ ReadStore
;
93 EFI_STORE_UPDATE UpdateStore
;
94 EFI_STORE_SIZE SizeStore OPTIONAL
;
95 EFI_TRANSACTION_UPDATE TransactionUpdate OPTIONAL
;
102 // ClearStore() - A function to clear the requested storage bank. A cleared
103 // bank contains all "on" bits.
105 // ReadStore() - Read data from the requested store.
107 // UpdateStore() - Updates data on the requested store. The FW will only
108 // ever issue updates to clear bits in the store. Updates must be
109 // performed in LSb to MSb order of the update buffer.
111 // SizeStore() - An optional function for non-runtime stores that can be
112 // dynamically sized. The FW will only ever increase or decrease the store
113 // by 1 banksize at a time, and it is always adding or removing a bank from
114 // the end of the store.
116 // By default the FW will update variables and storage banks in an
117 // "atomic" manner by keeping 1 old copy of the data during an update,
118 // and recovering appropiately if the power is lost during the middle
119 // of an operation. To do this the FW needs to have multiple banks
120 // of storage dedicated to its use. If that's not possible, the driver
121 // can implement an atomic bank update function and the FW will allow
122 // 1 bank in this case. (It will allow any number of banks,
123 // but it won't require an "extra" bank to provide its bank transaction
126 // TransactionUpdate() - An optional function that can clear & update an
127 // entire bank in an "atomic" fashion. If the operation fails in the
128 // middle the driver is responsible for having either the previous copy
129 // of the bank's data or the new copy. A copy that's partially written
130 // is not valid as internal data settings may get lost. Supply this
131 // function only when needed.