summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Include
diff options
context:
space:
mode:
authorChao Zhang <chao.b.zhang@intel.com>2015-05-13 08:29:06 +0000
committerczhang46 <czhang46@Edk2>2015-05-13 08:29:06 +0000
commit8d51e87ddc18767f49e39cee6fd2d4f7fdc15dda (patch)
tree2d21e323f86c47afbfafdc500b5723c00f13cd4c /MdeModulePkg/Include
parent32df01ff685b9de50555bac040166b17a061ea9b (diff)
downloadedk2-platforms-8d51e87ddc18767f49e39cee6fd2d4f7fdc15dda.tar.xz
MdeModulePkg: Add ESRT management protocol definition
Add ESRT management protocol definition into MdeModulePkg. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Gao Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17425 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Include')
-rw-r--r--MdeModulePkg/Include/Protocol/EsrtManagement.h144
1 files changed, 144 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Protocol/EsrtManagement.h b/MdeModulePkg/Include/Protocol/EsrtManagement.h
new file mode 100644
index 0000000000..305fd5c908
--- /dev/null
+++ b/MdeModulePkg/Include/Protocol/EsrtManagement.h
@@ -0,0 +1,144 @@
+/** @file
+ The Esrt Management Protocol used to register/set/update an updatable firmware resource .
+
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>
+This program and the accompanying materials are licensed and made available under
+the terms and conditions of the BSD License that accompanies this distribution.
+The full text of the license may be found at
+http://opensource.org/licenses/bsd-license.php.
+
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+**/
+
+#ifndef _ESRT_MANAGEMENT_H_
+#define _ESRT_MANAGEMENT_H_
+
+#include <Guid/SystemResourceTable.h>
+
+///
+/// Global ID for the ESRT_MANAGEMENT_PROTOCOL.
+///
+#define ESRT_MANAGEMENT_PROTOCOL_GUID \
+ { \
+ 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 } \
+ }
+
+///
+/// Forward declaration for the _ESRT_MANAGEMENT_PROTOCOL.
+///
+typedef struct _ESRT_MANAGEMENT_PROTOCOL ESRT_MANAGEMENT_PROTOCOL;
+
+/**
+ Get Variable name and data by Esrt Entry FwClass
+
+ @param[in] FwClass FwClass of Esrt entry to get
+ @param[in out] Entry Esrt entry returned
+
+ @retval EFI_SUCCESS The variable saving this Esrt Entry exists.
+ @retval EF_NOT_FOUND No correct variable found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *GET_ESRT_ENTRY)(
+ IN EFI_GUID *FwClass,
+ IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry
+ );
+
+
+/**
+ Update one ESRT entry in ESRT Cache.
+
+ @param[in] Entry Esrt entry to be updated
+
+ @retval EFI_SUCCESS Successfully update an ESRT entry in cache.
+ @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache
+ @retval EFI_WRITE_PROTECTED ESRT Cache repositoy is locked
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *UPDATE_ESRT_ENTRY)(
+ IN EFI_SYSTEM_RESOURCE_ENTRY *Entry
+ );
+
+
+/**
+ Non-FMP instance to unregister Esrt Entry from ESRT Cache.
+
+ @param[in] FwClass FwClass of Esrt entry to Unregister
+
+ @retval EFI_SUCCESS Insert all entries Successfully
+ @retval EFI_NOT_FOUND FwClass does not exsit
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *UNREGISTER_ESRT_ENTRY)(
+ IN EFI_GUID *FwClass
+ );
+
+
+/**
+ Non-FMP instance to register one ESRT entry into ESRT Cache.
+
+ @param[in] Entry Esrt entry to be set
+
+ @retval EFI_SUCCESS Successfully set a variable.
+ @retval EFI_INVALID_PARAMETER ESRT Entry is already exist
+ @retval EFI_OUT_OF_RESOURCES Non-FMP ESRT repository is full
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *REGISTER_ESRT_ENTRY)(
+ IN EFI_SYSTEM_RESOURCE_ENTRY *Entry
+ );
+
+
+/**
+ This function syn up Cached ESRT with data from FMP instances
+ Function should be called after Connect All in order to locate all FMP protocols
+ installed
+
+ @retval EFI_SUCCESS Successfully sync cache repository from FMP instances
+ @retval EFI_NOT_FOUND No FMP Instance are found
+ @retval EFI_OUT_OF_RESOURCES Resource allocaton fail
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *SYNC_ESRT_FMP)(
+ VOID
+ );
+
+
+/**
+ This function locks up Esrt repository to be readonly. It should be called
+ before gEfiEndOfDxeEventGroupGuid event signaled
+
+ @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *LOCK_ESRT_REPOSITORY)(
+ VOID
+ );
+
+
+struct _ESRT_MANAGEMENT_PROTOCOL {
+ GET_ESRT_ENTRY GetEsrtEntry;
+ UPDATE_ESRT_ENTRY UpdateEsrtEntry;
+ REGISTER_ESRT_ENTRY RegisterEsrtEntry;
+ UNREGISTER_ESRT_ENTRY UnRegisterEsrtEntry;
+ SYNC_ESRT_FMP SyncEsrtFmp;
+ LOCK_ESRT_REPOSITORY LockEsrtRepository;
+};
+
+extern EFI_GUID gEsrtManagementProtocolGuid;
+
+#endif // #ifndef _ESRT_MANAGEMENT_H_
+