]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/SmmUsbDispatch2.h
MdePkg FirmwareManagement.h: Fix typo EFI_SECURITY_VIOLATIO
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmUsbDispatch2.h
index a2bc4df42bcd1d10ea393b445203e504b7077f3d..69289c186de5adb6cc0bf9646852366a5d3590fd 100644 (file)
@@ -4,8 +4,8 @@
 \r
   Provides the parent dispatch service for the USB SMI source generator.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\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
   http://opensource.org/licenses/bsd-license.php\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