2 The Esrt Management Protocol used to register/set/update an updatable firmware resource .
4 Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef _ESRT_MANAGEMENT_H_
16 #define _ESRT_MANAGEMENT_H_
18 #include <Guid/SystemResourceTable.h>
21 /// Global ID for the ESRT_MANAGEMENT_PROTOCOL.
23 #define ESRT_MANAGEMENT_PROTOCOL_GUID \
25 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 } \
29 /// Forward declaration for the _ESRT_MANAGEMENT_PROTOCOL.
31 typedef struct _ESRT_MANAGEMENT_PROTOCOL ESRT_MANAGEMENT_PROTOCOL
;
34 Get Variable name and data by Esrt Entry FwClass
36 @param[in] FwClass FwClass of Esrt entry to get
37 @param[in out] Entry Esrt entry returned
39 @retval EFI_SUCCESS The variable saving this Esrt Entry exists.
40 @retval EF_NOT_FOUND No correct variable found.
45 (EFIAPI
*GET_ESRT_ENTRY
)(
47 IN OUT EFI_SYSTEM_RESOURCE_ENTRY
*Entry
52 Update one ESRT entry in ESRT Cache.
54 @param[in] Entry Esrt entry to be updated
56 @retval EFI_SUCCESS Successfully update an ESRT entry in cache.
57 @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache
58 @retval EFI_WRITE_PROTECTED ESRT Cache repositoy is locked
63 (EFIAPI
*UPDATE_ESRT_ENTRY
)(
64 IN EFI_SYSTEM_RESOURCE_ENTRY
*Entry
69 Non-FMP instance to unregister Esrt Entry from ESRT Cache.
71 @param[in] FwClass FwClass of Esrt entry to Unregister
73 @retval EFI_SUCCESS Insert all entries Successfully
74 @retval EFI_NOT_FOUND FwClass does not exsit
79 (EFIAPI
*UNREGISTER_ESRT_ENTRY
)(
85 Non-FMP instance to register one ESRT entry into ESRT Cache.
87 @param[in] Entry Esrt entry to be set
89 @retval EFI_SUCCESS Successfully set a variable.
90 @retval EFI_INVALID_PARAMETER ESRT Entry is already exist
91 @retval EFI_OUT_OF_RESOURCES Non-FMP ESRT repository is full
96 (EFIAPI
*REGISTER_ESRT_ENTRY
)(
97 IN EFI_SYSTEM_RESOURCE_ENTRY
*Entry
102 This function syn up Cached ESRT with data from FMP instances
103 Function should be called after Connect All in order to locate all FMP protocols
106 @retval EFI_SUCCESS Successfully sync cache repository from FMP instances
107 @retval EFI_NOT_FOUND No FMP Instance are found
108 @retval EFI_OUT_OF_RESOURCES Resource allocaton fail
113 (EFIAPI
*SYNC_ESRT_FMP
)(
119 This function locks up Esrt repository to be readonly. It should be called
120 before gEfiEndOfDxeEventGroupGuid event signaled
122 @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully
127 (EFIAPI
*LOCK_ESRT_REPOSITORY
)(
132 struct _ESRT_MANAGEMENT_PROTOCOL
{
133 GET_ESRT_ENTRY GetEsrtEntry
;
134 UPDATE_ESRT_ENTRY UpdateEsrtEntry
;
135 REGISTER_ESRT_ENTRY RegisterEsrtEntry
;
136 UNREGISTER_ESRT_ENTRY UnRegisterEsrtEntry
;
137 SYNC_ESRT_FMP SyncEsrtFmp
;
138 LOCK_ESRT_REPOSITORY LockEsrtRepository
;
141 extern EFI_GUID gEsrtManagementProtocolGuid
;
143 #endif // #ifndef _ESRT_MANAGEMENT_H_