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 | 144 +++++++++++++++++++++++++
 MdeModulePkg/MdeModulePkg.dec                  |  20 +++-
 MdeModulePkg/MdeModulePkg.uni                  | Bin 163654 -> 165546 bytes
 3 files changed, 163 insertions(+), 1 deletion(-)
 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..f9aa417
--- /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_
+
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index ec4e76e..d87702e 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -410,6 +410,9 @@
   ## Include/Protocol/UfsHostController.h
   gEdkiiUfsHostControllerProtocolGuid = { 0xebc01af5, 0x7a9, 0x489e, { 0xb7, 
0xce, 0xdc, 0x8, 0x9e, 0x45, 0x9b, 0x2f } }
 
+  ## Include/Protocol/EsrtManagement.h
+  gEsrtManagementProtocolGuid         = { 0xa340c064, 0x723c, 0x4a9c, { 0xa4, 
0xdd, 0xd5, 0xb4, 0x7a, 0x26, 0xfb, 0xb0 }}
+
 #
 # [Error.gEfiMdeModulePkgTokenSpaceGuid]
 #   0x80000001 | Invalid value provided.
@@ -925,7 +928,7 @@
   ## Serial Port Extended Transmit FIFO Size.  The default is 64 bytes. 
   # @Prompt Serial Port Extended Transmit FIFO Size in Bytes
   
gEfiMdeModulePkgTokenSpaceGuid.PcdSerialExtendedTxFifoSize|64|UINT32|0x00010068
-
+  
   ## This PCD points to the file name GUID of the BootManagerMenuApp
   #  Platform can customize the PCD to point to different application for Boot 
Manager Menu
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0xdc, 0x5b, 0xc2, 
0xee, 0xf2, 0x67, 0x95, 0x4d, 0xb1, 0xd5, 0xf8, 0x1b, 0x20, 0x39, 0xd1, 0x1d 
}|VOID*|0x0001006b
@@ -1262,6 +1265,21 @@
   # @Prompt Mmio base address of pci-based UFS host controller.
   
gEfiMdeModulePkgTokenSpaceGuid.PcdUfsPciHostControllerMmioBase|0xd0000000|UINT32|0x10000061
 
+  ## Specify Max ESRT cache entry number supported for FMP instances
+  #
+  # @Prompt Max FMP ESRT entry number to be synced & cached in repository.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxFmpEsrtCacheNum|32|UINT32|0x0000006b
+
+  ## Specify Max ESRT cache entry number supported for Non FMP instances
+  #
+  # @Prompt Max Non-FMP ESRT entry number to be cached in repository.
+  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxNonFmpEsrtCacheNum|32|UINT32|0x0000006c
+
+  ## Specify of Capsule Flag defined by CapsuleGuid to request system reboot 
after capsule process
+  #
+  # @Prompt Flag to request system reboot after processing capsule.
+  
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.uni b/MdeModulePkg/MdeModulePkg.uni
index 
a3ed93e03707624ad190d900dcf0be46b396774f..7d767b06a6bd8824b265d27971470e909fdeacf3
 100644
GIT binary patch
delta 1038
zcmd6mu}i~16vn?e6dMq65U1i{!A%gPI5<gZwwA`asgxRHTQEsYQnVnngR2hSkhOCs
zMHl}8cmE;ryNgj5I}||)7w+D@_wKuo-@Ux$CpYHk+IX6?hVu6DP~Mkv1q&W}s31a!
z7-h8JpaT~*^x?^e&7Glug(~V0%xYi{`<%J(nH^%lxvw&D%vi`(jDUZ&66`tPuEY5W
zSL+<kXMYvxa#yg*rGkLjU0toZu3-VD9z}UHZms;FGFh4!+ftNr|3PH2#!L7#Ynq{U
zzC^86+HlFMrxhDB8$5%Zh-7ozEKJp^ZT)kZtFH&;0jY?|hez&QQWfxvv5Qk34K=Sl
z=JavK{W@6+G;a}O7Go{66Jwc-T$%HBil)NtoCU6KokE%&lERoBBUqjtB#7wu<_g_*
g^1NtVR2t+pYcR7)Y2R%rk)2-``SI$$TuR^8J2GX;)&Kwi

delta 13
UcmZ40%XRD@XG06)7ACiP04pg4j{pDw

-- 
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

Reply via email to