Add ESRT management protocol definition into MdeModulePkg Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zh...@intel.com> --- MdeModulePkg/Include/Protocol/EsrtManagement.h | 136 +++++++++++++++++++++++++ MdeModulePkg/MdeModulePkg.dec | 20 ++++ MdeModulePkg/MdeModulePkg.dsc | 1 + 3 files changed, 157 insertions(+) create mode 100644 MdeModulePkg/Include/Protocol/EsrtManagement.h diff --git a/MdeModulePkg/Include/Protocol/EsrtManagement.h b/MdeModulePkg/Include/Protocol/EsrtManagement.h new file mode 100644 index 0000000..7e5c098 --- /dev/null +++ b/MdeModulePkg/Include/Protocol/EsrtManagement.h @@ -0,0 +1,136 @@ +/** @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 _EFI_ESRT_MANAGEMENT_H_ +#define _EFI_ESRT_MANAGEMENT_H_ + +#include <Guid/SystemResourceTable.h> + +/// +/// Global ID for the EFI_ESRT_MANAGEMENT_PROTOCOL. +/// +#define EFI_ESRT_MANAGEMENT_PROTOCOL_GUID \ + { \ + 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 } \ + } + +/// +/// Forward declaration for the _EFI_ESRT_MANAGEMENT_PROTOCOL. +/// +typedef struct _EFI_ESRT_MANAGEMENT_PROTOCOL EFI_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 *EFI_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 *EFI_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 *EFI_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 *EFI_REGISTER_ESRT_ENTRY)( + IN EFI_SYSTEM_RESOURCE_ENTRY *Entry + ); + +/** + This function syn up Cached ESRT with data from FMP protocol + Function should be called after Connect All in order to locate all FMP protocols + installed + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_SYNC_ESRT_FMP)( + VOID + ); + + +/** + This function locks up Esrt repository to be readonly + +**/ +typedef +EFI_STATUS +(EFIAPI *EFI_LOCK_ESRT_REPOSITORY)( + VOID + ); + + +struct _EFI_ESRT_MANAGEMENT_PROTOCOL { + EFI_GET_ESRT_ENTRY GetEsrtEntry; + EFI_UPDATE_ESRT_ENTRY UpdateEsrtEntry; + EFI_REGISTER_ESRT_ENTRY RegisterEsrtEntry; + EFI_UNREGISTER_ESRT_ENTRY UnRegisterEsrtEntry; + EFI_SYNC_ESRT_FMP SyncEsrtFmp; + EFI_LOCK_ESRT_REPOSITORY LockEsrtRepository; +}; + +extern EFI_GUID gEfiEsrtManagementProtocolGuid; + +#endif // #ifndef _EFI_ESRT_MANAGEMENT_H_ + diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 5a7de46..3f03a8b 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -407,6 +407,9 @@ ## Include/Protocol/UfsHostController.h gEdkiiUfsHostControllerProtocolGuid = { 0xebc01af5, 0x7a9, 0x489e, { 0xb7, 0xce, 0xdc, 0x8, 0x9e, 0x45, 0x9b, 0x2f } } + ## Include/Protocol/EsrtManagement.h + gEfiEsrtManagementProtocolGuid = { 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 }} + # # [Error.gEfiMdeModulePkgTokenSpaceGuid] # 0x80000001 | Invalid value provided. @@ -1227,6 +1230,23 @@ # @Prompt Mmio base address of pci-based UFS host controller. gEfiMdeModulePkgTokenSpaceGuid.PcdUfsPciHostControllerMmioBase|0xd0000000|UINT32|0x10000061 + ## Specify Max ESRT cache entry number supported for FMP instance + # + # @Max ESRT entry number to be cached + # @ValidList 0x80000001 | 0 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxFmpEsrtCacheNum|32|UINT32|0x0001006b + + ## Specify Max ESRT cache entry number supported for Non FMP instance + # + # @Max ESRT entry number to be cached + # @ValidList 0x80000001 | 0 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxNonFmpEsrtCacheNum|32|UINT32|0x0000006c + + ## Specify of Capsule Flag defined by CapsuleGuid to request system reboot after capsule process + # + # @Request system reboot after capsule process + gEfiMdeModulePkgTokenSpaceGuid.PcdSystemRebootAfterCapsuleProcessFlag|0x0001|UINT16|0x0000006d + [PcdsPatchableInModule] ## Specify memory size with page number for PEI code when # Loading Module at Fixed Address feature is enabled. diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 0bf3cca..67bbe63 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -345,6 +345,7 @@ } MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf + MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf [Components.IA32, Components.X64, Components.IPF] MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf -- 1.9.5.msysgit.1 ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel