]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkPkg/Include/Protocol/SmmUsbDispatch.h
Rename PI SMM definitions which has same name with those of Framework SMM spec but...
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmUsbDispatch.h
index 79dc3efba7d26bd2dc617b2780991aa279dda623..e72ce6668703d955c39f631b1d15f0fdd4bb01fd 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Provides the parent dispatch service for the USB SMI source generator.\r
 \r
-  Copyright (c) 2007, Intel Corporation\r
+  Copyright (c) 2007 - 2009, Intel Corporation\r
   All rights reserved. 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
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  SmmUsbDispatch.h\r
-\r
   @par Revision Reference:\r
   This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
   Version 0.9.\r
+\r
 **/\r
 \r
 #ifndef _EFI_SMM_USB_DISPATCH_H_\r
 #define _EFI_SMM_USB_DISPATCH_H_\r
 \r
-#include <PiDxe.h>\r
+//\r
+// Share some common definitions with PI SMM\r
+//\r
+#include <Protocol/SmmUsbDispatch2.h>\r
 \r
 //\r
 // Global ID for the USB Protocol\r
 \r
 typedef struct _EFI_SMM_USB_DISPATCH_PROTOCOL  EFI_SMM_USB_DISPATCH_PROTOCOL;\r
 \r
-//\r
-// Related Definitions\r
-//\r
-typedef enum {\r
-  UsbLegacy,\r
-  UsbWake\r
-} EFI_USB_SMI_TYPE;\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_DISPATCH_CONTEXT;\r
 \r
@@ -51,35 +56,33 @@ typedef struct {
 /**\r
   Dispatch function for a USB SMI handler.\r
 \r
-  @param  DispatchHandle        Handle of this dispatch function.\r
-  @param  DispatchContext       Pointer to the dispatch function's context.\r
+  @param[in]  DispatchHandle    Handle of this dispatch function.\r
+  @param[in]  DispatchContext   Pointer to the dispatch function's context.\r
                                 The DispatchContext fields are filled in\r
                                 by the dispatching driver prior to\r
                                 invoking this dispatch function.\r
 \r
-  Nothing\r
-\r
 **/\r
 typedef\r
 VOID\r
-(EFIAPI *EFI_SMM_USB_DISPATCH) (\r
+(EFIAPI *EFI_SMM_USB_DISPATCH)(\r
   IN  EFI_HANDLE                    DispatchHandle,\r
   IN  EFI_SMM_USB_DISPATCH_CONTEXT  *DispatchContext\r
   );\r
 \r
 /**\r
-  Register a child SMI source dispatch function with a parent SMM driver\r
+  Register a child SMI source dispatch function with a parent SMM driver.\r
 \r
-  @param  This                  Protocol instance pointer.\r
-  @param  DispatchFunction      Pointer to dispatch function to be invoked for\r
-                                this SMI source\r
-  @param  DispatchContext       Pointer to the dispatch function's context.\r
+  @param[in]  This              Pointer to the EFI_SMM_USB_DISPATCH_PROTOCOL instance.\r
+  @param[in]  DispatchFunction  Pointer to dispatch function to be invoked \r
+                                for this SMI source.\r
+  @param[in]  DispatchContext   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  DispatchHandle        Handle of dispatch function, for when interfacing\r
-                                with the parent Sx state SMM driver.\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
@@ -92,47 +95,37 @@ VOID
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SMM_USB_REGISTER) (\r
-  IN EFI_SMM_USB_DISPATCH_PROTOCOL            *This,\r
+(EFIAPI *EFI_SMM_USB_REGISTER)(\r
+  IN  EFI_SMM_USB_DISPATCH_PROTOCOL           *This,\r
   IN  EFI_SMM_USB_DISPATCH                    DispatchFunction,\r
   IN  EFI_SMM_USB_DISPATCH_CONTEXT            *DispatchContext,\r
   OUT EFI_HANDLE                              *DispatchHandle\r
   );\r
 \r
 /**\r
-  Unregister a child SMI source dispatch function with a parent SMM driver\r
+  Unregisters a USB service.\r
 \r
-  @param  This                  Protocol instance pointer.\r
-  @param  DispatchHandle        Handle of dispatch function to deregister.\r
+  @param[in]  This              Pointer to the EFI_SMM_USB_DISPATCH_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 Handle is invalid.\r
+  @retval EFI_INVALID_PARAMETER The DispatchHandle was not valid.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_SMM_USB_UNREGISTER) (\r
+(EFIAPI *EFI_SMM_USB_UNREGISTER)(\r
   IN EFI_SMM_USB_DISPATCH_PROTOCOL            *This,\r
-  IN  EFI_HANDLE                              DispatchHandle\r
+  IN EFI_HANDLE                               DispatchHandle\r
   );\r
 \r
-//\r
-// Interface structure for the SMM USB SMI Dispatch Protocol\r
-//\r
-/**\r
-  @par Protocol Description:\r
-  Provides the parent dispatch service for the USB SMI source generator.\r
-\r
-  @param Register\r
-  Installs a child service to be dispatched by this protocol.\r
-\r
-  @param UnRegister\r
-  Removes a child service dispatched by this protocol.\r
-\r
-**/\r
+///\r
+/// The EFI_SMM_USB_DISPATCH_PROTOCOL provides the ability to install child handlers for the\r
+/// given event types.\r
+///\r
 struct _EFI_SMM_USB_DISPATCH_PROTOCOL {\r
   EFI_SMM_USB_REGISTER    Register;\r
   EFI_SMM_USB_UNREGISTER  UnRegister;\r