]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg: Reference new definitions for Management Mode.
authorEric Dong <eric.dong@intel.com>
Mon, 28 Aug 2017 06:35:08 +0000 (14:35 +0800)
committerEric Dong <eric.dong@intel.com>
Tue, 29 Aug 2017 01:37:37 +0000 (09:37 +0800)
In PI 1.5 version, system management mode name(SMM) has been changed
to Management Mode(MM). It impacts the current code which still use
SMM/Smram/SMI keywords. This patch update the original files which
related to old SMM modules, also keep the compatible with old SMM
related drivers.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
23 files changed:
MdePkg/Include/Pi/PiMultiPhase.h
MdePkg/Include/Pi/PiSmmCis.h
MdePkg/Include/Protocol/DxeSmmReadyToLock.h
MdePkg/Include/Protocol/SmmAccess2.h
MdePkg/Include/Protocol/SmmBase2.h
MdePkg/Include/Protocol/SmmCommunication.h
MdePkg/Include/Protocol/SmmConfiguration.h
MdePkg/Include/Protocol/SmmControl2.h
MdePkg/Include/Protocol/SmmCpu.h
MdePkg/Include/Protocol/SmmCpuIo2.h
MdePkg/Include/Protocol/SmmEndOfDxe.h
MdePkg/Include/Protocol/SmmGpiDispatch2.h
MdePkg/Include/Protocol/SmmIoTrapDispatch2.h
MdePkg/Include/Protocol/SmmPciRootBridgeIo.h
MdePkg/Include/Protocol/SmmPeriodicTimerDispatch2.h
MdePkg/Include/Protocol/SmmPowerButtonDispatch2.h
MdePkg/Include/Protocol/SmmReadyToLock.h
MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h
MdePkg/Include/Protocol/SmmStandbyButtonDispatch2.h
MdePkg/Include/Protocol/SmmStatusCode.h
MdePkg/Include/Protocol/SmmSwDispatch2.h
MdePkg/Include/Protocol/SmmSxDispatch2.h
MdePkg/Include/Protocol/SmmUsbDispatch2.h

index 169258caa89d906fd74e864b80661f370ccf6247..68390385805e4f0eb5f597b715976637ae159ca4 100644 (file)
@@ -95,43 +95,49 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 ///@}\r
 \r
 ///\r
-/// SMRAM states and capabilities\r
+/// MMRAM states and capabilities\r
 ///\r
-#define EFI_SMRAM_OPEN                  0x00000001\r
-#define EFI_SMRAM_CLOSED                0x00000002\r
-#define EFI_SMRAM_LOCKED                0x00000004\r
+#define EFI_MMRAM_OPEN                  0x00000001\r
+#define EFI_MMRAM_CLOSED                0x00000002\r
+#define EFI_MMRAM_LOCKED                0x00000004\r
 #define EFI_CACHEABLE                   0x00000008\r
 #define EFI_ALLOCATED                   0x00000010\r
 #define EFI_NEEDS_TESTING               0x00000020\r
 #define EFI_NEEDS_ECC_INITIALIZATION    0x00000040\r
 \r
+#define EFI_SMRAM_OPEN                  EFI_MMRAM_OPEN\r
+#define EFI_SMRAM_CLOSED                EFI_MMRAM_CLOSED\r
+#define EFI_SMRAM_LOCKED                EFI_MMRAM_LOCKED\r
+\r
 ///\r
