--- /dev/null
+/** @file\r
+ The Esrt Management Protocol used to register/set/update an updatable firmware resource .\r
+\r
+Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials are licensed and made available under \r
+the terms and conditions of the BSD License that accompanies this distribution. \r
+The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php. \r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef _ESRT_MANAGEMENT_H_\r
+#define _ESRT_MANAGEMENT_H_\r
+\r
+#include <Guid/SystemResourceTable.h>\r
+\r
+///\r
+/// Global ID for the ESRT_MANAGEMENT_PROTOCOL.\r
+///\r
+#define ESRT_MANAGEMENT_PROTOCOL_GUID \\r
+ { \\r
+ 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 } \\r
+ }\r
+\r
+///\r
+/// Forward declaration for the _ESRT_MANAGEMENT_PROTOCOL.\r
+///\r
+typedef struct _ESRT_MANAGEMENT_PROTOCOL ESRT_MANAGEMENT_PROTOCOL;\r
+\r
+/**\r
+ Get Variable name and data by Esrt Entry FwClass \r
+\r
+ @param[in] FwClass FwClass of Esrt entry to get \r
+ @param[in out] Entry Esrt entry returned \r
+ \r
+ @retval EFI_SUCCESS The variable saving this Esrt Entry exists.\r
+ @retval EF_NOT_FOUND No correct variable found.\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *GET_ESRT_ENTRY)(\r
+ IN EFI_GUID *FwClass,\r
+ IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry\r
+ );\r
+ \r
+\r
+/**\r
+ Update one ESRT entry in ESRT Cache.\r
+\r
+ @param[in] Entry Esrt entry to be updated\r
+ \r
+ @retval EFI_SUCCESS Successfully update an ESRT entry in cache.\r
+ @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache\r
+ @retval EFI_WRITE_PROTECTED ESRT Cache repositoy is locked\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *UPDATE_ESRT_ENTRY)(\r
+ IN EFI_SYSTEM_RESOURCE_ENTRY *Entry\r
+ );\r
+\r
+\r
+/**\r
+ Non-FMP instance to unregister Esrt Entry from ESRT Cache. \r
+\r
+ @param[in] FwClass FwClass of Esrt entry to Unregister \r
+ \r
+ @retval EFI_SUCCESS Insert all entries Successfully \r
+ @retval EFI_NOT_FOUND FwClass does not exsit\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *UNREGISTER_ESRT_ENTRY)(\r
+ IN EFI_GUID *FwClass\r
+ );\r
+\r
+\r
+/**\r
+ Non-FMP instance to register one ESRT entry into ESRT Cache.\r
+\r
+ @param[in] Entry Esrt entry to be set\r
+\r
+ @retval EFI_SUCCESS Successfully set a variable.\r
+ @retval EFI_INVALID_PARAMETER ESRT Entry is already exist\r
+ @retval EFI_OUT_OF_RESOURCES Non-FMP ESRT repository is full\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *REGISTER_ESRT_ENTRY)(\r
+ IN EFI_SYSTEM_RESOURCE_ENTRY *Entry\r
+ );\r
+\r
+\r
+/**\r
+ This function syn up Cached ESRT with data from FMP instances\r
+ Function should be called after Connect All in order to locate all FMP protocols\r
+ installed\r
+\r
+ @retval EFI_SUCCESS Successfully sync cache repository from FMP instances\r
+ @retval EFI_NOT_FOUND No FMP Instance are found\r
+ @retval EFI_OUT_OF_RESOURCES Resource allocaton fail\r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *SYNC_ESRT_FMP)(\r
+ VOID\r
+ );\r
+\r
+\r
+/**\r
+ This function locks up Esrt repository to be readonly. It should be called \r
+ before gEfiEndOfDxeEventGroupGuid event signaled\r
+\r
+ @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully \r
+\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *LOCK_ESRT_REPOSITORY)(\r
+ VOID\r
+ );\r
+\r
+\r
+struct _ESRT_MANAGEMENT_PROTOCOL {\r
+ GET_ESRT_ENTRY GetEsrtEntry;\r
+ UPDATE_ESRT_ENTRY UpdateEsrtEntry;\r
+ REGISTER_ESRT_ENTRY RegisterEsrtEntry;\r
+ UNREGISTER_ESRT_ENTRY UnRegisterEsrtEntry;\r
+ SYNC_ESRT_FMP SyncEsrtFmp;\r
+ LOCK_ESRT_REPOSITORY LockEsrtRepository;\r
+};\r
+\r
+extern EFI_GUID gEsrtManagementProtocolGuid;\r
+\r
+#endif // #ifndef _ESRT_MANAGEMENT_H_\r
+\r
\r
## Include/Protocol/UfsHostController.h\r
gEdkiiUfsHostControllerProtocolGuid = { 0xebc01af5, 0x7a9, 0x489e, { 0xb7, 0xce, 0xdc, 0x8, 0x9e, 0x45, 0x9b, 0x2f } }\r
+ \r
+ ## Include/Protocol/EsrtManagement.h\r
+ gEsrtManagementProtocolGuid = { 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 }}\r
\r
#\r
# [Error.gEfiMdeModulePkgTokenSpaceGuid]\r
## Serial Port Extended Transmit FIFO Size. The default is 64 bytes. \r
# @Prompt Serial Port Extended Transmit FIFO Size in Bytes\r
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|64|UINT32|0x00010068\r
-\r
+ \r
## This PCD points to the file name GUID of the BootManagerMenuApp\r
# Platform can customize the PCD to point to different application for Boot Manager Menu\r
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0xdc, 0x5b, 0xc2, 0xee, 0xf2, 0x67, 0x95, 0x4d, 0xb1, 0xd5, 0xf8, 0x1b, 0x20, 0x39, 0xd1, 0x1d }|VOID*|0x0001006b\r
# @Prompt Mmio base address of pci-based UFS host controller.\r
gEfiMdeModulePkgTokenSpaceGuid.PcdUfsPciHostControllerMmioBase|0xd0000000|UINT32|0x10000061\r
\r
+ ## Specify Max ESRT cache entry number supported for FMP instances\r
+ #\r
+ # @Prompt Max FMP ESRT entry number to be synced & cached in repository.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxFmpEsrtCacheNum|32|UINT32|0x0000006b\r
+\r
+ ## Specify Max ESRT cache entry number supported for Non FMP instances\r
+ #\r
+ # @Prompt Max Non-FMP ESRT entry number to be cached in repository.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxNonFmpEsrtCacheNum|32|UINT32|0x0000006c\r
+\r
+ ## Specify of Capsule Flag defined by CapsuleGuid to request system reboot after capsule process\r
+ #\r
+ # @Prompt Flag to request system reboot after processing capsule.\r
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSystemRebootAfterCapsuleProcessFlag|0x0001|UINT16|0x0000006d\r
+\r
[PcdsPatchableInModule]\r
## Specify memory size with page number for PEI code when\r
# Loading Module at Fixed Address feature is enabled.\r