Revision: 17425
          http://sourceforge.net/p/edk2/code/17425
Author:   czhang46
Date:     2015-05-13 08:29:06 +0000 (Wed, 13 May 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Gao Liming <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/MdeModulePkg.dec
    trunk/edk2/MdeModulePkg/MdeModulePkg.uni

Added Paths:
-----------
    trunk/edk2/MdeModulePkg/Include/Protocol/EsrtManagement.h

Added: trunk/edk2/MdeModulePkg/Include/Protocol/EsrtManagement.h
===================================================================
--- trunk/edk2/MdeModulePkg/Include/Protocol/EsrtManagement.h                   
        (rev 0)
+++ trunk/edk2/MdeModulePkg/Include/Protocol/EsrtManagement.h   2015-05-13 
08:29:06 UTC (rev 17425)
@@ -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_
+

Modified: trunk/edk2/MdeModulePkg/MdeModulePkg.dec
===================================================================
--- trunk/edk2/MdeModulePkg/MdeModulePkg.dec    2015-05-13 08:27:04 UTC (rev 
17424)
+++ trunk/edk2/MdeModulePkg/MdeModulePkg.dec    2015-05-13 08:29:06 UTC (rev 
17425)
@@ -409,6 +409,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]
@@ -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.

Modified: trunk/edk2/MdeModulePkg/MdeModulePkg.uni
===================================================================
--- trunk/edk2/MdeModulePkg/MdeModulePkg.uni    2015-05-13 08:27:04 UTC (rev 
17424)
+++ trunk/edk2/MdeModulePkg/MdeModulePkg.uni    2015-05-13 08:29:06 UTC (rev 
17425)
@@ -1544,4 +1544,26 @@
  +++++++++++ \ No newline at end of file


------------------------------------------------------------------------------
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-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to