-/// Structure describing a SMRAM region and its accessibility attributes.\r
+/// Structure describing a MMRAM region and its accessibility attributes.\r
 ///\r
 typedef struct {\r
   ///\r
-  /// Designates the physical address of the SMRAM in memory. This view of memory is \r
-  /// the same as seen by I/O-based agents, for example, but it may not be the address seen \r
+  /// Designates the physical address of the MMRAM in memory. This view of memory is\r
+  /// the same as seen by I/O-based agents, for example, but it may not be the address seen\r
   /// by the processors.\r
   ///\r
   EFI_PHYSICAL_ADDRESS  PhysicalStart;\r
   ///\r
-  /// Designates the address of the SMRAM, as seen by software executing on the \r
+  /// Designates the address of the MMRAM, as seen by software executing on the\r
   /// processors. This address may or may not match PhysicalStart.\r
   ///\r
   EFI_PHYSICAL_ADDRESS  CpuStart;       \r
   ///\r
-  /// Describes the number of bytes in the SMRAM region.\r
+  /// Describes the number of bytes in the MMRAM region.\r
   ///\r
   UINT64                PhysicalSize;\r
   ///\r
-  /// Describes the accessibility attributes of the SMRAM.  These attributes include the \r
-  /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical \r
-  /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC \r
+  /// Describes the accessibility attributes of the MMRAM.  These attributes include the\r
+  /// hardware state (e.g., Open/Closed/Locked), capability (e.g., cacheable), logical\r
+  /// allocation (e.g., allocated), and pre-use initialization (e.g., needs testing/ECC\r
   /// initialization).\r
   ///\r
   UINT64                RegionState;\r
-} EFI_SMRAM_DESCRIPTOR;\r
+} EFI_MMRAM_DESCRIPTOR;\r
+\r
+typedef EFI_MMRAM_DESCRIPTOR  EFI_SMRAM_DESCRIPTOR;\r
 \r
 typedef enum {\r
   EFI_PCD_TYPE_8,\r
index 6cb28b7fb2c9aee7e028b45bb03fa4c5dd81205c..4f8d5d0fdfaef9bd04a7399876141da6b5213118 100644 (file)
 #ifndef _PI_SMMCIS_H_\r
 #define _PI_SMMCIS_H_\r
 \r
-#include <Pi/PiMultiPhase.h>\r
+#include <Pi/PiMmCis.h>\r
 #include <Protocol/SmmCpuIo2.h>\r
 \r
 typedef struct _EFI_SMM_SYSTEM_TABLE2  EFI_SMM_SYSTEM_TABLE2;\r
-\r
-///\r
-/// The System Management System Table (SMST) signature\r
-///\r
-#define SMM_SMST_SIGNATURE            SIGNATURE_32 ('S', 'M', 'S', 'T')\r
-///\r
-/// The System Management System Table (SMST) revision is 1.4\r
-///\r
-#define SMM_SPECIFICATION_MAJOR_REVISION  1\r
-#define SMM_SPECIFICATION_MINOR_REVISION  40\r
-#define EFI_SMM_SYSTEM_TABLE2_REVISION    ((SMM_SPECIFICATION_MAJOR_REVISION<<16) | (SMM_SPECIFICATION_MINOR_REVISION))\r
+//\r
+// Define new MM related definition introduced by PI 1.5.\r
+//\r
+#define  SMM_SMST_SIGNATURE                MM_MMST_SIGNATURE\r
+#define  SMM_SPECIFICATION_MAJOR_REVISION  MM_SPECIFICATION_MAJOR_REVISION\r
+#define  SMM_SPECIFICATION_MINOR_REVISION  MM_SPECIFICATION_MINOR_REVISION\r
+#define  EFI_SMM_SYSTEM_TABLE2_REVISION    EFI_MM_SYSTEM_TABLE_REVISION\r
 \r
 /**\r
   Adds, updates, or removes a configuration table entry from the System Management System Table.\r
@@ -53,160 +49,19 @@ typedef struct _EFI_SMM_SYSTEM_TABLE2  EFI_SMM_SYSTEM_TABLE2;
 typedef\r
 EFI_STATUS\r
 (EFIAPI *EFI_SMM_INSTALL_CONFIGURATION_TABLE2)(\r
-  IN CONST EFI_SMM_SYSTEM_TABLE2  *SystemTable,\r
-  IN CONST EFI_GUID               *Guid,\r
-  IN VOID                         *Table,\r
-  IN UINTN                        TableSize\r
-  );\r
-\r
-/**\r
-  This service lets the caller to get one distinct application processor (AP) to execute\r
-  a caller-provided code stream while in SMM.\r
-\r
-  @param[in]     Procedure       A pointer to the code stream to be run on the designated\r
-                                 AP of the system.\r
-  @param[in]     CpuNumber       The zero-based index of the processor number of the AP\r
-                                 on which the code stream is supposed to run.\r
-  @param[in,out] ProcArguments   Allows the caller to pass a list of parameters to the code\r
-                                 that is run by the AP.\r
-\r
-  @retval EFI_SUCCESS            The call was successful and the return parameters are valid.\r
-  @retval EFI_INVALID_PARAMETER  The input arguments are out of range.\r
-  @retval EFI_INVALID_PARAMETER  The CPU requested is not available on this SMI invocation.\r
-  @retval EFI_INVALID_PARAMETER  The CPU cannot support an additional service invocation.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STARTUP_THIS_AP)(\r
-  IN EFI_AP_PROCEDURE  Procedure,\r
-  IN UINTN             CpuNumber,\r
-  IN OUT VOID          *ProcArguments OPTIONAL\r
+  IN CONST EFI_SMM_SYSTEM_TABLE2    *SystemTable,\r
+  IN CONST EFI_GUID                 *Guid,\r
+  IN VOID                           *Table,\r
+  IN UINTN                          TableSize\r
   );\r
 \r
-/**\r
-  Function prototype for protocol install notification.\r
-\r
-  @param[in] Protocol   Points to the protocol's unique identifier.\r
-  @param[in] Interface  Points to the interface instance.\r
-  @param[in] Handle     The handle on which the interface was installed.\r
-\r
-  @return Status Code\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_NOTIFY_FN)(\r
-  IN CONST EFI_GUID  *Protocol,\r
-  IN VOID            *Interface,\r
-  IN EFI_HANDLE      Handle\r
-  );\r
-\r
-/**\r
-  Register a callback function be called when a particular protocol interface is installed.\r
-\r
-  The SmmRegisterProtocolNotify() function creates a registration Function that is to be \r
-  called whenever a protocol interface is installed for Protocol by \r
-  SmmInstallProtocolInterface().\r
-  If Function == NULL and Registration is an existing registration, then the callback is unhooked.\r
-\r
-  @param[in]  Protocol          The unique ID of the protocol for which the event is to be registered.\r
-  @param[in]  Function          Points to the notification function.\r
-  @param[out] Registration      A pointer to a memory location to receive the registration value.\r
-\r
-  @retval EFI_SUCCESS           Successfully returned the registration record\r
-                                that has been added or unhooked.\r
-  @retval EFI_INVALID_PARAMETER Protocol is NULL or Registration is NULL.\r
-  @retval EFI_OUT_OF_RESOURCES  Not enough memory resource to finish the request.\r
-  @retval EFI_NOT_FOUND         If the registration is not found when Function == NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_REGISTER_PROTOCOL_NOTIFY)(\r
-  IN  CONST EFI_GUID     *Protocol,\r
-  IN  EFI_SMM_NOTIFY_FN  Function,\r
-  OUT VOID               **Registration\r
-  );\r
-\r
-/**\r
-  Manage SMI of a particular type.\r
-\r
-  @param[in]     HandlerType     Points to the handler type or NULL for root SMI handlers.\r
-  @param[in]     Context         Points to an optional context buffer.\r
-  @param[in,out] CommBuffer      Points to the optional communication buffer.\r
-  @param[in,out] CommBufferSize  Points to the size of the optional communication buffer.\r
-\r
-  @retval EFI_WARN_INTERRUPT_SOURCE_PENDING  Interrupt source was processed successfully but not quiesced.\r
-  @retval EFI_INTERRUPT_PENDING              One or more SMI sources could not be quiesced.\r
-  @retval EFI_NOT_FOUND                      Interrupt source was not handled or quiesced.\r
-  @retval EFI_SUCCESS                        Interrupt source was handled and quiesced.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_MANAGE)(\r
-  IN CONST EFI_GUID  *HandlerType,\r
-  IN CONST VOID      *Context         OPTIONAL,\r
-  IN OUT VOID        *CommBuffer      OPTIONAL,\r
-  IN OUT UINTN       *CommBufferSize  OPTIONAL\r
-  );\r
-\r
-/**\r
-  Main entry point for an SMM handler dispatch or communicate-based callback.\r
-\r
-  @param[in]     DispatchHandle  The unique handle assigned to this handler by SmiHandlerRegister().\r
-  @param[in]     Context         Points to an optional handler context which was specified when the\r
-                                 handler was registered.\r
-  @param[in,out] CommBuffer      A pointer to a collection of data in memory that will\r
-                                 be conveyed from a non-SMM environment into an SMM environment.\r
-  @param[in,out] CommBufferSize  The size of the CommBuffer.\r
-\r
-  @retval EFI_SUCCESS                         The interrupt was handled and quiesced. No other handlers \r
-                                              should still be called.\r
-  @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED  The interrupt has been quiesced but other handlers should \r
-                                              still be called.\r
-  @retval EFI_WARN_INTERRUPT_SOURCE_PENDING   The interrupt is still pending and other handlers should still \r
-                                              be called.\r
-  @retval EFI_INTERRUPT_PENDING               The interrupt could not be quiesced.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_HANDLER_ENTRY_POINT2)(\r
-  IN EFI_HANDLE  DispatchHandle,\r
-  IN CONST VOID  *Context         OPTIONAL,\r
-  IN OUT VOID    *CommBuffer      OPTIONAL,\r
-  IN OUT UINTN   *CommBufferSize  OPTIONAL\r
-  );\r
-\r
-/**\r
-  Registers a handler to execute within SMM.\r
-\r
-  @param[in]  Handler            Handler service function pointer.\r
-  @param[in]  HandlerType        Points to the handler type or NULL for root SMI handlers.\r
-  @param[out] DispatchHandle     On return, contains a unique handle which can be used to later\r
-                                 unregister the handler function.\r
-\r
-  @retval EFI_SUCCESS            SMI handler added successfully.\r
-  @retval EFI_INVALID_PARAMETER  Handler is NULL or DispatchHandle is NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_REGISTER)(\r
-  IN  EFI_SMM_HANDLER_ENTRY_POINT2  Handler,\r
-  IN  CONST EFI_GUID                *HandlerType OPTIONAL,\r
-  OUT EFI_HANDLE                    *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregister a handler in SMM.\r
-\r
-  @param[in] DispatchHandle      The handle that was specified when the handler was registered.\r
-\r
-  @retval EFI_SUCCESS            Handler function was successfully unregistered.\r
-  @retval EFI_INVALID_PARAMETER  DispatchHandle does not refer to a valid handle.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_INTERRUPT_UNREGISTER)(\r
-  IN EFI_HANDLE  DispatchHandle\r
-  );\r
+typedef  EFI_MM_STARTUP_THIS_AP                EFI_SMM_STARTUP_THIS_AP;\r
+typedef  EFI_MM_NOTIFY_FN                      EFI_SMM_NOTIFY_FN;\r
+typedef  EFI_MM_REGISTER_PROTOCOL_NOTIFY       EFI_SMM_REGISTER_PROTOCOL_NOTIFY;\r
+typedef  EFI_MM_INTERRUPT_MANAGE               EFI_SMM_INTERRUPT_MANAGE;\r
+typedef  EFI_MM_HANDLER_ENTRY_POINT            EFI_SMM_HANDLER_ENTRY_POINT2;\r
+typedef  EFI_MM_INTERRUPT_REGISTER             EFI_SMM_INTERRUPT_REGISTER;\r
+typedef  EFI_MM_INTERRUPT_UNREGISTER           EFI_SMM_INTERRUPT_UNREGISTER;\r
 \r
 ///\r
 /// Processor information and functionality needed by SMM Foundation.\r
index a52a8a2c34c6ac4586827b71f4ed038ab84b3714..1bb253565658700c5e8d5862048bd2529d3d753e 100644 (file)
@@ -17,7 +17,7 @@
   platform code may choose to use notification handler to lock SMM by invoking\r
   EFI_SMM_ACCESS2_PROTOCOL.Lock() function.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _DXE_SMM_READY_TO_LOCK_H_\r
 #define _DXE_SMM_READY_TO_LOCK_H_\r
 \r
-#define EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL_GUID \\r
-  { \\r
-    0x60ff8964, 0xe906, 0x41d0, { 0xaf, 0xed, 0xf2, 0x41, 0xe9, 0x74, 0xe0, 0x8e } \\r
-  }\r
+#include <Protocol/DxeMmReadyToLock.h>\r
+\r
+#define EFI_DXE_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_DXE_MM_READY_TO_LOCK_PROTOCOL_GUID\r
 \r
 extern EFI_GUID gEfiDxeSmmReadyToLockProtocolGuid;\r
 \r
index 5904266ba0bec275dac5d3657e500bc551e95a11..3dc15fe597af35f1c73e6fa689e3d044c3551b86 100644 (file)
 #ifndef _SMM_ACCESS2_H_\r
 #define _SMM_ACCESS2_H_\r
 \r
-#define EFI_SMM_ACCESS2_PROTOCOL_GUID \\r
-  { \\r
-     0xc2702b74, 0x800c, 0x4131, {0x87, 0x46, 0x8f, 0xb5, 0xb8, 0x9c, 0xe4, 0xac } \\r
-  }\r
+#include <Protocol/MmAccess.h>\r
 \r
+#define EFI_SMM_ACCESS2_PROTOCOL_GUID       EFI_MM_ACCESS_PROTOCOL_GUID\r
 \r
-typedef struct _EFI_SMM_ACCESS2_PROTOCOL  EFI_SMM_ACCESS2_PROTOCOL;\r
+typedef EFI_MM_ACCESS_PROTOCOL  EFI_SMM_ACCESS2_PROTOCOL;\r
 \r
-/**\r
-  Opens the SMRAM area to be accessible by a boot-service driver.\r
+typedef EFI_MM_OPEN EFI_SMM_OPEN2;\r
 \r
-  This function "opens" SMRAM so that it is visible while not inside of SMM. The function should \r
-  return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function \r
-  should return EFI_DEVICE_ERROR if the SMRAM configuration is locked.\r
+typedef EFI_MM_CLOSE EFI_SMM_CLOSE2;\r
 \r
-  @param[in] This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-\r
-  @retval EFI_SUCCESS       The operation was successful.\r
-  @retval EFI_UNSUPPORTED   The system does not support opening and closing of SMRAM.\r
-  @retval EFI_DEVICE_ERROR  SMRAM cannot be opened, perhaps because it is locked.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_OPEN2)(\r
-  IN EFI_SMM_ACCESS2_PROTOCOL  *This\r
-  );\r
-\r
-/**\r
-  Inhibits access to the SMRAM.\r
-\r
-  This function "closes" SMRAM so that it is not visible while outside of SMM. The function should \r
-  return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM.\r
-\r
-  @param[in] This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-\r
-  @retval EFI_SUCCESS       The operation was successful.\r
-  @retval EFI_UNSUPPORTED   The system does not support opening and closing of SMRAM.\r
-  @retval EFI_DEVICE_ERROR  SMRAM cannot be closed.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_CLOSE2)(\r
-  IN EFI_SMM_ACCESS2_PROTOCOL  *This\r
-  );\r
-\r
-/**\r
-  Inhibits access to the SMRAM.\r
-\r
-  This function prohibits access to the SMRAM region.  This function is usually implemented such \r
-  that it is a write-once operation. \r
-\r
-  @param[in] This          The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-\r
-  @retval EFI_SUCCESS      The device was successfully locked.\r
-  @retval EFI_UNSUPPORTED  The system does not support locking of SMRAM.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_LOCK2)(\r
-  IN EFI_SMM_ACCESS2_PROTOCOL  *This\r
-  );\r
-\r
-/**\r
-  Queries the memory controller for the possible regions that will support SMRAM.\r
-\r
-  @param[in]     This           The EFI_SMM_ACCESS2_PROTOCOL instance.\r
-  @param[in,out] SmramMapSize   A pointer to the size, in bytes, of the SmramMemoryMap buffer.\r
-  @param[in,out] SmramMap       A pointer to the buffer in which firmware places the current memory map.\r
-\r
-  @retval EFI_SUCCESS           The chipset supported the given resource.\r
-  @retval EFI_BUFFER_TOO_SMALL  The SmramMap parameter was too small.  The current buffer size \r
-                                needed to hold the memory map is returned in SmramMapSize.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_CAPABILITIES2)(\r
-  IN CONST EFI_SMM_ACCESS2_PROTOCOL  *This,\r
-  IN OUT UINTN                       *SmramMapSize,\r
-  IN OUT EFI_SMRAM_DESCRIPTOR        *SmramMap\r
-  );\r
-\r
-///\r
-///  EFI SMM Access2 Protocol is used to control the visibility of the SMRAM on the platform.\r
-///  It abstracts the location and characteristics of SMRAM. The platform should report all \r
-///  MMRAM via EFI_MM_ACCESS_PROTOCOL. The expectation is that the north bridge or memory \r
-///  controller would publish this protocol.\r
-/// \r
-struct _EFI_SMM_ACCESS2_PROTOCOL {\r
-  EFI_SMM_OPEN2          Open;\r
-  EFI_SMM_CLOSE2         Close;\r
-  EFI_SMM_LOCK2          Lock;\r
-  EFI_SMM_CAPABILITIES2  GetCapabilities;\r
-  ///\r
-  /// Indicates the current state of the SMRAM. Set to TRUE if SMRAM is locked.\r
-  ///\r
-  BOOLEAN               LockState;\r
-  ///\r
-  /// Indicates the current state of the SMRAM. Set to TRUE if SMRAM is open.\r
-  ///\r
-  BOOLEAN               OpenState;\r
-};\r
+typedef EFI_MM_LOCK EFI_SMM_LOCK2;\r
 \r
+typedef EFI_MM_CAPABILITIES EFI_SMM_CAPABILITIES2;\r
 extern EFI_GUID gEfiSmmAccess2ProtocolGuid;\r
 \r
 #endif\r
index d60428c053539ac5cd6e2a55b72e1304d616b970..0033e4e13faff9aea2470c34bfa11c21d5776aae 100644 (file)
@@ -4,7 +4,7 @@
   This protocol is utilized by all SMM drivers to locate the SMM infrastructure services and determine\r
   whether the driver is being invoked inside SMRAM or outside of SMRAM.\r
 \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
 #define _SMM_BASE2_H_\r
 \r
 #include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmBase.h>\r
 \r
-#define EFI_SMM_BASE2_PROTOCOL_GUID \\r
-  { \\r
-    0xf4ccbfb7, 0xf6e0, 0x47fd, {0x9d, 0xd4, 0x10, 0xa8, 0xf1, 0x50, 0xc1, 0x91 }  \\r
-  }\r
+#define EFI_SMM_BASE2_PROTOCOL_GUID  EFI_MM_BASE_PROTOCOL_GUID\r
 \r
 typedef struct _EFI_SMM_BASE2_PROTOCOL  EFI_SMM_BASE2_PROTOCOL;\r
 \r
index 5587d49ceda39d081a99381594049161c301be65..95b8d0d115fb8b79603fc71bcbdd794e7a0371ba 100644 (file)
 #ifndef _SMM_COMMUNICATION_H_\r
 #define _SMM_COMMUNICATION_H_\r
 \r
-#pragma pack(1)\r
+#include <Protocol/MmCommunication.h>\r
 \r
-///\r
-/// To avoid confusion in interpreting frames, the communication buffer should always \r
-/// begin with EFI_SMM_COMMUNICATE_HEADER\r
-///\r
-typedef struct {\r
-  ///\r
-  /// Allows for disambiguation of the message format.\r
-  ///\r
-  EFI_GUID  HeaderGuid;\r
-  ///\r
-  /// Describes the size of Data (in bytes) and does not include the size of the header.\r
-  ///\r
-  UINTN     MessageLength;\r
-  ///\r
-  /// Designates an array of bytes that is MessageLength in size.\r
-  ///\r
-  UINT8     Data[1];\r
-} EFI_SMM_COMMUNICATE_HEADER;\r
 \r
-#pragma pack()\r
+typedef EFI_MM_COMMUNICATE_HEADER EFI_SMM_COMMUNICATE_HEADER;\r
 \r
-#define EFI_SMM_COMMUNICATION_PROTOCOL_GUID \\r
-  { \\r
-    0xc68ed8e2, 0x9dc6, 0x4cbd, { 0x9d, 0x94, 0xdb, 0x65, 0xac, 0xc5, 0xc3, 0x32 } \\r
-  }\r
+#define EFI_SMM_COMMUNICATION_PROTOCOL_GUID EFI_MM_COMMUNICATION_PROTOCOL_GUID\r
 \r
-typedef struct _EFI_SMM_COMMUNICATION_PROTOCOL  EFI_SMM_COMMUNICATION_PROTOCOL;\r
-\r
-/**\r
-  Communicates with a registered handler.\r
-  \r
-  This function provides a service to send and receive messages from a registered UEFI service.\r
-\r
-  @param[in] This                The EFI_SMM_COMMUNICATION_PROTOCOL instance.\r
-  @param[in] CommBuffer          A pointer to the buffer to convey into SMRAM.\r
-  @param[in] CommSize            The size of the data buffer being passed in.On exit, the size of data\r
-                                 being returned. Zero if the handler does not wish to reply with any data.\r
-\r
-  @retval EFI_SUCCESS            The message was successfully posted.\r
-  @retval EFI_INVALID_PARAMETER  The CommBuffer was NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_COMMUNICATE2)(\r
-  IN CONST EFI_SMM_COMMUNICATION_PROTOCOL  *This,\r
-  IN OUT VOID                              *CommBuffer,\r
-  IN OUT UINTN                             *CommSize\r
-  );\r
-\r
-///\r
-/// EFI SMM Communication Protocol provides runtime services for communicating\r
-/// between DXE drivers and a registered SMI handler.\r
-///\r
-struct _EFI_SMM_COMMUNICATION_PROTOCOL {\r
-  EFI_SMM_COMMUNICATE2  Communicate;\r
-};\r
+typedef EFI_MM_COMMUNICATION_PROTOCOL EFI_SMM_COMMUNICATION_PROTOCOL;\r
 \r
 extern EFI_GUID gEfiSmmCommunicationProtocolGuid;\r
 \r
index 36748313ed8b48c005b0ff48844b261649873a2b..af47edbe910bcbf301213953d6f9cdef70a85824 100644 (file)
@@ -6,7 +6,7 @@
   2) register the SMM Foundation entry point with the processor code. The entry\r
      point will be invoked by the SMM processor entry code.\r
   \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
 #ifndef _SMM_CONFIGURATION_H_\r
 #define _SMM_CONFIGURATION_H_\r
 \r
+#include <Protocol/MmConfiguration.h>\r
 #include <Pi/PiSmmCis.h>\r
 \r
-#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID \\r
-  { \\r
-    0x26eeb3de, 0xb689, 0x492e, {0x80, 0xf0, 0xbe, 0x8b, 0xd7, 0xda, 0x4b, 0xa7 }  \\r
-  }\r
+#define EFI_SMM_CONFIGURATION_PROTOCOL_GUID EFI_MM_CONFIGURATION_PROTOCOL_GUID\r
 \r
 ///\r
 /// Structure describing a SMRAM region which cannot be used for the SMRAM heap.\r
index 58df62aa6ecd0b77427adce6055e45e89ede2527..7177f8e8cb57c92e17b8fafe1a7494ea07f977b0 100644 (file)
@@ -11,7 +11,7 @@
   accessed, will generate the SMI.  Also, the hardware optionally supports the periodic generation of \r
   these signals.\r
 \r
-  Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
 #ifndef _SMM_CONTROL2_H_\r
 #define _SMM_CONTROL2_H_\r
 \r
-#include <PiDxe.h>\r
+#include <Protocol/MmControl.h>\r
 \r
-#define EFI_SMM_CONTROL2_PROTOCOL_GUID \\r
-  { \\r
-    0x843dc720, 0xab1e, 0x42cb, {0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b}  \\r
-  }\r
+#define EFI_SMM_CONTROL2_PROTOCOL_GUID EFI_MM_CONTROL_PROTOCOL_GUID\r
 \r
-typedef struct _EFI_SMM_CONTROL2_PROTOCOL  EFI_SMM_CONTROL2_PROTOCOL;\r
-typedef UINTN  EFI_SMM_PERIOD;\r
+typedef EFI_MM_CONTROL_PROTOCOL  EFI_SMM_CONTROL2_PROTOCOL;\r
+typedef EFI_MM_PERIOD  EFI_SMM_PERIOD;\r
 \r
-/**\r
-  Invokes SMI activation from either the preboot or runtime environment.\r
-\r
-  This function generates an SMI.\r
-\r
-  @param[in]     This                The EFI_SMM_CONTROL2_PROTOCOL instance.\r
-  @param[in,out] CommandPort         The value written to the command port.\r
-  @param[in,out] DataPort            The value written to the data port.\r
-  @param[in]     Periodic            Optional mechanism to engender a periodic stream.\r
-  @param[in]     ActivationInterval  Optional parameter to repeat at this period one\r
-                                     time or, if the Periodic Boolean is set, periodically.\r
-\r
-  @retval EFI_SUCCESS            The SMI/PMI has been engendered.\r
-  @retval EFI_DEVICE_ERROR       The timing is unsupported.\r
-  @retval EFI_INVALID_PARAMETER  The activation period is unsupported.\r
-  @retval EFI_INVALID_PARAMETER  The last periodic activation has not been cleared. \r
-  @retval EFI_NOT_STARTED        The SMM base service has not been initialized.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_ACTIVATE2)(\r
-  IN CONST EFI_SMM_CONTROL2_PROTOCOL  *This,\r
-  IN OUT UINT8                        *CommandPort       OPTIONAL,\r
-  IN OUT UINT8                        *DataPort          OPTIONAL,\r
-  IN BOOLEAN                          Periodic           OPTIONAL,\r
-  IN UINTN                            ActivationInterval OPTIONAL\r
-  );\r
-\r
-/**\r
-  Clears any system state that was created in response to the Trigger() call.\r
-\r
-  This function acknowledges and causes the deassertion of the SMI activation source.\r
-\r
-  @param[in] This                The EFI_SMM_CONTROL2_PROTOCOL instance.\r
-  @param[in] Periodic            Optional parameter to repeat at this period one time\r
-\r
-  @retval EFI_SUCCESS            The SMI/PMI has been engendered.\r
-  @retval EFI_DEVICE_ERROR       The source could not be cleared.\r
-  @retval EFI_INVALID_PARAMETER  The service did not support the Periodic input argument.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_DEACTIVATE2)(\r
-  IN CONST EFI_SMM_CONTROL2_PROTOCOL  *This,\r
-  IN BOOLEAN                          Periodic OPTIONAL\r
-  );\r
-\r
-///\r
-/// The EFI_SMM_CONTROL2_PROTOCOL is produced by a runtime driver. It provides  an \r
-/// abstraction of the platform hardware that generates an SMI.  There are often I/O ports that, when \r
-/// accessed, will generate the SMI.  Also, the hardware optionally supports the periodic generation of \r
-/// these signals.\r
-///\r
-struct _EFI_SMM_CONTROL2_PROTOCOL {\r
-  EFI_SMM_ACTIVATE2    Trigger;\r
-  EFI_SMM_DEACTIVATE2  Clear;\r
-  ///\r
-  /// Minimum interval at which the platform can set the period.  A maximum is not \r
-  /// specified in that the SMM infrastructure code can emulate a maximum interval that is \r
-  /// greater than the hardware capabilities by using software emulation in the SMM \r
-  /// infrastructure code.\r
-  ///\r
-  EFI_SMM_PERIOD      MinimumTriggerPeriod;\r
-};\r
+typedef EFI_MM_ACTIVATE EFI_SMM_ACTIVATE2;\r
 \r
+typedef EFI_MM_DEACTIVATE EFI_SMM_DEACTIVATE2;\r
 extern EFI_GUID gEfiSmmControl2ProtocolGuid;\r
 \r
 #endif\r
index 2e7f7c3db049fb6d84504f45dde36df49da304f5..117b9a36ee874d11aad95fbcb9357fa9456aacdf 100644 (file)
@@ -6,7 +6,7 @@
   but not in the same format. These so-called pseudo-registers provide this information in a standard \r
   format.  \r
 \r
-  Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
 #ifndef _SMM_CPU_H_\r
 #define _SMM_CPU_H_\r
 \r
-#define EFI_SMM_CPU_PROTOCOL_GUID \\r
-  { \\r
-    0xeb346b97, 0x975f, 0x4a9f, { 0x8b, 0x22, 0xf8, 0xe9, 0x2b, 0xb3, 0xd5, 0x69 } \\r
-  }\r
+#include <Protocol/MmCpu.h>\r
+\r
+#define EFI_SMM_CPU_PROTOCOL_GUID  EFI_MM_CPU_PROTOCOL_GUID\r
+\r
+#define EFI_SMM_SAVE_STATE_REGISTER_GDTBASE       EFI_MM_SAVE_STATE_REGISTER_GDTBASE\r
+#define EFI_SMM_SAVE_STATE_REGISTER_IDTBASE       EFI_MM_SAVE_STATE_REGISTER_IDTBASE\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LDTBASE       EFI_MM_SAVE_STATE_REGISTER_LDTBASE\r
+#define EFI_SMM_SAVE_STATE_REGISTER_GDTLIMIT      EFI_MM_SAVE_STATE_REGISTER_GDTLIMIT\r
+#define EFI_SMM_SAVE_STATE_REGISTER_IDTLIMIT      EFI_MM_SAVE_STATE_REGISTER_IDTLIMIT\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LDTLIMIT      EFI_MM_SAVE_STATE_REGISTER_LDTLIMIT\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LDTINFO       EFI_MM_SAVE_STATE_REGISTER_LDTINFO\r
+#define EFI_SMM_SAVE_STATE_REGISTER_ES            EFI_MM_SAVE_STATE_REGISTER_ES\r
+#define EFI_SMM_SAVE_STATE_REGISTER_CS            EFI_MM_SAVE_STATE_REGISTER_CS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_SS            EFI_MM_SAVE_STATE_REGISTER_SS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_DS            EFI_MM_SAVE_STATE_REGISTER_DS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FS            EFI_MM_SAVE_STATE_REGISTER_FS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_GS            EFI_MM_SAVE_STATE_REGISTER_GS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LDTR_SEL      EFI_MM_SAVE_STATE_REGISTER_LDTR_SEL\r
+#define EFI_SMM_SAVE_STATE_REGISTER_TR_SEL        EFI_MM_SAVE_STATE_REGISTER_TR_SEL\r
+#define EFI_SMM_SAVE_STATE_REGISTER_DR7           EFI_MM_SAVE_STATE_REGISTER_DR7\r
+#define EFI_SMM_SAVE_STATE_REGISTER_DR6           EFI_MM_SAVE_STATE_REGISTER_DR6\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R8            EFI_MM_SAVE_STATE_REGISTER_R8\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R9            EFI_MM_SAVE_STATE_REGISTER_R9\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R10           EFI_MM_SAVE_STATE_REGISTER_R10\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R11           EFI_MM_SAVE_STATE_REGISTER_R11\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R12           EFI_MM_SAVE_STATE_REGISTER_R12\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R13           EFI_MM_SAVE_STATE_REGISTER_R13\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R14           EFI_MM_SAVE_STATE_REGISTER_R14\r
+#define EFI_SMM_SAVE_STATE_REGISTER_R15           EFI_MM_SAVE_STATE_REGISTER_R15\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RAX           EFI_MM_SAVE_STATE_REGISTER_RAX\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RBX           EFI_MM_SAVE_STATE_REGISTER_RBX\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RCX           EFI_MM_SAVE_STATE_REGISTER_RCX\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RDX           EFI_MM_SAVE_STATE_REGISTER_RDX\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RSP           EFI_MM_SAVE_STATE_REGISTER_RSP\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RBP           EFI_MM_SAVE_STATE_REGISTER_RBP\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RSI           EFI_MM_SAVE_STATE_REGISTER_RSI\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RDI           EFI_MM_SAVE_STATE_REGISTER_RDI\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RIP           EFI_MM_SAVE_STATE_REGISTER_RIP\r
+#define EFI_SMM_SAVE_STATE_REGISTER_RFLAGS        EFI_MM_SAVE_STATE_REGISTER_RFLAGS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_CR0           EFI_MM_SAVE_STATE_REGISTER_CR0\r
+#define EFI_SMM_SAVE_STATE_REGISTER_CR3           EFI_MM_SAVE_STATE_REGISTER_CR3\r
+#define EFI_SMM_SAVE_STATE_REGISTER_CR4           EFI_MM_SAVE_STATE_REGISTER_CR4\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FCW           EFI_MM_SAVE_STATE_REGISTER_FCW\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FSW           EFI_MM_SAVE_STATE_REGISTER_FSW\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FTW           EFI_MM_SAVE_STATE_REGISTER_FTW\r
+#define EFI_SMM_SAVE_STATE_REGISTER_OPCODE        EFI_MM_SAVE_STATE_REGISTER_OPCODE\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FP_EIP        EFI_MM_SAVE_STATE_REGISTER_FP_EIP\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FP_CS         EFI_MM_SAVE_STATE_REGISTER_FP_CS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_DATAOFFSET    EFI_MM_SAVE_STATE_REGISTER_DATAOFFSET\r
+#define EFI_SMM_SAVE_STATE_REGISTER_FP_DS         EFI_MM_SAVE_STATE_REGISTER_FP_DS\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM0           EFI_MM_SAVE_STATE_REGISTER_MM0\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM1           EFI_MM_SAVE_STATE_REGISTER_MM1\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM2           EFI_MM_SAVE_STATE_REGISTER_MM2\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM3           EFI_MM_SAVE_STATE_REGISTER_MM3\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM4           EFI_MM_SAVE_STATE_REGISTER_MM4\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM5           EFI_MM_SAVE_STATE_REGISTER_MM5\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM6           EFI_MM_SAVE_STATE_REGISTER_MM6\r
+#define EFI_SMM_SAVE_STATE_REGISTER_MM7           EFI_MM_SAVE_STATE_REGISTER_MM7\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM0          EFI_MM_SAVE_STATE_REGISTER_XMM0\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM1          EFI_MM_SAVE_STATE_REGISTER_XMM1\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM2          EFI_MM_SAVE_STATE_REGISTER_XMM2\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM3          EFI_MM_SAVE_STATE_REGISTER_XMM3\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM4          EFI_MM_SAVE_STATE_REGISTER_XMM4\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM5          EFI_MM_SAVE_STATE_REGISTER_XMM5\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM6          EFI_MM_SAVE_STATE_REGISTER_XMM6\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM7          EFI_MM_SAVE_STATE_REGISTER_XMM7\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM8          EFI_MM_SAVE_STATE_REGISTER_XMM8\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM9          EFI_MM_SAVE_STATE_REGISTER_XMM9\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM10         EFI_MM_SAVE_STATE_REGISTER_XMM10\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM11         EFI_MM_SAVE_STATE_REGISTER_XMM11\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM12         EFI_MM_SAVE_STATE_REGISTER_XMM12\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM13         EFI_MM_SAVE_STATE_REGISTER_XMM13\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM14         EFI_MM_SAVE_STATE_REGISTER_XMM14\r
+#define EFI_SMM_SAVE_STATE_REGISTER_XMM15         EFI_MM_SAVE_STATE_REGISTER_XMM15\r
+#define EFI_SMM_SAVE_STATE_REGISTER_IO            EFI_MM_SAVE_STATE_REGISTER_IO\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LMA           EFI_MM_SAVE_STATE_REGISTER_LMA\r
+#define EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID  EFI_MM_SAVE_STATE_REGISTER_PROCESSOR_ID\r
+\r
+typedef EFI_MM_SAVE_STATE_REGISTER  EFI_SMM_SAVE_STATE_REGISTER;\r
+\r
+\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT EFI_MM_SAVE_STATE_REGISTER_LMA_32BIT\r
+#define EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT EFI_MM_SAVE_STATE_REGISTER_LMA_64BIT\r
 \r
-///\r
-/// Save State register index\r
-///\r
-typedef enum {\r
-  ///\r
-  /// x86/X64 standard registers\r
-  ///\r
-  EFI_SMM_SAVE_STATE_REGISTER_GDTBASE       = 4,\r
-  EFI_SMM_SAVE_STATE_REGISTER_IDTBASE       = 5,\r
-  EFI_SMM_SAVE_STATE_REGISTER_LDTBASE       = 6,\r
-  EFI_SMM_SAVE_STATE_REGISTER_GDTLIMIT      = 7,\r
-  EFI_SMM_SAVE_STATE_REGISTER_IDTLIMIT      = 8,\r
-  EFI_SMM_SAVE_STATE_REGISTER_LDTLIMIT      = 9,\r
-  EFI_SMM_SAVE_STATE_REGISTER_LDTINFO       = 10,\r
-  EFI_SMM_SAVE_STATE_REGISTER_ES            = 20,\r
-  EFI_SMM_SAVE_STATE_REGISTER_CS            = 21,\r
-  EFI_SMM_SAVE_STATE_REGISTER_SS            = 22,\r
-  EFI_SMM_SAVE_STATE_REGISTER_DS            = 23,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FS            = 24,\r
-  EFI_SMM_SAVE_STATE_REGISTER_GS            = 25,\r
-  EFI_SMM_SAVE_STATE_REGISTER_LDTR_SEL      = 26,\r
-  EFI_SMM_SAVE_STATE_REGISTER_TR_SEL        = 27,\r
-  EFI_SMM_SAVE_STATE_REGISTER_DR7           = 28,\r
-  EFI_SMM_SAVE_STATE_REGISTER_DR6           = 29,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R8            = 30,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R9            = 31,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R10           = 32,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R11           = 33,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R12           = 34,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R13           = 35,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R14           = 36,\r
-  EFI_SMM_SAVE_STATE_REGISTER_R15           = 37,  \r
-  EFI_SMM_SAVE_STATE_REGISTER_RAX           = 38,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RBX           = 39,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RCX           = 40,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RDX           = 41,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RSP           = 42,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RBP           = 43,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RSI           = 44,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RDI           = 45,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RIP           = 46,\r
-  EFI_SMM_SAVE_STATE_REGISTER_RFLAGS        = 51,\r
-  EFI_SMM_SAVE_STATE_REGISTER_CR0           = 52,\r
-  EFI_SMM_SAVE_STATE_REGISTER_CR3           = 53,\r
-  EFI_SMM_SAVE_STATE_REGISTER_CR4           = 54,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FCW           = 256,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FSW           = 257,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FTW           = 258,  \r
-  EFI_SMM_SAVE_STATE_REGISTER_OPCODE        = 259,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FP_EIP        = 260,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FP_CS         = 261,\r
-  EFI_SMM_SAVE_STATE_REGISTER_DATAOFFSET    = 262,\r
-  EFI_SMM_SAVE_STATE_REGISTER_FP_DS         = 263,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM0           = 264,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM1           = 265,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM2           = 266,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM3           = 267,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM4           = 268,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM5           = 269,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM6           = 270,\r
-  EFI_SMM_SAVE_STATE_REGISTER_MM7           = 271,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM0          = 272,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM1          = 273,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM2          = 274,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM3          = 275,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM4          = 276,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM5          = 277,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM6          = 278,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM7          = 279,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM8          = 280,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM9          = 281,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM10         = 282,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM11         = 283,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM12         = 284,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM13         = 285,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM14         = 286,\r
-  EFI_SMM_SAVE_STATE_REGISTER_XMM15         = 287,  \r
-  ///\r
-  /// Pseudo-Registers\r
-  ///\r
-  EFI_SMM_SAVE_STATE_REGISTER_IO            = 512,\r
-  EFI_SMM_SAVE_STATE_REGISTER_LMA           = 513,\r
-  EFI_SMM_SAVE_STATE_REGISTER_PROCESSOR_ID  = 514\r
-} EFI_SMM_SAVE_STATE_REGISTER;  \r
-\r
-///\r
-/// The EFI_SMM_SAVE_STATE_REGISTER_LMA pseudo-register values\r
-/// If the processor acts in 32-bit mode at the time the SMI occurred, the pseudo register value \r
-/// EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT is returned in Buffer. Otherwise, \r
-/// EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT is returned in Buffer.\r
-///\r
-#define EFI_SMM_SAVE_STATE_REGISTER_LMA_32BIT  32\r
-#define EFI_SMM_SAVE_STATE_REGISTER_LMA_64BIT  64\r
 \r
 ///\r
 /// Size width of I/O instruction\r
 ///\r
-typedef enum {\r
-  EFI_SMM_SAVE_STATE_IO_WIDTH_UINT8      = 0,\r
-  EFI_SMM_SAVE_STATE_IO_WIDTH_UINT16     = 1,\r
-  EFI_SMM_SAVE_STATE_IO_WIDTH_UINT32     = 2,\r
-  EFI_SMM_SAVE_STATE_IO_WIDTH_UINT64     = 3\r
-} EFI_SMM_SAVE_STATE_IO_WIDTH;\r
+#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT8 EFI_MM_SAVE_STATE_IO_WIDTH_UINT8\r
+#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT16 EFI_MM_SAVE_STATE_IO_WIDTH_UINT16\r
+#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT32 EFI_MM_SAVE_STATE_IO_WIDTH_UINT32\r
+#define EFI_SMM_SAVE_STATE_IO_WIDTH_UINT64 EFI_MM_SAVE_STATE_IO_WIDTH_UINT64\r
+typedef EFI_MM_SAVE_STATE_IO_WIDTH EFI_SMM_SAVE_STATE_IO_WIDTH;\r
 \r
 ///\r
 /// Types of I/O instruction\r
 ///\r
-typedef enum {\r
-  EFI_SMM_SAVE_STATE_IO_TYPE_INPUT       = 1,\r
-  EFI_SMM_SAVE_STATE_IO_TYPE_OUTPUT      = 2,\r
-  EFI_SMM_SAVE_STATE_IO_TYPE_STRING      = 4,\r
-  EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX  = 8\r
-} EFI_SMM_SAVE_STATE_IO_TYPE;\r
+#define EFI_SMM_SAVE_STATE_IO_TYPE_INPUT EFI_MM_SAVE_STATE_IO_TYPE_INPUT\r
+#define EFI_SMM_SAVE_STATE_IO_TYPE_OUTPUT EFI_MM_SAVE_STATE_IO_TYPE_OUTPUT\r
+#define EFI_SMM_SAVE_STATE_IO_TYPE_STRING EFI_MM_SAVE_STATE_IO_TYPE_STRING\r
+#define EFI_SMM_SAVE_STATE_IO_TYPE_REP_PREFIX EFI_MM_SAVE_STATE_IO_TYPE_REP_PREFIX\r
+typedef  EFI_MM_SAVE_STATE_IO_TYPE EFI_SMM_SAVE_STATE_IO_TYPE;\r
 \r
-///\r
-/// Structure of the data which is returned when ReadSaveState() is called with \r
-/// EFI_SMM_SAVE_STATE_REGISTER_IO. If there was no I/O then ReadSaveState() will \r
-/// return EFI_NOT_FOUND.\r
-///\r
-/// This structure describes the I/O operation which was in process when the SMI was generated.\r
-///\r
-typedef struct _EFI_SMM_SAVE_STATE_IO_INFO {\r
-  ///\r
-  /// For input instruction (IN, INS), this is data read before the SMI occurred. For output \r
-  /// instructions (OUT, OUTS) this is data that was written before the SMI occurred. The \r
-  /// width of the data is specified by IoWidth.\r
-  ///\r
-  UINT64                        IoData;\r
-  ///\r
-  /// The I/O port that was being accessed when the SMI was triggered.\r
-  ///\r
-  UINT16                        IoPort;\r
-  ///\r
-  /// Defines the size width (UINT8, UINT16, UINT32, UINT64) for IoData.\r
-  ///\r
-  EFI_SMM_SAVE_STATE_IO_WIDTH   IoWidth;\r
-  ///\r
-  /// Defines type of I/O instruction.\r
-  ///\r
-  EFI_SMM_SAVE_STATE_IO_TYPE    IoType;\r
-} EFI_SMM_SAVE_STATE_IO_INFO;\r
-  \r
-typedef struct _EFI_SMM_CPU_PROTOCOL  EFI_SMM_CPU_PROTOCOL;\r
-\r
-/**\r
-  Read data from the CPU save state.\r
-\r
-  This function is used to read the specified number of bytes of the specified register from the CPU \r
-  save state of the specified CPU and place the value into the buffer. If the CPU does not support the\r
-  specified register Register, then EFI_NOT_FOUND  should be returned. If the CPU does not \r
-  support the specified register width Width, then EFI_INVALID_PARAMETER is returned.\r
-\r
-  @param[in]  This               The EFI_SMM_CPU_PROTOCOL instance.\r
-  @param[in]  Width              The number of bytes to read from the CPU save state.\r
-  @param[in]  Register           Specifies the CPU register to read form the save state.\r
-  @param[in]  CpuIndex           Specifies the zero-based index of the CPU save state.\r
-  @param[out] Buffer             Upon return, this holds the CPU register value read from the save state.\r
-    \r
-  @retval EFI_SUCCESS            The register was read from Save State.\r
-  @retval EFI_NOT_FOUND          The register is not defined for the Save State of Processor.\r
-  @retval EFI_INVALID_PARAMETER  Input parameters are not valid, for example, Processor No or register width \r
-                                 is not correct.This or Buffer is NULL.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_READ_SAVE_STATE)(\r
-  IN CONST EFI_SMM_CPU_PROTOCOL   *This,\r
-  IN UINTN                        Width,\r
-  IN EFI_SMM_SAVE_STATE_REGISTER  Register,\r
-  IN UINTN                        CpuIndex,\r
-  OUT VOID                        *Buffer\r
-  );\r
-\r
-\r
-/**\r
-  Write data to the CPU save state.\r
-\r
-  This function is used to write the specified number of bytes of the specified register to the CPU save \r
-  state of the specified CPU and place the value into the buffer. If the CPU does not support the \r
-  specified register Register, then EFI_UNSUPPORTED should be returned. If the CPU does not \r
-  support the specified register width Width, then EFI_INVALID_PARAMETER is returned.\r
-\r
-  @param[in]  This               The EFI_SMM_CPU_PROTOCOL instance.\r
-  @param[in]  Width              The number of bytes to write to the CPU save state.\r
-  @param[in]  Register           Specifies the CPU register to write to the save state.\r
-  @param[in]  CpuIndex           Specifies the zero-based index of the CPU save state.\r
-  @param[in]  Buffer             Upon entry, this holds the new CPU register value.\r
-  \r
-  @retval EFI_SUCCESS            The register was written to Save State.\r
-  @retval EFI_NOT_FOUND          The register is not defined for the Save State of Processor.\r
-  @retval EFI_INVALID_PARAMETER  Input parameters are not valid. For example: \r
-                                 ProcessorIndex or Width is not correct.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_WRITE_SAVE_STATE)(\r
-  IN CONST EFI_SMM_CPU_PROTOCOL   *This,\r
-  IN UINTN                        Width, \r
-  IN EFI_SMM_SAVE_STATE_REGISTER  Register,\r
-  IN UINTN                        CpuIndex,\r
-  IN CONST VOID                   *Buffer\r
-  );\r
+typedef  EFI_MM_SAVE_STATE_IO_INFO EFI_SMM_SAVE_STATE_IO_INFO;\r
 \r
-///\r
-/// EFI SMM CPU Protocol provides access to CPU-related information while in SMM.\r
-///\r
-/// This protocol allows SMM drivers to access architecture-standard registers from any of the CPU \r
-/// save state areas. In some cases, difference processors provide the same information in the save state, \r
-/// but not in the same format. These so-called pseudo-registers provide this information in a standard \r
-/// format.  \r
-///\r
-struct _EFI_SMM_CPU_PROTOCOL {\r
-  EFI_SMM_READ_SAVE_STATE   ReadSaveState;\r
-  EFI_SMM_WRITE_SAVE_STATE  WriteSaveState;\r
-};\r
+typedef  EFI_MM_CPU_PROTOCOL EFI_SMM_CPU_PROTOCOL;\r
+\r
+typedef EFI_MM_READ_SAVE_STATE EFI_SMM_READ_SAVE_STATE;\r
 \r
+typedef EFI_MM_WRITE_SAVE_STATE EFI_SMM_WRITE_SAVE_STATE;\r
 extern EFI_GUID gEfiSmmCpuProtocolGuid;\r
 \r
 #endif\r
index 9c00c80ea6fabdb2b87036e1c344f958f9b3ba17..704568dd2e0503c5ac90e23085d3307024545ac0 100644 (file)
@@ -3,7 +3,7 @@
 \r
   This protocol provides CPU I/O and memory access within SMM.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_CPU_IO2_H_\r
 #define _SMM_CPU_IO2_H_\r
 \r
-#define EFI_SMM_CPU_IO2_PROTOCOL_GUID \\r
-  { \\r
-    0x3242A9D8, 0xCE70, 0x4AA0, { 0x95, 0x5D, 0x5E, 0x7B, 0x14, 0x0D, 0xE4, 0xD2 } \\r
-  }\r
+#include <Protocol/MmCpuIo.h>\r
 \r
-typedef struct _EFI_SMM_CPU_IO2_PROTOCOL  EFI_SMM_CPU_IO2_PROTOCOL;\r
+#define EFI_SMM_CPU_IO2_PROTOCOL_GUID EFI_MM_CPU_IO_PROTOCOL_GUID\r
+\r
+typedef EFI_MM_CPU_IO_PROTOCOL  EFI_SMM_CPU_IO2_PROTOCOL;\r
 \r
 ///\r
 /// Width of the SMM CPU I/O operations\r
 ///\r
-typedef enum {\r
-  SMM_IO_UINT8  = 0,\r
-  SMM_IO_UINT16 = 1,\r
-  SMM_IO_UINT32 = 2,\r
-  SMM_IO_UINT64 = 3\r
-} EFI_SMM_IO_WIDTH;\r
-\r
-/**\r
-  Provides the basic memory and I/O interfaces used toabstract accesses to devices.\r
-\r
-  The I/O operations are carried out exactly as requested.  The caller is \r
-  responsible for any alignment and I/O width issues that the bus, device, \r
-  platform, or type of I/O might require.\r
-\r
-  @param[in]      This     The EFI_SMM_CPU_IO2_PROTOCOL instance.\r
-  @param[in]      Width    Signifies the width of the I/O operations.\r
-  @param[in]      Address  The base address of the I/O operations.  The caller is \r
-                           responsible for aligning the Address if required. \r
-  @param[in]      Count    The number of I/O operations to perform.\r
-  @param[in,out]  Buffer   For read operations, the destination buffer to store \r
-                           the results.  For write operations, the source buffer \r
-                           from which to write data.\r
+#define SMM_IO_UINT8  MM_IO_UINT8\r
+#define SMM_IO_UINT16 MM_IO_UINT16\r
+#define SMM_IO_UINT32 MM_IO_UINT32\r
+#define SMM_IO_UINT64 MM_IO_UINT64\r
 \r
-  @retval EFI_SUCCESS            The data was read from or written to the device.\r
-  @retval EFI_UNSUPPORTED        The Address is not valid for this system.\r
-  @retval EFI_INVALID_PARAMETER  Width or Count, or both, were invalid.\r
-  @retval EFI_OUT_OF_RESOURCES   The request could not be completed due to a lack\r
-                                 of resources.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_CPU_IO2)(\r
-  IN     CONST EFI_SMM_CPU_IO2_PROTOCOL  *This,\r
-  IN     EFI_SMM_IO_WIDTH                Width,\r
-  IN     UINT64                          Address,\r
-  IN     UINTN                           Count,\r
-  IN OUT VOID                            *Buffer\r
-  );\r
-\r
-typedef struct {\r
-  ///\r
-  /// This service provides the various modalities of memory and I/O read.\r
-  ///\r
-  EFI_SMM_CPU_IO2  Read;\r
-  ///\r
-  /// This service provides the various modalities of memory and I/O write.\r
-  ///\r
-  EFI_SMM_CPU_IO2  Write;\r
-} EFI_SMM_IO_ACCESS2;\r
+typedef EFI_MM_IO_WIDTH EFI_SMM_IO_WIDTH;\r
+typedef EFI_MM_CPU_IO EFI_SMM_CPU_IO2;\r
 \r
-///\r
-/// SMM CPU I/O Protocol provides CPU I/O and memory access within SMM.\r
-///\r
-struct _EFI_SMM_CPU_IO2_PROTOCOL {\r
-  ///\r
-  /// Allows reads and writes to memory-mapped I/O space.\r
-  ///\r
-  EFI_SMM_IO_ACCESS2 Mem;\r
-  ///\r
-  /// Allows reads and writes to I/O space.\r
-  ///\r
-  EFI_SMM_IO_ACCESS2 Io;\r
-};\r
+typedef EFI_MM_IO_ACCESS EFI_SMM_IO_ACCESS2;\r
 \r
 extern EFI_GUID gEfiSmmCpuIo2ProtocolGuid;\r
 \r
index e92ce4afbf51446c37a858107abe55e53463959a..ae34804a07843baef9b8805e1e1720734cf5b11e 100644 (file)
@@ -9,7 +9,7 @@
   This protocol prorogates End of DXE notification into SMM environment.\r
   This protocol is installed prior to installation of the SMM Ready to Lock Protocol.\r
 \r
-  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_END_OF_DXE_H_\r
 #define _SMM_END_OF_DXE_H_\r
 \r
-#define EFI_SMM_END_OF_DXE_PROTOCOL_GUID \\r
-  { \\r
-    0x24e70042, 0xd5c5, 0x4260, { 0x8c, 0x39, 0xa, 0xd3, 0xaa, 0x32, 0xe9, 0x3d } \\r
-  }\r
+#include <Protocol/MmEndOfDxe.h>\r
+\r
+#define EFI_SMM_END_OF_DXE_PROTOCOL_GUID EFI_MM_END_OF_DXE_PROTOCOL_GUID\r
 \r
 extern EFI_GUID gEfiSmmEndOfDxeProtocolGuid;\r
 \r
index 65be0ce7cf20bc7283de1230b6547c8647e9e885..bda3f98d5e5c09c89a03d018be62500d447025c6 100644 (file)
@@ -9,7 +9,7 @@
   given event types.  Several inputs can be enabled.  This purpose of this interface is to generate an \r
   SMI in response to any of these inputs having a true value provided.\r
 \r
-  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_GPI_DISPATCH2_H_\r
 #define _SMM_GPI_DISPATCH2_H_\r
 \r
+#include <Protocol/MmGpiDispatch.h>\r
 #include <Pi/PiSmmCis.h>\r
 \r
-#define EFI_SMM_GPI_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x25566b03, 0xb577, 0x4cbf, {0x95, 0x8c, 0xed, 0x66, 0x3e, 0xa2, 0x43, 0x80 } \\r
-  }\r
-\r
+#define EFI_SMM_GPI_DISPATCH2_PROTOCOL_GUID    EFI_MM_GPI_DISPATCH_PROTOCOL_GUID\r
 ///\r
 /// The dispatch function's context.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// A number from one of 2^64 possible GPIs that can generate an SMI. A\r
-  /// 0 corresponds to logical GPI[0]; 1 corresponds to logical GPI[1]; and\r
-  /// GpiNum of N corresponds to GPI[N], where N can span from 0 to 2^64-1.\r
-  ///\r
-  UINT64 GpiNum;\r
-} EFI_SMM_GPI_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_GPI_DISPATCH2_PROTOCOL EFI_SMM_GPI_DISPATCH2_PROTOCOL;\r
-\r
-/**\r
-  Registers a child SMI source dispatch function with a parent SMM driver.\r
-\r
-  This service registers a function (DispatchFunction) which will be called when an SMI is \r
-  generated because of one or more of the GPIs specified by RegisterContext. On return, \r
-  DispatchHandle contains a unique handle which may be used later to unregister the function \r
-  using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer pointing to another instance of \r
-  EFI_SMM_GPI_REGISTER_CONTEXT describing the GPIs which actually caused the SMI and \r
-  CommBufferSize pointing to the size of the structure.\r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_GPI_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when the specified GPI causes an SMI.\r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context.\r
-                                 The caller fills this context in before calling\r
-                                 the register function to indicate to the register\r
-                                 function the GPI(s) for which the dispatch function\r
-                                 should be invoked.\r
-  @param[out] DispatchHandle     Handle generated by the dispatcher to track the\r
-                                 function instance.\r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. The GPI input value\r
-                                 is not within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_GPI_REGISTER2)(\r
-  IN CONST EFI_SMM_GPI_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_SMM_HANDLER_ENTRY_POINT2    DispatchFunction,\r
-  IN CONST EFI_SMM_GPI_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT      EFI_HANDLE                      *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregisters a General Purpose Input (GPI) service.\r
-\r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called when the GPI triggers an SMI. \r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_GPI_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchHandle     Handle of the service to remove.\r
-\r
-  @retval EFI_SUCCESS            Handle of the service to remove.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_GPI_UNREGISTER2)(\r
-  IN CONST EFI_SMM_GPI_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                      DispatchHandle\r
-  );\r
+typedef EFI_MM_GPI_REGISTER_CONTEXT  EFI_SMM_GPI_REGISTER_CONTEXT;\r
+\r
+typedef EFI_MM_GPI_REGISTER EFI_SMM_GPI_REGISTER2;\r
+\r
+typedef EFI_MM_GPI_UNREGISTER EFI_SMM_GPI_UNREGISTER2;\r
+\r
+typedef EFI_MM_GPI_DISPATCH_PROTOCOL EFI_SMM_GPI_DISPATCH2_PROTOCOL;\r
+\r
 \r
-///\r
-/// Interface structure for the SMM GPI SMI Dispatch Protocol\r
-///\r
-/// The SMM GPI SMI Dispatch Protocol provides the parent dispatch service\r
-/// for the General Purpose Input (GPI) SMI source generator.\r
-///\r
-struct _EFI_SMM_GPI_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_GPI_REGISTER2    Register;\r
-  EFI_SMM_GPI_UNREGISTER2  UnRegister;\r
-  ///\r
-  /// Denotes the maximum value of inputs that can have handlers attached.\r
-  ///\r
-  UINTN                   NumSupportedGpis;\r
-};\r
 \r
 extern EFI_GUID gEfiSmmGpiDispatch2ProtocolGuid;\r
 \r
index 187d48bc74d9f3b13a67d88f00e503185d360c56..b37c9e10d57ea3070f15078dc0c7356175a59b07 100644 (file)
@@ -4,7 +4,7 @@
 \r
   This protocol provides a parent dispatch service for IO trap SMI sources.\r
 \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_IO_TRAP_DISPATCH2_H_\r
 #define _SMM_IO_TRAP_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmIoTrapDispatch.h>\r
 \r
-#define EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x58dc368d, 0x7bfa, 0x4e77, {0xab, 0xbc, 0xe, 0x29, 0x41, 0x8d, 0xf9, 0x30 } \\r
-  }\r
+#define EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL_GUID  EFI_MM_IO_TRAP_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// IO Trap valid types\r
 ///\r
-typedef enum {\r
-  WriteTrap,\r
-  ReadTrap,\r
-  ReadWriteTrap,\r
-  IoTrapTypeMaximum\r
-} EFI_SMM_IO_TRAP_DISPATCH_TYPE;\r
+typedef EFI_MM_IO_TRAP_DISPATCH_TYPE EFI_SMM_IO_TRAP_DISPATCH_TYPE;\r
 \r
 ///\r
 /// IO Trap context structure containing information about the\r
 /// IO trap event that should invoke the handler\r
 ///\r
-typedef struct {\r
-  UINT16                         Address;\r
-  UINT16                         Length;\r
-  EFI_SMM_IO_TRAP_DISPATCH_TYPE  Type;\r
-} EFI_SMM_IO_TRAP_REGISTER_CONTEXT;\r
+typedef EFI_MM_IO_TRAP_REGISTER_CONTEXT EFI_SMM_IO_TRAP_REGISTER_CONTEXT;\r
 \r
 ///\r
 /// IO Trap context structure containing information about the IO trap that occurred\r
 ///\r
-typedef struct {\r
-  UINT32  WriteData;\r
-} EFI_SMM_IO_TRAP_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL;\r
-\r
-/**\r
-  Register an IO trap SMI child handler for a specified SMI.\r
-\r
-  This service registers a function (DispatchFunction) which will be called when an SMI is \r
-  generated because of an access to an I/O port specified by RegisterContext. On return, \r
-  DispatchHandle contains a unique handle which may be used later to unregister the function \r
-  using UnRegister(). If the base of the I/O range specified is zero, then an I/O range with the \r
-  specified length and characteristics will be allocated and the Address field in RegisterContext \r
-  updated. If no range could be allocated, then EFI_OUT_OF_RESOURCES will be returned. \r
-\r
-  The service will not perform GCD allocation if the base address is non-zero or \r
-  EFI_SMM_READY_TO_LOCK has been installed.  In this case, the caller is responsible for the \r
-  existence and allocation of the specific IO range.\r
-  An error may be returned if some or all of the requested resources conflict with an existing IO trap \r
-  child handler.\r
-\r
-  It is not required that implementations will allow multiple children for a single IO trap SMI source.  \r
-  Some implementations may support multiple children.\r
-  The DispatchFunction will be called with Context updated to contain information \r
-  concerning the I/O action that actually happened and is passed in RegisterContext, with \r
-  CommBuffer pointing to the data actually written and CommBufferSize pointing to the size of \r
-  the data in CommBuffer.\r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when I/O trap location is accessed.\r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context.  The caller fills this\r
-                                 context in before calling the register function to indicate to the register\r
-                                 function the IO trap SMI source for which the dispatch function should be invoked.\r
-  @param[out] DispatchHandle     Handle of the dispatch function, for when interfacing with the parent SMM driver.\r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully registered.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to complete due to hardware error.\r
-  @retval EFI_OUT_OF_RESOURCES   Insufficient resources are available to fulfill the IO trap range request.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid.  The input value is not within a valid range.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_IO_TRAP_DISPATCH2_REGISTER)(\r
-  IN CONST EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_SMM_HANDLER_ENTRY_POINT2        DispatchFunction,\r
-  IN OUT   EFI_SMM_IO_TRAP_REGISTER_CONTEXT    *RegisterContext,\r
-     OUT   EFI_HANDLE                          *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregister a child SMI source dispatch function with a parent SMM driver.\r
-\r
-  This service removes a previously installed child dispatch handler. This does not guarantee that the \r
-  system resources will be freed from the GCD.\r
-\r
-  @param[in] This                Pointer to the EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL instance. \r
-  @param[in] DispatchHandle      Handle of the child service to remove.\r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully unregistered.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_IO_TRAP_DISPATCH2_UNREGISTER)(\r
-  IN CONST EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                          DispatchHandle\r
-  );\r
+typedef EFI_MM_IO_TRAP_CONTEXT EFI_SMM_IO_TRAP_CONTEXT;\r
 \r
-///\r
-/// Interface structure for the SMM IO Trap Dispatch2 Protocol.\r
-///\r
-/// This protocol provides a parent dispatch service for IO trap SMI sources.\r
-///\r
-struct _EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_IO_TRAP_DISPATCH2_REGISTER    Register;\r
-  EFI_SMM_IO_TRAP_DISPATCH2_UNREGISTER  UnRegister;\r
-};\r
+typedef EFI_MM_IO_TRAP_DISPATCH_PROTOCOL EFI_SMM_IO_TRAP_DISPATCH2_PROTOCOL;\r
+\r
+typedef EFI_MM_IO_TRAP_DISPATCH_REGISTER   EFI_SMM_IO_TRAP_DISPATCH2_REGISTER;\r
+\r
+typedef EFI_MM_IO_TRAP_DISPATCH_UNREGISTER EFI_SMM_IO_TRAP_DISPATCH2_UNREGISTER;\r
 \r
 extern EFI_GUID gEfiSmmIoTrapDispatch2ProtocolGuid;\r
 \r
index 2c538f4229460e951abc52127be7698fd0878c27..0f23875f010e339c38284654ea1c818f162ed7e8 100644 (file)
@@ -3,7 +3,7 @@
 \r
   This protocol provides PCI I/O and memory access within SMM.\r
 \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_PCI_ROOT_BRIDGE_IO_H_\r
 #define _SMM_PCI_ROOT_BRIDGE_IO_H_\r
 \r
-#include <Protocol/PciRootBridgeIo.h>\r
+#include <Protocol/MmPciRootBridgeIo.h>\r
 \r
-#define EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \\r
-  { \\r
-    0x8bc1714d, 0xffcb, 0x41c3, { 0x89, 0xdc, 0x6c, 0x74, 0xd0, 0x6d, 0x98, 0xea } \\r
-  }\r
+#define EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID\r
 \r
 ///\r
 /// This protocol provides the same functionality as the PCI Root Bridge I/O Protocol defined in the \r
 /// UEFI 2.1 Specifcation, section 13.2, except that the functions for Map() and Unmap() may return \r
 /// EFI_UNSUPPORTED.\r
 ///\r
-typedef EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL  EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL;\r
+typedef EFI_MM_PCI_ROOT_BRIDGE_IO_PROTOCOL  EFI_SMM_PCI_ROOT_BRIDGE_IO_PROTOCOL;\r
 \r
 extern EFI_GUID gEfiSmmPciRootBridgeIoProtocolGuid;\r
 \r
index 06825408cc3413140a31b41559a96f3b7e9a6938..078a91b4c083b84f69e95858832b2ead9f72e920 100644 (file)
@@ -4,7 +4,7 @@
 \r
   This protocol provides the parent dispatch service for the periodical timer SMI source generator.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #define _SMM_PERIODIC_TIMER_DISPATCH2_H_\r
 \r
 #include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmPeriodicTimerDispatch.h>\r
 \r
-#define EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x4cec368e, 0x8e8e, 0x4d71, {0x8b, 0xe1, 0x95, 0x8c, 0x45, 0xfc, 0x8a, 0x53 } \\r
-  }\r
+#define EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL_GUID EFI_MM_PERIODIC_TIMER_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// Example: A chipset supports periodic SMIs on every 64ms or 2 seconds.\r
@@ -66,13 +64,7 @@ typedef struct {
 /// Register() in RegisterContext and with CommBuffer pointing to an instance of \r
 /// EFI_SMM_PERIODIC_TIMER_CONTEXT and CommBufferSize pointing to its size.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// ElapsedTime is the actual time in 100 nanosecond units elapsed since last called, a\r
-  /// value of 0 indicates an unknown amount of time.\r
-  ///\r
-  UINT64  ElapsedTime;\r
-} EFI_SMM_PERIODIC_TIMER_CONTEXT;\r
+typedef EFI_MM_PERIODIC_TIMER_CONTEXT EFI_SMM_PERIODIC_TIMER_CONTEXT;\r
 \r
 typedef struct _EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL  EFI_SMM_PERIODIC_TIMER_DISPATCH2_PROTOCOL;\r
 \r
index ef4626a693c026e4f0c663c3aea5a4aa922d42c5..fa844cbe6dd43c789a9c239444745b7ec8b1f3bf 100644 (file)
@@ -4,7 +4,7 @@
 \r
   This protocol provides the parent dispatch service for the power button SMI source generator.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_POWER_BUTTON_DISPATCH2_H_\r
 #define _SMM_POWER_BUTTON_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmPowerButtonDispatch.h>\r
 \r
-#define EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x1b1183fa, 0x1823, 0x46a7, {0x88, 0x72, 0x9c, 0x57, 0x87, 0x55, 0x40, 0x9d } \\r
-  }\r
-\r
-///\r
-/// Power Button phases.\r
-///\r
-typedef enum {\r
-  EfiPowerButtonEntry,\r
-  EfiPowerButtonExit,\r
-  EfiPowerButtonMax\r
-} EFI_POWER_BUTTON_PHASE;\r
+#define EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// The dispatch function's context.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// Designates whether this handler should be invoked upon entry or exit.\r
-  ///\r
-  EFI_POWER_BUTTON_PHASE  Phase;\r
-} EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL;\r
+typedef EFI_MM_POWER_BUTTON_REGISTER_CONTEXT EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT;\r
 \r
-/**\r
-  Provides the parent dispatch service for a power button event.\r
-\r
-  This service registers a function (DispatchFunction) which will be called when an SMI is \r
-  generated because the power button was pressed or released, as specified by RegisterContext. \r
-  On return, DispatchHandle contains a unique handle which may be used later to unregister the \r
-  function using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer and CommBufferSize set to NULL.\r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when power button is pressed or released.\r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context. The caller fills in this context\r
-                                 before calling the Register() function to indicate to the Register() function\r
-                                 the power button SMI phase for which the dispatch function should be invoked.\r
-  @param[out] DispatchHandle     Handle generated by the dispatcher to track the function instance. \r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. The power button input value\r
-                                 is not within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_POWER_BUTTON_REGISTER2)(\r
-  IN CONST EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_SMM_HANDLER_ENTRY_POINT2             DispatchFunction,\r
-  IN       EFI_SMM_POWER_BUTTON_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT      EFI_HANDLE                               *DispatchHandle\r
-  );\r
+typedef EFI_MM_POWER_BUTTON_DISPATCH_PROTOCOL EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL;\r
 \r
-/**\r
-  Unregisters a power-button service.\r
+typedef EFI_MM_POWER_BUTTON_REGISTER EFI_SMM_POWER_BUTTON_REGISTER2;\r
 \r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called when the standby button is pressed or released. \r
-\r
-  @param[in] This                Pointer to the EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in] DispatchHandle      Handle of the service to remove.\r
-\r
-  @retval EFI_SUCCESS            The service has been successfully removed.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_POWER_BUTTON_UNREGISTER2)(\r
-  IN CONST EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                               DispatchHandle\r
-  );\r
-\r
-///\r
-/// Interface structure for the SMM Power Button Dispatch2 Protocol.\r
-///\r
-/// This protocol provides the parent dispatch service for the power button SMI source generator.\r
-///\r
-struct _EFI_SMM_POWER_BUTTON_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_POWER_BUTTON_REGISTER2    Register;\r
-  EFI_SMM_POWER_BUTTON_UNREGISTER2  UnRegister;\r
-};\r
+typedef EFI_MM_POWER_BUTTON_UNREGISTER EFI_SMM_POWER_BUTTON_UNREGISTER2;\r
 \r
 extern EFI_GUID gEfiSmmPowerButtonDispatch2ProtocolGuid;\r
 \r
index edf171923a386cbe29c79719a329e1f84eac8c38..eb8b7a4d38275f10d6f4c3d35a55c99e6d2685af 100644 (file)
 #ifndef _SMM_READY_TO_LOCK_H_\r
 #define _SMM_READY_TO_LOCK_H_\r
 \r
-#define EFI_SMM_READY_TO_LOCK_PROTOCOL_GUID \\r
-  { \\r
-    0x47b7fa8c, 0xf4bd, 0x4af6, { 0x82, 0x00, 0x33, 0x30, 0x86, 0xf0, 0xd2, 0xc8 } \\r
-  }\r
+#include <Protocol/MmReadyToLock.h>\r
+\r
+#define EFI_SMM_READY_TO_LOCK_PROTOCOL_GUID EFI_MM_READY_TO_LOCK_PROTOCOL_GUID\r
 \r
 extern EFI_GUID gEfiSmmReadyToLockProtocolGuid;\r
 \r
index 862142d10460ad20a6ef06b9041d694db97f503d..8cddfac7f82b9b22fcd8769af980c8c667aa9778 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   This protocol provides registering and unregistering services to status code consumers while in DXE SMM.\r
   \r
-  Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
 #define __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__\r
 \r
-#define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID \\r
-  { \\r
-    0x2ff29fa7, 0x5e80, 0x4ed9, {0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55, 0x4f, 0xf4} \\r
-  }\r
+#include <Protocol/MmReportStatusCodeHandler.h>\r
 \r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_RSC_HANDLER_CALLBACK)(\r
-  IN EFI_STATUS_CODE_TYPE   CodeType,\r
-  IN EFI_STATUS_CODE_VALUE  Value,\r
-  IN UINT32                 Instance,\r
-  IN EFI_GUID               *CallerId,\r
-  IN EFI_STATUS_CODE_DATA   *Data\r
-);\r
+#define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID EFI_MM_RSC_HANDLER_PROTOCOL_GUID\r
 \r
-/**\r
-  Register the callback function for ReportStatusCode() notification.\r
-  \r
-  When this function is called the function pointer is added to an internal list and any future calls to\r
-  ReportStatusCode() will be forwarded to the Callback function.\r
-  \r
-  @param[in] Callback               A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when\r
-                                    a call to ReportStatusCode() occurs.\r
-\r
-  @retval EFI_SUCCESS               Function was successfully registered.\r
-  @retval EFI_INVALID_PARAMETER     The callback function was NULL.\r
-  @retval EFI_OUT_OF_RESOURCES      The internal buffer ran out of space. No more functions can be\r
-                                    registered.\r
-  @retval EFI_ALREADY_STARTED       The function was already registered. It can't be registered again.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_RSC_HANDLER_REGISTER)(\r
-  IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
-);\r
+typedef EFI_MM_RSC_HANDLER_CALLBACK EFI_SMM_RSC_HANDLER_CALLBACK;\r
 \r
-/**\r
-  Remove a previously registered callback function from the notification list.\r
-  \r
-  A callback function must be unregistered before it is deallocated. It is important that any registered\r
-  callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.\r
+typedef EFI_MM_RSC_HANDLER_REGISTER EFI_SMM_RSC_HANDLER_REGISTER;\r
 \r
-  @param[in] Callback           A pointer to a function of type EFI_SMM_RSC_HANDLER_CALLBACK that is to be\r
-                                unregistered.\r
-                        \r
-  @retval EFI_SUCCESS           The function was successfully unregistered.\r
-  @retval EFI_INVALID_PARAMETER The callback function was NULL.\r
-  @retval EFI_NOT_FOUND         The callback function was not found to be unregistered.\r
-                            \r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_RSC_HANDLER_UNREGISTER)(\r
-  IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
-);\r
+typedef EFI_MM_RSC_HANDLER_UNREGISTER EFI_SMM_RSC_HANDLER_UNREGISTER;\r
 \r
-typedef struct _EFI_SMM_RSC_HANDLER_PROTOCOL {\r
-  EFI_SMM_RSC_HANDLER_REGISTER      Register;\r
-  EFI_SMM_RSC_HANDLER_UNREGISTER    Unregister;\r
-} EFI_SMM_RSC_HANDLER_PROTOCOL;\r
+typedef EFI_MM_RSC_HANDLER_PROTOCOL EFI_SMM_RSC_HANDLER_PROTOCOL;\r
 \r
 extern EFI_GUID gEfiSmmRscHandlerProtocolGuid;\r
 \r
index 104e2a299e9f7727576b21f2e4bdb5c0a2bda67f..f4385eff273829b9f482aaf597a2a641ced2795f 100644 (file)
 #ifndef _SMM_STANDBY_BUTTON_DISPATCH2_H_\r
 #define _SMM_STANDBY_BUTTON_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmStandbyButtonDispatch.h>\r
 \r
-#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x7300c4a1, 0x43f2, 0x4017, {0xa5, 0x1b, 0xc8, 0x1a, 0x7f, 0x40, 0x58, 0x5b } \\r
-  }\r
-\r
-///\r
-/// Standby Button phases\r
-///\r
-typedef enum {\r
-  EfiStandbyButtonEntry,\r
-  EfiStandbyButtonExit,\r
-  EfiStandbyButtonMax\r
-} EFI_STANDBY_BUTTON_PHASE;\r
+#define EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL_GUID EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// The dispatch function's context.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// Describes whether the child handler should be invoked upon the entry to the button \r
-  /// activation or upon exit.\r
-  ///\r
-  EFI_STANDBY_BUTTON_PHASE  Phase;\r
-} EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL;\r
+typedef EFI_MM_STANDBY_BUTTON_REGISTER_CONTEXT EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT;\r
 \r
-/**\r
-  Provides the parent dispatch service for a standby button event.\r
-\r
-  This service registers a function (DispatchFunction) which will be called when an SMI is \r
-  generated because the standby button was pressed or released, as specified by \r
-  RegisterContext. On return, DispatchHandle contains a unique handle which may be used \r
-  later to unregister the function using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer and CommBufferSize set to NULL. \r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when the standby button is pressed or released.\r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context. The caller fills in this context\r
-                                 before calling the register function to indicate to the register function the \r
-                                 standby button SMI source for which the dispatch function should be invoked.\r
-  @param[out] DispatchHandle     Handle generated by the dispatcher to track the function instance. \r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. The standby button input value\r
-                                 is not within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STANDBY_BUTTON_REGISTER2)(\r
-  IN CONST EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_SMM_HANDLER_ENTRY_POINT2               DispatchFunction,\r
-  IN       EFI_SMM_STANDBY_BUTTON_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT      EFI_HANDLE                                 *DispatchHandle\r
-  );\r
+typedef EFI_MM_STANDBY_BUTTON_DISPATCH_PROTOCOL EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL;\r
 \r
-/**\r
-  Unregisters a child SMI source dispatch function with a parent SMM driver.\r
+typedef EFI_MM_STANDBY_BUTTON_REGISTER EFI_SMM_STANDBY_BUTTON_REGISTER2;\r
 \r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called when the standby button is pressed or released.\r
-\r
-  @param[in] This                Pointer to the EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL instance.\r
-  @param[in] DispatchHandle      Handle of the service to remove.\r
-\r
-  @retval EFI_SUCCESS            The service has been successfully removed.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_STANDBY_BUTTON_UNREGISTER2)(\r
-  IN CONST EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                                 DispatchHandle\r
-  );\r
-\r
-///\r
-/// Interface structure for the SMM Standby Button Dispatch2 Protocol.\r
-///\r
-/// This protocol provides the parent dispatch service for the standby\r
-/// button SMI source generator.\r
-///\r
-struct _EFI_SMM_STANDBY_BUTTON_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_STANDBY_BUTTON_REGISTER2    Register;\r
-  EFI_SMM_STANDBY_BUTTON_UNREGISTER2  UnRegister;\r
-};\r
+typedef EFI_MM_STANDBY_BUTTON_UNREGISTER EFI_SMM_STANDBY_BUTTON_UNREGISTER2;\r
 \r
 extern EFI_GUID gEfiSmmStandbyButtonDispatch2ProtocolGuid;\r
 \r
index a0e71efbbf4ae14a7949ad0d4c9c18a42b4e1ae0..0c03e8d01a3124a5d6cb70bfac96f4177a22603d 100644 (file)
 #ifndef _SMM_STATUS_CODE_H__\r
 #define _SMM_STATUS_CODE_H__\r
 \r
+#include <Protocol/MmStatusCode.h>\r
 \r
-#define EFI_SMM_STATUS_CODE_PROTOCOL_GUID \\r
-  { \\r
-    0x6afd2b77, 0x98c1, 0x4acd, {0xa6, 0xf9, 0x8a, 0x94, 0x39, 0xde, 0xf, 0xb1} \\r
-  }\r
+#define EFI_SMM_STATUS_CODE_PROTOCOL_GUID EFI_MM_STATUS_CODE_PROTOCOL_GUID\r
 \r
-typedef struct _EFI_SMM_STATUS_CODE_PROTOCOL  EFI_SMM_STATUS_CODE_PROTOCOL;\r
+typedef EFI_MM_STATUS_CODE_PROTOCOL  EFI_SMM_STATUS_CODE_PROTOCOL;\r
 \r
-/**\r
-  Service to emit the status code in SMM.    \r
-\r
-  The EFI_SMM_STATUS_CODE_PROTOCOL.ReportStatusCode() function enables a driver \r
-  to emit a status code while in SMM.  The reason that there is a separate protocol definition from the \r
-  DXE variant of this service is that the publisher of this protocol will provide a service that is \r
-  capability of coexisting with a foreground operational environment, such as an operating system \r
-  after the termination of boot services.  \r
-\r
-  @param[in] This                Points to this instance of the EFI_SMM_STATUS_CODE_PROTOCOL.\r
-  @param[in] CodeType            DIndicates the type of status code being reported. \r
-  @param[in] Value               Describes the current status of a hardware or software entity. \r
-  @param[in] Instance            The enumeration of a hardware or software entity within the system.\r
-  @param[in] CallerId            This optional parameter may be used to identify the caller.\r
-  @param[in] Data                This optional parameter may be used to pass additional data.\r
-\r
-  @retval EFI_SUCCESS            The function completed successfully.\r
-  @retval EFI_INVALID_PARAMETER  The function should not be completed due to a device error.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_REPORT_STATUS_CODE)(\r
-  IN CONST EFI_SMM_STATUS_CODE_PROTOCOL  *This,\r
-  IN EFI_STATUS_CODE_TYPE                CodeType,\r
-  IN EFI_STATUS_CODE_VALUE               Value,\r
-  IN UINT32                              Instance,\r
-  IN CONST EFI_GUID                      *CallerId,\r
-  IN EFI_STATUS_CODE_DATA                *Data OPTIONAL\r
-  );\r
-\r
-struct _EFI_SMM_STATUS_CODE_PROTOCOL {\r
-  EFI_SMM_REPORT_STATUS_CODE  ReportStatusCode;\r
-};\r
+typedef EFI_MM_REPORT_STATUS_CODE EFI_SMM_REPORT_STATUS_CODE;\r
 \r
 extern EFI_GUID gEfiSmmStatusCodeProtocolGuid;\r
 \r
index 161493755568b77fa5157c991e9bc2f9ce87be7c..b49ef96e481ec25006e07ccbbdc7d7124d3d527f 100644 (file)
@@ -4,7 +4,7 @@
 \r
   This protocol provides the parent dispatch service for a given SMI source generator.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_SW_DISPATCH2_H_\r
 #define _SMM_SW_DISPATCH2_H_\r
 \r
+#include <Protocol/MmSwDispatch.h>\r
 #include <Pi/PiSmmCis.h>\r
 \r
-#define EFI_SMM_SW_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x18a3c6dc, 0x5eea, 0x48c8, {0xa1, 0xc1, 0xb5, 0x33, 0x89, 0xf9, 0x89, 0x99 } \\r
-  }\r
+#define EFI_SMM_SW_DISPATCH2_PROTOCOL_GUID EFI_MM_SW_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// A particular chipset may not support all possible software SMI input values.\r
index 37effda44d7304ab0f370688efea6a380fe9e828..1565eea65dd3e6da06dc41231b19a711766c6322 100644 (file)
@@ -4,7 +4,7 @@
 \r
   Provides the parent dispatch service for a given Sx-state source generator.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_SX_DISPATCH2_H_\r
 #define _SMM_SX_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmSxDispatch.h>\r
 \r
-#define EFI_SMM_SX_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0x456d2859, 0xa84b, 0x4e47, {0xa2, 0xee, 0x32, 0x76, 0xd8, 0x86, 0x99, 0x7d } \\r
-  }\r
-\r
-///\r
-/// Sleep states S0-S5\r
-///\r
-typedef enum {\r
-  SxS0,\r
-  SxS1,\r
-  SxS2,\r
-  SxS3,\r
-  SxS4,\r
-  SxS5,\r
-  EfiMaximumSleepType\r
-} EFI_SLEEP_TYPE;\r
-\r
-///\r
-/// Sleep state phase: entry or exit\r
-///\r
-typedef enum {\r
-  SxEntry,\r
-  SxExit,\r
-  EfiMaximumPhase\r
-} EFI_SLEEP_PHASE;\r
+#define EFI_SMM_SX_DISPATCH2_PROTOCOL_GUID EFI_MM_SX_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// The dispatch function's context\r
 ///\r
-typedef struct {\r
-  EFI_SLEEP_TYPE  Type;\r
-  EFI_SLEEP_PHASE Phase;\r
-} EFI_SMM_SX_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_SX_DISPATCH2_PROTOCOL  EFI_SMM_SX_DISPATCH2_PROTOCOL;\r
-\r
-/**\r
-  Provides the parent dispatch service for a given Sx source generator.\r
-\r
-  This service registers a function (DispatchFunction) which will be called when the sleep state \r
-  event specified by RegisterContext is detected. On return, DispatchHandle contains a \r
-  unique handle which may be used later to unregister the function using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer and CommBufferSize set to \r
-  NULL and 0 respectively.\r
+typedef EFI_MM_SX_REGISTER_CONTEXT EFI_SMM_SX_REGISTER_CONTEXT;\r
 \r
-  @param[in] This                Pointer to the EFI_SMM_SX_DISPATCH2_PROTOCOL instance.\r
-  @param[in] DispatchFunction    Function to register for handler when the specified sleep state event occurs.\r
-  @param[in] RegisterContext     Pointer to the dispatch function's context.\r
-                                 The caller fills this context in before calling\r
-                                 the register function to indicate to the register\r
-                                 function which Sx state type and phase the caller\r
-                                 wishes to be called back on. For this intertace,\r
-                                 the Sx driver will call the registered handlers for\r
-                                 all Sx type and phases, so the Sx state handler(s)\r
-                                 must check the Type and Phase field of the Dispatch\r
-                                 context and act accordingly.\r
-  @param[out]  DispatchHandle    Handle of dispatch function, for when interfacing\r
-                                 with the parent Sx state SMM driver.\r
+typedef EFI_MM_SX_DISPATCH_PROTOCOL  EFI_SMM_SX_DISPATCH2_PROTOCOL;\r
 \r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_UNSUPPORTED        The Sx driver or hardware does not support that\r
-                                 Sx Type/Phase.\r
-  @retval EFI_DEVICE_ERROR       The Sx driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. Type & Phase are not\r
-                                 within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this\r
-                                 child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_SX_REGISTER2)(\r
-  IN  CONST EFI_SMM_SX_DISPATCH2_PROTOCOL  *This,\r
-  IN        EFI_SMM_HANDLER_ENTRY_POINT2   DispatchFunction,\r
-  IN  CONST EFI_SMM_SX_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT       EFI_HANDLE                     *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregisters an Sx-state service.\r
-\r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called in response to sleep event.\r
+typedef EFI_MM_SX_REGISTER EFI_SMM_SX_REGISTER2;\r
 \r
-  @param[in] This                Pointer to the EFI_SMM_SX_DISPATCH2_PROTOCOL instance.\r
-  @param[in] DispatchHandle      Handle of the service to remove. \r
-\r
-  @retval EFI_SUCCESS            The service has been successfully removed.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_SX_UNREGISTER2)(\r
-  IN CONST EFI_SMM_SX_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                     DispatchHandle\r
-  );\r
-\r
-///\r
-/// Interface structure for the SMM Sx Dispatch Protocol\r
-///\r
-/// The EFI_SMM_SX_DISPATCH2_PROTOCOL provides the ability to install child handlers to \r
-/// respond to sleep state related events.\r
-///\r
-struct _EFI_SMM_SX_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_SX_REGISTER2    Register;\r
-  EFI_SMM_SX_UNREGISTER2  UnRegister;\r
-};\r
+typedef EFI_MM_SX_UNREGISTER EFI_SMM_SX_UNREGISTER2;\r
 \r
 extern EFI_GUID gEfiSmmSxDispatch2ProtocolGuid;\r
 \r
index fc2ef511aa61c20e9099274663dd14bf03517385..69289c186de5adb6cc0bf9646852366a5d3590fd 100644 (file)
@@ -4,7 +4,7 @@
 \r
   Provides the parent dispatch service for the USB SMI source generator.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 #ifndef _SMM_USB_DISPATCH2_H_\r
 #define _SMM_USB_DISPATCH2_H_\r
 \r
-#include <Pi/PiSmmCis.h>\r
+#include <Protocol/MmUsbDispatch.h>\r
 \r
-#define EFI_SMM_USB_DISPATCH2_PROTOCOL_GUID \\r
-  { \\r
-    0xee9b8d90, 0xc5a6, 0x40a2, {0xbd, 0xe2, 0x52, 0x55, 0x8d, 0x33, 0xcc, 0xa1 } \\r
-  }\r
+#define EFI_SMM_USB_DISPATCH2_PROTOCOL_GUID EFI_MM_USB_DISPATCH_PROTOCOL_GUID\r
 \r
 ///\r
 /// USB SMI event types\r
 ///\r
-typedef enum {\r
-  UsbLegacy,\r
-  UsbWake\r
-} EFI_USB_SMI_TYPE;\r
+typedef EFI_USB_MMI_TYPE EFI_USB_SMI_TYPE;\r
 \r
 ///\r
 /// The dispatch function's context.\r
 ///\r
-typedef struct {\r
-  ///\r
-  /// Describes whether this child handler will be invoked in response to a USB legacy \r
-  /// emulation event, such as port-trap on the PS/2* keyboard control registers, or to a \r
-  /// USB wake event, such as resumption from a sleep state.\r
-  ///\r
-  EFI_USB_SMI_TYPE          Type;\r
-  ///\r
-  /// The device path is part of the context structure and describes the location of the \r
-  /// particular USB host controller in the system for which this register event will occur.\r
-  /// This location is important because of the possible integration of several USB host \r
-  /// controllers in a system.\r
-  ///\r
-  EFI_DEVICE_PATH_PROTOCOL  *Device;\r
-} EFI_SMM_USB_REGISTER_CONTEXT;\r
-\r
-typedef struct _EFI_SMM_USB_DISPATCH2_PROTOCOL EFI_SMM_USB_DISPATCH2_PROTOCOL;\r
-\r
-/**\r
-  Provides the parent dispatch service for the USB SMI source generator.\r
+typedef EFI_MM_USB_REGISTER_CONTEXT EFI_SMM_USB_REGISTER_CONTEXT;\r
 \r
-  This service registers a function (DispatchFunction) which will be called when the USB-\r
-  related SMI specified by RegisterContext has occurred. On return, DispatchHandle \r
-  contains a unique handle which may be used later to unregister the function using UnRegister().\r
-  The DispatchFunction will be called with Context set to the same value as was passed into \r
-  this function in RegisterContext and with CommBuffer containing NULL and \r
-  CommBufferSize containing zero.\r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_USB_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchFunction   Function to register for handler when a USB-related SMI occurs. \r
-  @param[in]  RegisterContext    Pointer to the dispatch function's context.\r
-                                 The caller fills this context in before calling\r
-                                 the register function to indicate to the register\r
-                                 function the USB SMI types for which the dispatch\r
-                                 function should be invoked.\r
-  @param[out] DispatchHandle     Handle generated by the dispatcher to track the function instance.\r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 registered and the SMI source has been enabled.\r
-  @retval EFI_DEVICE_ERROR       The driver was unable to enable the SMI source.\r
-  @retval EFI_INVALID_PARAMETER  RegisterContext is invalid. The USB SMI type\r
-                                 is not within valid range.\r
-  @retval EFI_OUT_OF_RESOURCES   There is not enough memory (system or SMM) to manage this child.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_USB_REGISTER2)(\r
-  IN  CONST EFI_SMM_USB_DISPATCH2_PROTOCOL  *This,\r
-  IN        EFI_SMM_HANDLER_ENTRY_POINT2    DispatchFunction,\r
-  IN  CONST EFI_SMM_USB_REGISTER_CONTEXT    *RegisterContext,\r
-  OUT       EFI_HANDLE                      *DispatchHandle\r
-  );\r
-\r
-/**\r
-  Unregisters a USB service.\r
-\r
-  This service removes the handler associated with DispatchHandle so that it will no longer be \r
-  called when the USB event occurs.\r
-\r
-  @param[in]  This               Pointer to the EFI_SMM_USB_DISPATCH2_PROTOCOL instance.\r
-  @param[in]  DispatchHandle     Handle of the service to remove. \r
-\r
-  @retval EFI_SUCCESS            The dispatch function has been successfully\r
-                                 unregistered and the SMI source has been disabled\r
-                                 if there are no other registered child dispatch\r
-                                 functions for this SMI source.\r
-  @retval EFI_INVALID_PARAMETER  The DispatchHandle was not valid.\r
-**/\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_SMM_USB_UNREGISTER2)(\r
-  IN CONST EFI_SMM_USB_DISPATCH2_PROTOCOL  *This,\r
-  IN       EFI_HANDLE                      DispatchHandle\r
-  );\r
+typedef EFI_MM_USB_DISPATCH_PROTOCOL EFI_SMM_USB_DISPATCH2_PROTOCOL;\r
 \r
-///\r
-/// Interface structure for the SMM USB SMI Dispatch2 Protocol\r
-///\r
-/// This protocol provides the parent dispatch service for the USB SMI source generator.\r
-///\r
-struct _EFI_SMM_USB_DISPATCH2_PROTOCOL {\r
-  EFI_SMM_USB_REGISTER2    Register;\r
-  EFI_SMM_USB_UNREGISTER2  UnRegister;\r
-};\r
+typedef EFI_MM_USB_REGISTER EFI_SMM_USB_REGISTER2;\r
+\r
+typedef EFI_MM_USB_UNREGISTER EFI_SMM_USB_UNREGISTER2;\r
 \r
 extern EFI_GUID gEfiSmmUsbDispatch2ProtocolGuid;\r
 \r