change the folder name of "UsbMouseSimulateTouchPadDxe" to "UsbMouseAbsolutePointer"
authoreric_tian <eric_tian@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 28 Nov 2007 03:39:35 +0000 (03:39 +0000)
committereric_tian <eric_tian@de2fecce-e211-0410-80a6-f3fac2684e05>
Wed, 28 Nov 2007 03:39:35 +0000 (03:39 +0000)
git-svn-id: https://edk2.tianocore.org/svn/edk2/trunk@4337 de2fecce-e211-0410-80a6-f3fac2684e05

edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/ComponentName.c [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.c [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.h [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.inf [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.msa [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.c [deleted file]
edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.h [deleted file]

diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/ComponentName.c b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/ComponentName.c
deleted file mode 100644 (file)
index 3e71f4e..0000000
+++ /dev/null
@@ -1,377 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
-\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:\r
-\r
-  UsbMouseAbsolutePointerComponentName.c\r
-\r
-Abstract:\r
-\r
-\r
-**/\r
-\r
-#include "UsbMouseAbsolutePointer.h"\r
-#include <Library/DebugLib.h>\r
-\r
-//\r
-// EFI Component Name Functions\r
-//\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the driver.\r
-\r
-  This function retrieves the user readable name of a driver in the form of a\r
-  Unicode string. If the driver specified by This has a user readable name in\r
-  the language specified by Language, then a pointer to the driver name is\r
-  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
-  by This does not support the language specified by Language,\r
-  then EFI_UNSUPPORTED is returned.\r
-\r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language. This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param  DriverName[out]       A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                driver specified by This in the language\r
-                                specified by Language.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
-                                This and the language specified by Language was\r
-                                returned in DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **DriverName\r
-  );\r
-\r
-\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the controller\r
-  that is being managed by a driver.\r
-\r
-  This function retrieves the user readable name of the controller specified by\r
-  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
-  driver specified by This has a user readable name in the language specified by\r
-  Language, then a pointer to the controller name is returned in ControllerName,\r
-  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
-  managing the controller specified by ControllerHandle and ChildHandle,\r
-  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
-  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
-\r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param  ControllerHandle[in]  The handle of a controller that the driver\r
-                                specified by This is managing.  This handle\r
-                                specifies the controller whose name is to be\r
-                                returned.\r
-\r
-  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
-                                the name of.  This is an optional parameter that\r
-                                may be NULL.  It will be NULL for device\r
-                                drivers.  It will also be NULL for a bus drivers\r
-                                that wish to retrieve the name of the bus\r
-                                controller.  It will not be NULL for a bus\r
-                                driver that wishes to retrieve the name of a\r
-                                child controller.\r
-\r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language.  This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                controller specified by ControllerHandle and\r
-                                ChildHandle in the language specified by\r
-                                Language from the point of view of the driver\r
-                                specified by This.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
-                                the language specified by Language for the\r
-                                driver specified by This was returned in\r
-                                DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
-                                EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
-                                managing the controller specified by\r
-                                ControllerHandle and ChildHandle.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
-  IN  EFI_HANDLE                                      ControllerHandle,\r
-  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
-  IN  CHAR8                                           *Language,\r
-  OUT CHAR16                                          **ControllerName\r
-  );\r
-\r
-\r
-//\r
-// EFI Component Name Protocol\r
-//\r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL  gUsbMouseAbsolutePointerComponentName = {\r
-  UsbMouseAbsolutePointerComponentNameGetDriverName,\r
-  UsbMouseAbsolutePointerComponentNameGetControllerName,\r
-  "eng"\r
-};\r
-\r
-//\r
-// EFI Component Name 2 Protocol\r
-//\r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseAbsolutePointerComponentName2 = {\r
-  (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UsbMouseAbsolutePointerComponentNameGetDriverName,\r
-  (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UsbMouseAbsolutePointerComponentNameGetControllerName,\r
-  "en"\r
-};\r
-\r
-\r
-\r
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUsbMouseAbsolutePointerDriverNameTable[] = {\r
-  { "eng;en", L"Usb Mouse Simulate TouchPad Driver" },\r
-  { NULL , NULL }\r
-};\r
-\r
-\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the driver.\r
-\r
-  This function retrieves the user readable name of a driver in the form of a\r
-  Unicode string. If the driver specified by This has a user readable name in\r
-  the language specified by Language, then a pointer to the driver name is\r
-  returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
-  by This does not support the language specified by Language,\r
-  then EFI_UNSUPPORTED is returned.\r
-\r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language. This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified\r
-                                in RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param  DriverName[out]       A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                driver specified by This in the language\r
-                                specified by Language.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the Driver specified by\r
-                                This and the language specified by Language was\r
-                                returned in DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerComponentNameGetDriverName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
-  IN  CHAR8                        *Language,\r
-  OUT CHAR16                       **DriverName\r
-  )\r
-{\r
-  return LookupUnicodeString2 (\r
-           Language,\r
-           This->SupportedLanguages,\r
-           mUsbMouseAbsolutePointerDriverNameTable,\r
-           DriverName,\r
-           (BOOLEAN)(This == &gUsbMouseAbsolutePointerComponentName)\r
-           );\r
-}\r
-\r
-/**\r
-  Retrieves a Unicode string that is the user readable name of the controller\r
-  that is being managed by a driver.\r
-\r
-  This function retrieves the user readable name of the controller specified by\r
-  ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
-  driver specified by This has a user readable name in the language specified by\r
-  Language, then a pointer to the controller name is returned in ControllerName,\r
-  and EFI_SUCCESS is returned.  If the driver specified by This is not currently\r
-  managing the controller specified by ControllerHandle and ChildHandle,\r
-  then EFI_UNSUPPORTED is returned.  If the driver specified by This does not\r
-  support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
-\r
-  @param  This[in]              A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
-                                EFI_COMPONENT_NAME_PROTOCOL instance.\r
-\r
-  @param  ControllerHandle[in]  The handle of a controller that the driver\r
-                                specified by This is managing.  This handle\r
-                                specifies the controller whose name is to be\r
-                                returned.\r
-\r
-  @param  ChildHandle[in]       The handle of the child controller to retrieve\r
-                                the name of.  This is an optional parameter that\r
-                                may be NULL.  It will be NULL for device\r
-                                drivers.  It will also be NULL for a bus drivers\r
-                                that wish to retrieve the name of the bus\r
-                                controller.  It will not be NULL for a bus\r
-                                driver that wishes to retrieve the name of a\r
-                                child controller.\r
-\r
-  @param  Language[in]          A pointer to a Null-terminated ASCII string\r
-                                array indicating the language.  This is the\r
-                                language of the driver name that the caller is\r
-                                requesting, and it must match one of the\r
-                                languages specified in SupportedLanguages. The\r
-                                number of languages supported by a driver is up\r
-                                to the driver writer. Language is specified in\r
-                                RFC 3066 or ISO 639-2 language code format.\r
-\r
-  @param  ControllerName[out]   A pointer to the Unicode string to return.\r
-                                This Unicode string is the name of the\r
-                                controller specified by ControllerHandle and\r
-                                ChildHandle in the language specified by\r
-                                Language from the point of view of the driver\r
-                                specified by This.\r
-\r
-  @retval EFI_SUCCESS           The Unicode string for the user readable name in\r
-                                the language specified by Language for the\r
-                                driver specified by This was returned in\r
-                                DriverName.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
-                                EFI_HANDLE.\r
-\r
-  @retval EFI_INVALID_PARAMETER Language is NULL.\r
-\r
-  @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This is not currently\r
-                                managing the controller specified by\r
-                                ControllerHandle and ChildHandle.\r
-\r
-  @retval EFI_UNSUPPORTED       The driver specified by This does not support\r
-                                the language specified by Language.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerComponentNameGetControllerName (\r
-  IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
-  IN  EFI_HANDLE                                      ControllerHandle,\r
-  IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
-  IN  CHAR8                                           *Language,\r
-  OUT CHAR16                                          **ControllerName\r
-  )\r
-{\r
-  EFI_STATUS                  Status;\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV               *UsbMouseAbsolutePointerDev;\r
-  EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;\r
-  EFI_USB_IO_PROTOCOL         *UsbIoProtocol;\r
-\r
-  //\r
-  // This is a device driver, so ChildHandle must be NULL.\r
-  //\r
-  if (ChildHandle != NULL) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  //\r
-  // Check Controller's handle\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-                  ControllerHandle,\r
-                  &gEfiUsbIoProtocolGuid,\r
-                  (VOID **) &UsbIoProtocol,\r
-                  gUsbMouseAbsolutePointerDriverBinding.DriverBindingHandle,\r
-                  ControllerHandle,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER\r
-                  );\r
-  if (!EFI_ERROR (Status)) {\r
-    gBS->CloseProtocol (\r
-          ControllerHandle,\r
-          &gEfiUsbIoProtocolGuid,\r
-          gUsbMouseAbsolutePointerDriverBinding.DriverBindingHandle,\r
-          ControllerHandle\r
-          );\r
-\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  if (Status != EFI_ALREADY_STARTED) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-  //\r
-  // Get the device context\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-                  ControllerHandle,\r
-                 &gEfiAbsolutePointerProtocolGuid,\r
-                  (VOID **) &AbsolutePointerProtocol,\r
-                  gUsbMouseAbsolutePointerDriverBinding.DriverBindingHandle,\r
-                  ControllerHandle,\r
-                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  UsbMouseAbsolutePointerDev = USB_MOUSE_ABSOLUTE_POINTER_DEV_FROM_MOUSE_PROTOCOL (AbsolutePointerProtocol);\r
-\r
-  return LookupUnicodeString2 (\r
-           Language,\r
-           This->SupportedLanguages,\r
-           UsbMouseAbsolutePointerDev->ControllerNameTable,\r
-           ControllerName,\r
-           (BOOLEAN)(This == &gUsbMouseAbsolutePointerComponentName)\r
-           );\r
-\r
-}\r
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.c b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.c
deleted file mode 100644 (file)
index af68e61..0000000
+++ /dev/null
@@ -1,1025 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
-\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:\r
-\r
-    UsbMouseAbsolutePointer.c\r
-\r
-  Abstract:\r
-\r
-\r
-**/\r
-\r
-#include "UsbMouseAbsolutePointer.h"\r
-\r
-#include <Library/DebugLib.h>\r
-#include <IndustryStandard/Usb.h>\r
-\r
-#include "mousehid.h"\r
-\r
-//\r
-// Prototypes\r
-// Driver model protocol interface\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingEntryPoint (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  );\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingStop (\r
-  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
-  IN  EFI_HANDLE                    Controller,\r
-  IN  UINTN                         NumberOfChildren,\r
-  IN  EFI_HANDLE                    *ChildHandleBuffer\r
-  );\r
-\r
-EFI_GUID  gEfiUsbMouseAbsolutePointerDriverGuid = {\r
-  0xa579f729, 0xa71d, 0x4b45, { 0xbe, 0xd7, 0xd, 0xb0, 0xa8, 0x7c, 0x3e, 0x8d }\r
-};\r
-\r
-EFI_DRIVER_BINDING_PROTOCOL gUsbMouseAbsolutePointerDriverBinding = {\r
-  USBMouseAbsolutePointerDriverBindingSupported,\r
-  USBMouseAbsolutePointerDriverBindingStart,\r
-  USBMouseAbsolutePointerDriverBindingStop,\r
-  0x1,\r
-  NULL,\r
-  NULL\r
-};\r
-\r
-//\r
-// helper functions\r
-//\r
-STATIC\r
-BOOLEAN\r
-IsUsbMouseAbsolutePointer (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo\r
-  );\r
-\r
-STATIC\r
-EFI_STATUS\r
-InitializeUsbMouseAbsolutePointerDevice (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV           *UsbMouseAbsolutePointerDev\r
-  );\r
-\r
-STATIC\r
-VOID\r
-EFIAPI\r
-UsbMouseAbsolutePointerWaitForInput (\r
-  IN  EFI_EVENT               Event,\r
-  IN  VOID                    *Context\r
-  );\r
-\r
-//\r
-// Mouse interrupt handler\r
-//\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-OnMouseAbsolutePointerInterruptComplete (\r
-  IN  VOID        *Data,\r
-  IN  UINTN       DataLength,\r
-  IN  VOID        *Context,\r
-  IN  UINT32      Result\r
-  );\r
-\r
-//\r
-// Mouse simulate TouchPad, Using AbsolutePointer Protocol\r
-//\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-GetMouseAbsolutePointerState (\r
-  IN   EFI_ABSOLUTE_POINTER_PROTOCOL  *This,\r
-  OUT  EFI_ABSOLUTE_POINTER_STATE     *MouseAbsolutePointerState\r
-  );\r
-\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerReset (\r
-  IN EFI_ABSOLUTE_POINTER_PROTOCOL    *This,\r
-  IN BOOLEAN                        ExtendedVerification\r
-  );\r
-\r
-//\r
-// Driver start here\r
-//\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingEntryPoint (\r
-  IN EFI_HANDLE           ImageHandle,\r
-  IN EFI_SYSTEM_TABLE     *SystemTable\r
-  )\r
-/*++\r
-\r
-  Routine Description:\r
-    Entry point for EFI drivers.\r
-\r
-  Arguments:\r
-   ImageHandle - EFI_HANDLE\r
-   SystemTable - EFI_SYSTEM_TABLE\r
-  Returns:\r
-    EFI_SUCCESS\r
-    others\r
-\r
---*/\r
-{\r
-       return EfiLibInstallDriverBindingComponentName2 (\r
-           ImageHandle,\r
-           SystemTable,\r
-           &gUsbMouseAbsolutePointerDriverBinding,\r
-           ImageHandle,\r
-           &gUsbMouseAbsolutePointerComponentName,\r
-           &gUsbMouseAbsolutePointerComponentName2\r
-           );\r
-}\r
-\r
-\r
-/**\r
-  Test to see if this driver supports ControllerHandle. Any ControllerHandle\r
-  that has UsbHcProtocol installed will be supported.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  Controller            Handle of device to test\r
-  @param  RemainingDevicePath   Not used\r
-\r
-  @retval EFI_SUCCESS           This driver supports this device.\r
-  @retval EFI_UNSUPPORTED       This driver does not support this device.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingSupported (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  )\r
-{\r
-  EFI_STATUS          OpenStatus;\r
-  EFI_USB_IO_PROTOCOL *UsbIo;\r
-  EFI_STATUS          Status;\r
-\r
-  OpenStatus = gBS->OpenProtocol (\r
-                      Controller,\r
-                      &gEfiUsbIoProtocolGuid,\r
-                      (VOID **) &UsbIo,\r
-                      This->DriverBindingHandle,\r
-                      Controller,\r
-                      EFI_OPEN_PROTOCOL_BY_DRIVER\r
-                      );\r
-  if (EFI_ERROR (OpenStatus) && (OpenStatus != EFI_ALREADY_STARTED)) {\r
-       return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  if (OpenStatus == EFI_ALREADY_STARTED) {\r
-    return EFI_ALREADY_STARTED;\r
-  }\r
-  \r
-  //\r
-  // Use the USB I/O protocol interface to see the Controller is\r
-  // the Mouse controller that can be managed by this driver.\r
-  //\r
-  Status = EFI_SUCCESS;\r
-  if (!IsUsbMouseAbsolutePointer (UsbIo)) {\r
-    Status = EFI_UNSUPPORTED;\r
-  }\r
-  \r
-  gBS->CloseProtocol (\r
-        Controller,\r
-        &gEfiUsbIoProtocolGuid,\r
-        This->DriverBindingHandle,\r
-        Controller\r
-        );\r
-        \r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Starting the Usb Bus Driver\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  Controller            Handle of device to test\r
-  @param  RemainingDevicePath   Not used\r
-\r
-  @retval EFI_SUCCESS           This driver supports this device.\r
-  @retval EFI_UNSUPPORTED       This driver does not support this device.\r
-  @retval EFI_DEVICE_ERROR      This driver cannot be started due to device Error\r
-                                EFI_OUT_OF_RESOURCES- Can't allocate memory\r
-                                resources\r
-  @retval EFI_ALREADY_STARTED   Thios driver has been started\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingStart (\r
-  IN EFI_DRIVER_BINDING_PROTOCOL    *This,\r
-  IN EFI_HANDLE                     Controller,\r
-  IN EFI_DEVICE_PATH_PROTOCOL       *RemainingDevicePath\r
-  )\r
-{\r
-  EFI_STATUS                  Status;\r
-  EFI_USB_IO_PROTOCOL         *UsbIo;\r
-  EFI_USB_ENDPOINT_DESCRIPTOR *EndpointDesc;\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV               *UsbMouseAbsolutePointerDevice;\r
-  UINT8                       EndpointNumber;\r
-  UINT8                       Index;\r
-  UINT8                       EndpointAddr;\r
-  UINT8                       PollingInterval;\r
-  UINT8                       PacketSize;\r
-\r
-  UsbMouseAbsolutePointerDevice  = NULL;\r
-  Status          = EFI_SUCCESS;\r
-\r
-  Status = gBS->OpenProtocol (\r
-                  Controller,\r
-                  &gEfiUsbIoProtocolGuid,\r
-                  (VOID **) &UsbIo,\r
-                  This->DriverBindingHandle,\r
-                  Controller,\r
-                  EFI_OPEN_PROTOCOL_BY_DRIVER                  \r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ErrorExit;\r
-  }\r
-  \r
-  UsbMouseAbsolutePointerDevice = AllocateZeroPool (sizeof (USB_MOUSE_ABSOLUTE_POINTER_DEV));\r
-  if (UsbMouseAbsolutePointerDevice == NULL) {\r
-    Status = EFI_OUT_OF_RESOURCES;\r
-    goto ErrorExit;\r
-  }\r
-\r
-  UsbMouseAbsolutePointerDevice->UsbIo               = UsbIo;\r
-\r
-  UsbMouseAbsolutePointerDevice->Signature           = USB_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE;\r
-\r
-  UsbMouseAbsolutePointerDevice->InterfaceDescriptor = AllocatePool (sizeof (EFI_USB_INTERFACE_DESCRIPTOR));\r
-\r
-  if (UsbMouseAbsolutePointerDevice->InterfaceDescriptor == NULL) {\r
-    Status = EFI_OUT_OF_RESOURCES;\r
-    goto ErrorExit;\r
-  }\r
-\r
-  EndpointDesc = AllocatePool (sizeof (EFI_USB_ENDPOINT_DESCRIPTOR));\r
-  if (EndpointDesc == NULL) {\r
-    Status = EFI_OUT_OF_RESOURCES;\r
-    goto ErrorExit;\r
-  }\r
-  //\r
-  // Get the Device Path Protocol on Controller's handle\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-                  Controller,\r
-                  &gEfiDevicePathProtocolGuid,\r
-                  (VOID **) &UsbMouseAbsolutePointerDevice->DevicePath,\r
-                  This->DriverBindingHandle,\r
-                  Controller,\r
-                  EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-                  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    goto ErrorExit;\r
-  }\r
-  //\r
-  // Get interface & endpoint descriptor\r
-  //\r
-  UsbIo->UsbGetInterfaceDescriptor (\r
-          UsbIo,\r
-          UsbMouseAbsolutePointerDevice->InterfaceDescriptor\r
-          );\r
-\r
-  EndpointNumber = UsbMouseAbsolutePointerDevice->InterfaceDescriptor->NumEndpoints;\r
-\r
-  for (Index = 0; Index < EndpointNumber; Index++) {\r
-    UsbIo->UsbGetEndpointDescriptor (\r
-            UsbIo,\r
-            Index,\r
-            EndpointDesc\r
-            );\r
-\r
-    if ((EndpointDesc->Attributes & 0x03) == 0x03) {\r
-\r
-      //\r
-      // We only care interrupt endpoint here\r
-      //\r
-      UsbMouseAbsolutePointerDevice->IntEndpointDescriptor = EndpointDesc;\r
-    }\r
-  }\r
-\r
-  if (UsbMouseAbsolutePointerDevice->IntEndpointDescriptor == NULL) {\r
-    //\r
-    // No interrupt endpoint, then error\r
-    //\r
-    Status = EFI_UNSUPPORTED;\r
-    goto ErrorExit;\r
-  }\r
-\r
-  Status = InitializeUsbMouseAbsolutePointerDevice (UsbMouseAbsolutePointerDevice);\r
-  if (EFI_ERROR (Status)) {\r
-    MouseAbsolutePointerReportStatusCode (\r
-      UsbMouseAbsolutePointerDevice->DevicePath,\r
-      EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
-      PcdGet32 (PcdStatusCodeValueMouseInterfaceError)\r
-      );\r
-\r
-    goto ErrorExit;\r
-  }\r
-\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.GetState = GetMouseAbsolutePointerState;\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Reset    = UsbMouseAbsolutePointerReset;\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Mode     = &UsbMouseAbsolutePointerDevice->AbsolutePointerMode;\r
-\r
-  Status = gBS->CreateEvent (\r
-          EVT_NOTIFY_WAIT,\r
-          TPL_NOTIFY,\r
-          UsbMouseAbsolutePointerWaitForInput,\r
-          UsbMouseAbsolutePointerDevice,\r
-          &((UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol).WaitForInput)\r
-          );\r
-  if (EFI_ERROR (Status)) {\r
-    goto ErrorExit;\r
-  }\r
-\r
-  Status = gBS->InstallProtocolInterface (\r
-          &Controller,\r
-          &gEfiAbsolutePointerProtocolGuid,\r
-          EFI_NATIVE_INTERFACE,\r
-          &UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol\r
-          );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    Status = EFI_DEVICE_ERROR;\r
-    goto ErrorExit;\r
-  }\r
-\r
-  //\r
-  // After Enabling Async Interrupt Transfer on this mouse Device\r
-  // we will be able to get key data from it. Thus this is deemed as\r
-  // the enable action of the mouse\r
-  //\r
-\r
-  MouseAbsolutePointerReportStatusCode (\r
-    UsbMouseAbsolutePointerDevice->DevicePath,\r
-    EFI_PROGRESS_CODE,\r
-    PcdGet32 (PcdStatusCodeValueMouseEnable)\r
-    );\r
-\r
-  //\r
-  // submit async interrupt transfer\r
-  //\r
-  EndpointAddr    = UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->EndpointAddress;\r
-  PollingInterval = UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->Interval;\r
-  PacketSize      = (UINT8) (UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->MaxPacketSize);\r
-\r
-  Status = UsbIo->UsbAsyncInterruptTransfer (\r
-                    UsbIo,\r
-                    EndpointAddr,\r
-                    TRUE,\r
-                    PollingInterval,\r
-                    PacketSize,\r
-                    OnMouseAbsolutePointerInterruptComplete,\r
-                    UsbMouseAbsolutePointerDevice\r
-                    );\r
-\r
-  if (!EFI_ERROR (Status)) {\r
-\r
-    UsbMouseAbsolutePointerDevice->ControllerNameTable = NULL;\r
-    AddUnicodeString2 (\r
-      "eng",\r
-      gUsbMouseAbsolutePointerComponentName.SupportedLanguages,\r
-      &UsbMouseAbsolutePointerDevice->ControllerNameTable,\r
-      L"Generic Usb Mouse Simulate TouchPad",\r
-      TRUE\r
-      );\r
-    AddUnicodeString2 (\r
-      "en",\r
-      gUsbMouseAbsolutePointerComponentName2.SupportedLanguages,\r
-      &UsbMouseAbsolutePointerDevice->ControllerNameTable,\r
-      L"Generic Usb Mouse Simulate TouchPad2",\r
-      FALSE\r
-      );\r
-\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  //\r
-  // If submit error, uninstall that interface\r
-  //\r
-  Status = EFI_DEVICE_ERROR;\r
-\r
-  gBS->UninstallProtocolInterface (\r
-        Controller,\r
-        &gEfiAbsolutePointerProtocolGuid,\r
-        &UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol\r
-  );\r
-\r
-ErrorExit:\r
-  if (EFI_ERROR (Status)) {\r
-    gBS->CloseProtocol (\r
-          Controller,\r
-          &gEfiUsbIoProtocolGuid,\r
-          This->DriverBindingHandle,\r
-          Controller\r
-          );\r
-\r
-    if (UsbMouseAbsolutePointerDevice != NULL) {\r
-      if (UsbMouseAbsolutePointerDevice->InterfaceDescriptor != NULL) {\r
-        gBS->FreePool (UsbMouseAbsolutePointerDevice->InterfaceDescriptor);\r
-      }\r
-\r
-      if (UsbMouseAbsolutePointerDevice->IntEndpointDescriptor != NULL) {\r
-        gBS->FreePool (UsbMouseAbsolutePointerDevice->IntEndpointDescriptor);\r
-      }\r
-  \r
-      if ((UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol).WaitForInput != NULL) {\r
-        gBS->CloseEvent ((UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol).WaitForInput);\r
-      }\r
-\r
-      gBS->FreePool (UsbMouseAbsolutePointerDevice);\r
-      UsbMouseAbsolutePointerDevice = NULL;\r
-    }\r
-  }\r
-\r
-  return Status;\r
-}\r
-\r
-\r
-/**\r
-  Stop this driver on ControllerHandle. Support stoping any child handles\r
-  created by this driver.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  Controller            Handle of device to stop driver on\r
-  @param  NumberOfChildren      Number of Children in the ChildHandleBuffer\r
-  @param  ChildHandleBuffer     List of handles for the children we need to stop.\r
-\r
-  @return EFI_SUCCESS\r
-  @return EFI_DEVICE_ERROR\r
-  @return others\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-USBMouseAbsolutePointerDriverBindingStop (\r
-  IN  EFI_DRIVER_BINDING_PROTOCOL   *This,\r
-  IN  EFI_HANDLE                    Controller,\r
-  IN  UINTN                         NumberOfChildren,\r
-  IN  EFI_HANDLE                    *ChildHandleBuffer\r
-  )\r
-{\r
-  EFI_STATUS                  Status;\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV               *UsbMouseAbsolutePointerDevice;\r
-  EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointerProtocol;\r
-  EFI_USB_IO_PROTOCOL         *UsbIo;\r
-\r
-  //\r
-  // Get our context back.\r
-  //\r
-  Status = gBS->OpenProtocol (\r
-      Controller,\r
-      &gEfiAbsolutePointerProtocolGuid,\r
-      (VOID **) &AbsolutePointerProtocol,\r
-      This->DriverBindingHandle,\r
-      Controller,\r
-      EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
-  );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-      return EFI_UNSUPPORTED;\r
-  }\r
-  UsbMouseAbsolutePointerDevice = USB_MOUSE_ABSOLUTE_POINTER_DEV_FROM_MOUSE_PROTOCOL (AbsolutePointerProtocol);\r
-\r
-  gBS->CloseProtocol (\r
-        Controller,\r
-        &gEfiAbsolutePointerProtocolGuid,\r
-        This->DriverBindingHandle,\r
-        Controller\r
-        );\r
-\r
-  UsbIo = UsbMouseAbsolutePointerDevice->UsbIo;\r
-\r
-  //\r
-  // Uninstall the Asyn Interrupt Transfer from this device\r
-  // will disable the mouse data input from this device\r
-  //\r
-  MouseAbsolutePointerReportStatusCode (\r
-    UsbMouseAbsolutePointerDevice->DevicePath,\r
-    EFI_PROGRESS_CODE,\r
-    PcdGet32 (PcdStatusCodeValueMouseDisable)\r
-    );\r
-\r
-  //\r
-  // Delete Mouse Async Interrupt Transfer\r
-  //\r
-  UsbIo->UsbAsyncInterruptTransfer (\r
-          UsbIo,\r
-          UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->EndpointAddress,\r
-          FALSE,\r
-          UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->Interval,\r
-          0,\r
-          NULL,\r
-          NULL\r
-          );\r
-\r
-  gBS->CloseEvent (UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.WaitForInput);\r
-  \r
-  if (UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent) {\r
-    gBS->CloseEvent (UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent);\r
-    UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent = 0;\r
-  }\r
-\r
-  Status = gBS->UninstallProtocolInterface (\r
-                  Controller,\r
-                  &gEfiAbsolutePointerProtocolGuid,\r
-                  &UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  gBS->CloseProtocol (\r
-        Controller,\r
-        &gEfiUsbIoProtocolGuid,\r
-        This->DriverBindingHandle,\r
-        Controller\r
-        );\r
-\r
-  gBS->FreePool (UsbMouseAbsolutePointerDevice->InterfaceDescriptor);\r
-  gBS->FreePool (UsbMouseAbsolutePointerDevice->IntEndpointDescriptor);\r
-\r
-  if (UsbMouseAbsolutePointerDevice->ControllerNameTable) {\r
-    FreeUnicodeStringTable (UsbMouseAbsolutePointerDevice->ControllerNameTable);\r
-  }\r
-\r
-  gBS->FreePool (UsbMouseAbsolutePointerDevice);\r
-\r
-  return EFI_SUCCESS;\r
-\r
-}\r
-\r
-\r
-/**\r
-  Tell if a Usb Controller is a mouse\r
-\r
-  @param  UsbIo                 Protocol instance pointer.\r
-\r
-  @retval TRUE                  It is a mouse\r
-  @retval FALSE                 It is not a mouse\r
-\r
-**/\r
-BOOLEAN\r
-IsUsbMouseAbsolutePointer (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo\r
-  )\r
-{\r
-  EFI_STATUS                    Status;\r
-  EFI_USB_INTERFACE_DESCRIPTOR  InterfaceDescriptor;\r
-\r
-  //\r
-  // Get the Default interface descriptor, now we only\r
-  // suppose it is interface 1\r
-  //\r
-  Status = UsbIo->UsbGetInterfaceDescriptor (\r
-                    UsbIo,\r
-                    &InterfaceDescriptor\r
-                    );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return FALSE;\r
-  }\r
-\r
-  if ((InterfaceDescriptor.InterfaceClass == CLASS_HID) &&\r
-      (InterfaceDescriptor.InterfaceSubClass == SUBCLASS_BOOT) &&\r
-      (InterfaceDescriptor.InterfaceProtocol == PROTOCOL_MOUSE)\r
-      ) {\r
-       \r
-    return TRUE;\r
-  }\r
-\r
-  return FALSE;\r
-}\r
-\r
-\r
-/**\r
-  Initialize the Usb Mouse Simulate TouchPad Device.\r
-\r
-  @param  UsbMouseAbsolutePointerDev           Device instance to be initialized\r
-\r
-  @retval EFI_SUCCESS           Success\r
-  @retval EFI_DEVICE_ERROR      Init error. EFI_OUT_OF_RESOURCES- Can't allocate\r
-                                memory\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-InitializeUsbMouseAbsolutePointerDevice (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV           *UsbMouseAbsolutePointerDev\r
-  )\r
-{\r
-  EFI_USB_IO_PROTOCOL     *UsbIo;\r
-  UINT8                   Protocol;\r
-  EFI_STATUS              Status;\r
-  EFI_USB_HID_DESCRIPTOR  MouseHidDesc;\r
-  UINT8                   *ReportDesc;\r
-\r
-  UsbIo = UsbMouseAbsolutePointerDev->UsbIo;\r
-\r
-  //\r
-  // Get HID descriptor\r
-  //\r
-  Status = UsbGetHidDescriptor (\r
-            UsbIo,\r
-            UsbMouseAbsolutePointerDev->InterfaceDescriptor->InterfaceNumber,\r
-            &MouseHidDesc\r
-            );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Get Report descriptor\r
-  //\r
-  if (MouseHidDesc.HidClassDesc[0].DescriptorType != 0x22) {\r
-    return EFI_UNSUPPORTED;\r
-  }\r
-\r
-  ReportDesc = AllocateZeroPool (MouseHidDesc.HidClassDesc[0].DescriptorLength);\r
-  if (ReportDesc == NULL) {\r
-    return EFI_OUT_OF_RESOURCES;\r
-  }\r
-\r
-  Status = UsbGetReportDescriptor (\r
-            UsbIo,\r
-            UsbMouseAbsolutePointerDev->InterfaceDescriptor->InterfaceNumber,\r
-            MouseHidDesc.HidClassDesc[0].DescriptorLength,\r
-            ReportDesc\r
-            );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (ReportDesc);\r
-    return Status;\r
-  }\r
-\r
-  //\r
-  // Parse report descriptor\r
-  //\r
-  Status = ParseMouseReportDescriptor (\r
-            UsbMouseAbsolutePointerDev,\r
-            ReportDesc,\r
-            MouseHidDesc.HidClassDesc[0].DescriptorLength\r
-            );\r
-\r
-  if (EFI_ERROR (Status)) {\r
-    gBS->FreePool (ReportDesc);\r
-    return Status;\r
-  }\r
-\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMaxX = 1024;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMaxY = 1024;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMaxZ = 0;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMinX = 0;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMinY = 0;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.AbsoluteMinZ = 0;\r
-  UsbMouseAbsolutePointerDev->AbsolutePointerMode.Attributes   = 0x3;\r
-  \r
-  //\r
-  // Here we just assume interface 0 is the mouse interface\r
-  //\r
-  UsbGetProtocolRequest (\r
-    UsbIo,\r
-    0,\r
-    &Protocol\r
-    );\r
-\r
-  if (Protocol != BOOT_PROTOCOL) {\r
-    Status = UsbSetProtocolRequest (\r
-              UsbIo,\r
-              0,\r
-              BOOT_PROTOCOL\r
-              );\r
-\r
-    if (EFI_ERROR (Status)) {\r
-      gBS->FreePool (ReportDesc);\r
-      return EFI_DEVICE_ERROR;\r
-    }\r
-  }\r
-\r
-  //\r
-  // Set indefinite Idle rate for USB Mouse\r
-  //\r
-  UsbSetIdleRequest (\r
-    UsbIo,\r
-    0,\r
-    0,\r
-    0\r
-    );\r
-\r
-  gBS->FreePool (ReportDesc);\r
-\r
-  if (UsbMouseAbsolutePointerDev->DelayedRecoveryEvent) {\r
-    gBS->CloseEvent (UsbMouseAbsolutePointerDev->DelayedRecoveryEvent);\r
-    UsbMouseAbsolutePointerDev->DelayedRecoveryEvent = 0;\r
-  }\r
-\r
-  Status = gBS->CreateEvent (\r
-                  EVT_TIMER | EVT_NOTIFY_SIGNAL,\r
-                  TPL_NOTIFY,\r
-                  USBMouseAbsolutePointerRecoveryHandler,\r
-                  UsbMouseAbsolutePointerDev,\r
-                  &UsbMouseAbsolutePointerDev->DelayedRecoveryEvent\r
-                  );\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
-  It is called whenever there is data received from async interrupt\r
-  transfer.\r
-\r
-  @param  Data                  Data received.\r
-  @param  DataLength            Length of Data\r
-  @param  Context               Passed in context\r
-  @param  Result                Async Interrupt Transfer result\r
-\r
-  @return EFI_SUCCESS\r
-  @return EFI_DEVICE_ERROR\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-OnMouseAbsolutePointerInterruptComplete (\r
-  IN  VOID        *Data,\r
-  IN  UINTN       DataLength,\r
-  IN  VOID        *Context,\r
-  IN  UINT32      Result\r
-  )\r
-{\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV       *UsbMouseAbsolutePointerDevice;\r
-  EFI_USB_IO_PROTOCOL *UsbIo;\r
-  UINT8               EndpointAddr;\r
-  UINT32              UsbResult;\r
-\r
-  UsbMouseAbsolutePointerDevice  = (USB_MOUSE_ABSOLUTE_POINTER_DEV *) Context;\r
-  UsbIo           = UsbMouseAbsolutePointerDevice->UsbIo;\r
-\r
-  if (Result != EFI_USB_NOERROR) {\r
-    //\r
-    // Some errors happen during the process\r
-    //\r
-    MouseAbsolutePointerReportStatusCode (\r
-      UsbMouseAbsolutePointerDevice->DevicePath,\r
-      EFI_ERROR_CODE | EFI_ERROR_MINOR,\r
-      PcdGet32 (PcdStatusCodeValueMouseInputError)\r
-      );\r
-\r
-    if ((Result & EFI_USB_ERR_STALL) == EFI_USB_ERR_STALL) {\r
-      EndpointAddr = UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->EndpointAddress;\r
-\r
-      UsbClearEndpointHalt (\r
-        UsbIo,\r
-        EndpointAddr,\r
-        &UsbResult\r
-        );\r
-    }\r
-\r
-    UsbIo->UsbAsyncInterruptTransfer (\r
-            UsbIo,\r
-            UsbMouseAbsolutePointerDevice->IntEndpointDescriptor->EndpointAddress,\r
-            FALSE,\r
-            0,\r
-            0,\r
-            NULL,\r
-            NULL\r
-            );\r
-\r
-    gBS->SetTimer (\r
-          UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent,\r
-          TimerRelative,\r
-          EFI_USB_INTERRUPT_DELAY\r
-          );\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-\r
-  if (DataLength == 0 || Data == NULL) {\r
-    return EFI_SUCCESS;\r
-  }\r
-\r
-  //\r
-  //Check mouse Data\r
-  //\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerStateChanged = TRUE;\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerState.CurrentX += *((INT8 *) Data + 1);\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerState.CurrentY += *((INT8 *) Data + 2);\r
-  if (DataLength > 3) {\r
-    UsbMouseAbsolutePointerDevice->AbsolutePointerState.CurrentZ += *((INT8 *) Data + 3);\r
-  }\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerState.ActiveButtons = *(UINT8 *)Data & 0x3;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Get the mouse state, see ABSOLUTE POINTER PROTOCOL.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  MouseState            Current mouse state\r
-\r
-  @return EFI_SUCCESS\r
-  @return EFI_DEVICE_ERROR\r
-  @return EFI_NOT_READY\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-GetMouseAbsolutePointerState (\r
-  IN   EFI_ABSOLUTE_POINTER_PROTOCOL  *This,\r
-  OUT  EFI_ABSOLUTE_POINTER_STATE     *MouseAbsolutePointerState\r
-  )\r
-{\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV *MouseAbsolutePointerDev;\r
-\r
-  if (MouseAbsolutePointerState == NULL) {\r
-    return EFI_DEVICE_ERROR;\r
-  }\r
-\r
-  MouseAbsolutePointerDev = USB_MOUSE_ABSOLUTE_POINTER_DEV_FROM_MOUSE_PROTOCOL (This);\r
-\r
-  if (!MouseAbsolutePointerDev->AbsolutePointerStateChanged) {\r
-    return EFI_NOT_READY;\r
-  }\r
-\r
-  CopyMem (\r
-    MouseAbsolutePointerState,\r
-    &MouseAbsolutePointerDev->AbsolutePointerState,\r
-    sizeof (EFI_ABSOLUTE_POINTER_STATE)\r
-    );\r
-\r
-  //\r
-  // Clear previous move state\r
-  //\r
-  MouseAbsolutePointerDev->AbsolutePointerState.CurrentX = 0;\r
-  MouseAbsolutePointerDev->AbsolutePointerState.CurrentY = 0;\r
-  MouseAbsolutePointerDev->AbsolutePointerState.CurrentZ = 0;\r
-  MouseAbsolutePointerDev->AbsolutePointerState.ActiveButtons = 0;\r
-\r
-  MouseAbsolutePointerDev->AbsolutePointerStateChanged            = FALSE;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
-  Reset the mouse device, see ABSOLUTE POINTER PROTOCOL.\r
-\r
-  @param  This                  Protocol instance pointer.\r
-  @param  ExtendedVerification  Ignored here/\r
-\r
-  @return EFI_SUCCESS\r
-\r
-**/\r
-STATIC\r
-EFI_STATUS\r
-EFIAPI\r
-UsbMouseAbsolutePointerReset (\r
-  IN EFI_ABSOLUTE_POINTER_PROTOCOL    *This,\r
-  IN BOOLEAN                        ExtendedVerification\r
-  )\r
-{\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV       *UsbMouseAbsolutePointerDevice;\r
-\r
-  UsbMouseAbsolutePointerDevice  = USB_MOUSE_ABSOLUTE_POINTER_DEV_FROM_MOUSE_PROTOCOL (This);\r
-\r
-  MouseAbsolutePointerReportStatusCode (\r
-    UsbMouseAbsolutePointerDevice->DevicePath,\r
-    EFI_PROGRESS_CODE,\r
-    PcdGet32 (PcdStatusCodeValueMouseReset)\r
-    );\r
-\r
-  ZeroMem (\r
-    &UsbMouseAbsolutePointerDevice->AbsolutePointerState,\r
-    sizeof (EFI_ABSOLUTE_POINTER_STATE)\r
-    );\r
-  UsbMouseAbsolutePointerDevice->AbsolutePointerStateChanged = FALSE;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-/**\r
-  Event notification function for ABSOLUTE_POINTER.WaitForInput event\r
-  Signal the event if there is input from mouse\r
-\r
-  @param  Event                 Wait Event\r
-  @param  Context               Passed parameter to event handler\r
- VOID\r
-\r
-**/\r
-STATIC\r
-VOID\r
-EFIAPI\r
-UsbMouseAbsolutePointerWaitForInput (\r
-  IN  EFI_EVENT               Event,\r
-  IN  VOID                    *Context\r
-  )\r
-{\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV *UsbMouseAbsolutePointerDev;\r
-\r
-  UsbMouseAbsolutePointerDev = (USB_MOUSE_ABSOLUTE_POINTER_DEV *) Context;\r
-\r
-  //\r
-  // Someone is waiting on the mouse event, if there's\r
-  // input from mouse, signal the event\r
-  //\r
-  if (UsbMouseAbsolutePointerDev->AbsolutePointerStateChanged) {\r
-    gBS->SignalEvent (Event);\r
-  }\r
-}\r
-\r
-/**\r
-  Timer handler for Delayed Recovery timer.\r
-\r
-  @param  Event                 The Delayed Recovery event.\r
-  @param  Context               Points to the USB_KB_DEV instance.\r
-\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-USBMouseAbsolutePointerRecoveryHandler (\r
-  IN    EFI_EVENT    Event,\r
-  IN    VOID         *Context\r
-  )\r
-{\r
-  USB_MOUSE_ABSOLUTE_POINTER_DEV       *UsbMouseAbsolutePointerDev;\r
-  EFI_USB_IO_PROTOCOL *UsbIo;\r
-\r
-  UsbMouseAbsolutePointerDev = (USB_MOUSE_ABSOLUTE_POINTER_DEV *) Context;\r
-\r
-  UsbIo       = UsbMouseAbsolutePointerDev->UsbIo;\r
-\r
-  UsbIo->UsbAsyncInterruptTransfer (\r
-          UsbIo,\r
-          UsbMouseAbsolutePointerDev->IntEndpointDescriptor->EndpointAddress,\r
-          TRUE,\r
-          UsbMouseAbsolutePointerDev->IntEndpointDescriptor->Interval,\r
-          UsbMouseAbsolutePointerDev->IntEndpointDescriptor->MaxPacketSize,\r
-          OnMouseAbsolutePointerInterruptComplete,\r
-          UsbMouseAbsolutePointerDev\r
-          );\r
-}\r
-\r
-\r
-/**\r
-  Report Status Code in Usb Bot Driver\r
-\r
-  @param  DevicePath            Use this to get Device Path\r
-  @param  CodeType              Status Code Type\r
-  @param  CodeValue             Status Code Value\r
-\r
-  @return None\r
-\r
-**/\r
-VOID\r
-MouseAbsolutePointerReportStatusCode (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
-  IN EFI_STATUS_CODE_TYPE      CodeType,\r
-  IN EFI_STATUS_CODE_VALUE     Value\r
-  )\r
-{\r
-  REPORT_STATUS_CODE_WITH_DEVICE_PATH (\r
-    CodeType,\r
-    Value,\r
-    DevicePath\r
-    );\r
-}\r
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.h b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointer.h
deleted file mode 100644 (file)
index 9c7d22f..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004 - 2007, 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
-http://opensource.org/licenses/bsd-license.php\r
-\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:\r
-\r
-    UsbMouseAbsolutePointer.h\r
-\r
-  Abstract:\r
-\r
-\r
-**/\r
-\r
-#ifndef _USB_MOUSE_ABSOLUTE_POINTER_H\r
-#define _USB_MOUSE_ABSOLUTE_POINTER_H\r
-\r
-\r
-#include <PiDxe.h>\r
-\r
-#include <Protocol/AbsolutePointer.h>\r
-#include <Protocol/UsbIo.h>\r
-#include <Protocol/DevicePath.h>\r
-\r
-#include <Library/ReportStatusCodeLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/BaseLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-#include <Library/PcdLib.h>\r
-#include <Library/UsbLib.h>\r
-\r
-#include <IndustryStandard/Usb.h>\r
-\r
-#define CLASS_HID               3\r
-#define SUBCLASS_BOOT           1\r
-#define PROTOCOL_MOUSE          2\r
-\r
-#define BOOT_PROTOCOL           0\r
-#define REPORT_PROTOCOL         1\r
-\r
-#define USB_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE EFI_SIGNATURE_32 ('u', 'm', 's', 't')\r
-\r
-typedef struct {\r
-  BOOLEAN ButtonDetected;\r
-  UINT8   ButtonMinIndex;\r
-  UINT8   ButtonMaxIndex;\r
-  UINT8   Reserved;\r
-} PRIVATE_DATA;\r
-\r
-typedef struct {\r
-  UINTN                         Signature;\r
-  EFI_DEVICE_PATH_PROTOCOL      *DevicePath;\r
-  EFI_EVENT                     DelayedRecoveryEvent;\r
-  EFI_USB_IO_PROTOCOL           *UsbIo;\r
-  EFI_USB_INTERFACE_DESCRIPTOR  *InterfaceDescriptor;\r
-  EFI_USB_ENDPOINT_DESCRIPTOR   *IntEndpointDescriptor;\r
-  UINT8                         NumberOfButtons;\r
-  INT32                         XLogicMax;\r
-  INT32                         XLogicMin;\r
-  INT32                         YLogicMax;\r
-  INT32                         YLogicMin;\r
-\r
-  EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointerProtocol;\r
-  EFI_ABSOLUTE_POINTER_STATE   AbsolutePointerState;\r
-  EFI_ABSOLUTE_POINTER_MODE            AbsolutePointerMode;\r
-  BOOLEAN                                              AbsolutePointerStateChanged;\r
-\r
-  PRIVATE_DATA                  PrivateData;\r
-  EFI_UNICODE_STRING_TABLE      *ControllerNameTable;\r
-} USB_MOUSE_ABSOLUTE_POINTER_DEV;\r
-\r
-#define USB_MOUSE_ABSOLUTE_POINTER_DEV_FROM_MOUSE_PROTOCOL(a) \\r
-    CR(a, USB_MOUSE_ABSOLUTE_POINTER_DEV, AbsolutePointerProtocol, USB_MOUSE_ABSOLUTE_POINTER_DEV_SIGNATURE)\r
-\r
-VOID\r
-EFIAPI\r
-USBMouseAbsolutePointerRecoveryHandler (\r
-  IN    EFI_EVENT    Event,\r
-  IN    VOID         *Context\r
-  );\r
-\r
-//\r
-// Global Variables\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL   gUsbMouseAbsolutePointerDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL   gUsbMouseAbsolutePointerComponentName;\r
-extern EFI_COMPONENT_NAME2_PROTOCOL  gUsbMouseAbsolutePointerComponentName2;\r
-extern EFI_GUID                      gEfiUsbMouseAbsolutePointerDriverGuid;\r
-\r
-VOID\r
-MouseAbsolutePointerReportStatusCode (\r
-  IN EFI_DEVICE_PATH_PROTOCOL  *DevicePath,\r
-  IN EFI_STATUS_CODE_TYPE      CodeType,\r
-  IN EFI_STATUS_CODE_VALUE     Value\r
-  );\r
-\r
-#endif\r
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.inf b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.inf
deleted file mode 100644 (file)
index 14f7298..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#/** @file\r
-# Component name for module UsbMouseAbsolutePointerDxe\r
-#\r
-# FIX ME!\r
-# Copyright (c) 2006, Intel Corporation. \r
-#\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
-#  http://opensource.org/licenses/bsd-license.php\r
-#\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
-#\r
-#**/\r
-\r
-[Defines]\r
-  INF_VERSION                    = 0x00010005\r
-  BASE_NAME                      = UsbMouseAbsolutePointerDxe\r
-  FILE_GUID                      = 4EA43463-747C-46eb-97FB-B0E5C5F05306\r
-  MODULE_TYPE                    = DXE_DRIVER\r
-  VERSION_STRING                 = 1.0\r
-  EDK_RELEASE_VERSION            = 0x00020000\r
-  EFI_SPECIFICATION_VERSION      = 0x00020000\r
-\r
-  ENTRY_POINT                    = USBMouseAbsolutePointerDriverBindingEntryPoint\r
-\r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
-#\r
-\r
-[Sources.common]\r
-  mousehid.h\r
-  ComponentName.c\r
-  UsbMouseAbsolutePointer.c\r
-  mousehid.c\r
-  UsbMouseAbsolutePointer.h\r
-\r
-[Packages]\r
-  MdePkg/MdePkg.dec\r
-\r
-[LibraryClasses]\r
-  MemoryAllocationLib\r
-  UefiLib\r
-  UefiBootServicesTableLib\r
-  UefiDriverEntryPoint\r
-  BaseMemoryLib\r
-  ReportStatusCodeLib\r
-  PcdLib\r
-  UsbLib\r
-\r
-[Protocols]\r
-  gEfiUsbIoProtocolGuid                         # PROTOCOL ALWAYS_CONSUMED\r
-  gEfiDevicePathProtocolGuid                    # PROTOCOL ALWAYS_CONSUMED\r
-  gEfiAbsolutePointerProtocolGuid                                                              # PROTOCOL ALWAYS_CONSUMED\r
-\r
-[FixedPcd]\r
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInterfaceError\r
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseEnable\r
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseDisable\r
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseInputError\r
-  gEfiMdePkgTokenSpaceGuid.PcdStatusCodeValueMouseReset\r
-\r
-\r
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.msa b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/UsbMouseAbsolutePointerDxe.msa
deleted file mode 100644 (file)
index 5ab6154..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<ModuleSurfaceArea xmlns="http://www.TianoCore.org/2006/Edk2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\r
-  <MsaHeader>\r
-    <ModuleName>UsbMouseAbsolutePointerDxe</ModuleName>\r
-    <ModuleType>DXE_DRIVER</ModuleType>\r
-    <GuidValue>4EA43463-747C-46eb-97FB-B0E5C5F05306</GuidValue>\r
-    <Version>1.0</Version>\r
-    <Abstract>Component name for module UsbMouseAbsolutePointer</Abstract>\r
-    <Description>FIX ME!</Description>\r
-    <Copyright>Copyright (c) 2006, Intel Corporation. </Copyright>\r
-    <License>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
-      http://opensource.org/licenses/bsd-license.php\r
-\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.</License>\r
-    <Specification>FRAMEWORK_BUILD_PACKAGING_SPECIFICATION   0x00000052</Specification>\r
-  </MsaHeader>\r
-  <ModuleDefinitions>\r
-    <SupportedArchitectures>IA32 X64 IPF EBC</SupportedArchitectures>\r
-    <BinaryModule>false</BinaryModule>\r
-    <OutputFileBasename>UsbMouseAbsolutePointerDxe</OutputFileBasename>\r
-  </ModuleDefinitions>\r
-  <LibraryClassDefinitions>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>ReportStatusCodeLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>BaseMemoryLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>UefiDriverEntryPoint</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>UefiBootServicesTableLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>UefiLib</Keyword>\r
-    </LibraryClass>\r
-    <LibraryClass Usage="ALWAYS_CONSUMED">\r
-      <Keyword>MemoryAllocationLib</Keyword>\r
-    </LibraryClass>\r
-  </LibraryClassDefinitions>\r
-  <SourceFiles>\r
-    <Filename>UsbMouseAbsolutePointer.h</Filename>\r
-    <Filename>mousehid.c</Filename>\r
-    <Filename>UsbMouseAbsolutePointer.c</Filename>\r
-    <Filename>ComponentName.c</Filename>\r
-    <Filename>mousehid.h</Filename>\r
-  </SourceFiles>\r
-  <PackageDependencies>\r
-    <Package PackageGuid="1E73767F-8F52-4603-AEB4-F29B510B6766"/>\r
-    <Package PackageGuid="2759ded5-bb57-4b06-af4f-c398fa552719"/>\r
-  </PackageDependencies>\r
-  <Protocols>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiAbsolutePointerProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiDevicePathProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
-    <Protocol Usage="ALWAYS_CONSUMED">\r
-      <ProtocolCName>gEfiUsbIoProtocolGuid</ProtocolCName>\r
-    </Protocol>\r
-  </Protocols>\r
-  <Externs>\r
-    <Specification>EFI_SPECIFICATION_VERSION 0x00020000</Specification>\r
-    <Specification>EDK_RELEASE_VERSION 0x00020000</Specification>\r
-    <Extern>\r
-      <ModuleEntryPoint>USBMouseAbsolutePointerDriverBindingEntryPoint</ModuleEntryPoint>\r
-    </Extern>\r
-  </Externs>\r
-</ModuleSurfaceArea>
\ No newline at end of file
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.c b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.c
deleted file mode 100644 (file)
index 1d2721c..0000000
+++ /dev/null
@@ -1,362 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004, 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
-http://opensource.org/licenses/bsd-license.php\r
-\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:\r
-\r
-  Mousehid.c\r
-\r
-Abstract:\r
-  Parse mouse hid descriptor\r
-\r
-\r
-**/\r
-\r
-#include "mousehid.h"\r
-\r
-\r
-//\r
-// Get an item from report descriptor\r
-//\r
-\r
-/**\r
-  Get Next Item\r
-\r
-  @param  StartPos          Start Position\r
-  @param  EndPos            End Position\r
-  @param  HidItem           HidItem to return\r
-\r
-  @return Position\r
-\r
-**/\r
-STATIC\r
-UINT8 *\r
-GetNextItem (\r
-  IN  UINT8    *StartPos,\r
-  IN  UINT8    *EndPos,\r
-  OUT HID_ITEM *HidItem\r
-  )\r
-{\r
-  UINT8 Temp;\r
-\r
-  if ((EndPos - StartPos) <= 0) {\r
-    return NULL;\r
-  }\r
-\r
-  Temp = *StartPos;\r
-  StartPos++;\r
-  //\r
-  // bit 2,3\r
-  //\r
-  HidItem->Type = (UINT8) ((Temp >> 2) & 0x03);\r
-  //\r
-  // bit 4-7\r
-  //\r
-  HidItem->Tag = (UINT8) ((Temp >> 4) & 0x0F);\r
-\r
-  if (HidItem->Tag == HID_ITEM_TAG_LONG) {\r
-    //\r
-    // Long Items are not supported by HID rev1.0,\r
-    // although we try to parse it.\r
-    //\r
-    HidItem->Format = HID_ITEM_FORMAT_LONG;\r
-\r
-    if ((EndPos - StartPos) >= 2) {\r
-      HidItem->Size = *StartPos++;\r
-      HidItem->Tag  = *StartPos++;\r
-\r
-      if ((EndPos - StartPos) >= HidItem->Size) {\r
-        HidItem->Data.LongData = StartPos;\r
-        StartPos += HidItem->Size;\r
-        return StartPos;\r
-      }\r
-    }\r
-  } else {\r
-    HidItem->Format = HID_ITEM_FORMAT_SHORT;\r
-    //\r
-    // bit 0, 1\r
-    //\r
-    HidItem->Size   = (UINT8) (Temp & 0x03);\r
-    switch (HidItem->Size) {\r
-\r
-    case 0:\r
-      //\r
-      // No data\r
-      //\r
-      return StartPos;\r
-\r
-    case 1:\r
-      //\r
-      // One byte data\r
-      //\r
-      if ((EndPos - StartPos) >= 1) {\r
-        HidItem->Data.U8 = *StartPos++;\r
-        return StartPos;\r
-      }\r
-\r
-    case 2:\r
-      //\r
-      // Two byte data\r
-      //\r
-      if ((EndPos - StartPos) >= 2) {\r
-        CopyMem (&HidItem->Data.U16, StartPos, sizeof (UINT16));\r
-        StartPos += 2;\r
-        return StartPos;\r
-      }\r
-\r
-    case 3:\r
-      //\r
-      // 4 byte data, adjust size\r
-      //\r
-      HidItem->Size++;\r
-      if ((EndPos - StartPos) >= 4) {\r
-        CopyMem (&HidItem->Data.U32, StartPos, sizeof (UINT32));\r
-        StartPos += 4;\r
-        return StartPos;\r
-      }\r
-    }\r
-  }\r
-\r
-  return NULL;\r
-}\r
-\r
-\r
-/**\r
-  Get Item Data\r
-\r
-  @param  HidItem           HID_ITEM\r
-\r
-  @return HidItem Data\r
-\r
-**/\r
-STATIC\r
-UINT32\r
-GetItemData (\r
-  IN  HID_ITEM *HidItem\r
-  )\r
-{\r
-  //\r
-  // Get Data from HID_ITEM structure\r
-  //\r
-  switch (HidItem->Size) {\r
-\r
-  case 1:\r
-    return HidItem->Data.U8;\r
-\r
-  case 2:\r
-    return HidItem->Data.U16;\r
-\r
-  case 4:\r
-    return HidItem->Data.U32;\r
-  }\r
-\r
-  return 0;\r
-}\r
-\r
-\r
-/**\r
-  Parse Local Item\r
-\r
-  @param  UsbMouseAbsolutePointer          USB_MOUSE_ABSOLUTE_POINTER_DEV\r
-  @param  LocalItem         Local Item\r
-\r
-\r
-**/\r
-STATIC\r
-VOID\r
-ParseLocalItem (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  HID_ITEM        *LocalItem\r
-  )\r
-{\r
-  UINT32  Data;\r
-\r
-  if (LocalItem->Size == 0) {\r
-    //\r
-    // No expected data for local item\r
-    //\r
-    return ;\r
-  }\r
-\r
-  Data = GetItemData (LocalItem);\r
-\r
-  switch (LocalItem->Tag) {\r
-\r
-  case HID_LOCAL_ITEM_TAG_DELIMITER:\r
-    //\r
-    // we don't support delimiter here\r
-    //\r
-    return ;\r
-\r
-  case HID_LOCAL_ITEM_TAG_USAGE:\r
-    return ;\r
-\r
-  case HID_LOCAL_ITEM_TAG_USAGE_MINIMUM:\r
-    if (UsbMouseAbsolutePointer->PrivateData.ButtonDetected) {\r
-      UsbMouseAbsolutePointer->PrivateData.ButtonMinIndex = (UINT8) Data;\r
-    }\r
-\r
-    return ;\r
-\r
-  case HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM:\r
-    {\r
-      if (UsbMouseAbsolutePointer->PrivateData.ButtonDetected) {\r
-        UsbMouseAbsolutePointer->PrivateData.ButtonMaxIndex = (UINT8) Data;\r
-      }\r
-\r
-      return ;\r
-    }\r
-  }\r
-}\r
-\r
-STATIC\r
-VOID\r
-ParseGlobalItem (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  HID_ITEM        *GlobalItem\r
-  )\r
-{\r
-  UINT8 UsagePage;\r
-\r
-  switch (GlobalItem->Tag) {\r
-  case HID_GLOBAL_ITEM_TAG_USAGE_PAGE:\r
-    {\r
-      UsagePage = (UINT8) GetItemData (GlobalItem);\r
-\r
-      //\r
-      // We only care Button Page here\r
-      //\r
-      if (UsagePage == 0x09) {\r
-        //\r
-        // Button Page\r
-        //\r
-        UsbMouseAbsolutePointer->PrivateData.ButtonDetected = TRUE;\r
-        return ;\r
-      }\r
-      break;\r
-    }\r
-\r
-  }\r
-}\r
-\r
-\r
-\r
-/**\r
-  Parse Main Item\r
-\r
-  @param  UsbMouseAbsolutePointer   USB_MOUSE_ABSOLUTE_POINTER_DEV\r
-  @param  MainItem          HID_ITEM to parse\r
-\r
-  @return VOID\r
-\r
-**/\r
-STATIC\r
-VOID\r
-ParseMainItem (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  HID_ITEM        *MainItem\r
-  )\r
-{\r
-  //\r
-  // we don't care any main items, just skip\r
-  //\r
-  return ;\r
-}\r
-\r
-\r
-/**\r
-  Parse Hid Item\r
-\r
-  @param  UsbMouseAbsolutePointer          USB_MOUSE_ABSOLUTE_POINTER_DEV\r
-  @param  HidItem           HidItem to parse\r
-\r
-  @return VOID\r
-\r
-**/\r
-STATIC\r
-VOID\r
-ParseHidItem (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  HID_ITEM        *HidItem\r
-  )\r
-{\r
-  switch (HidItem->Type) {\r
-\r
-  case HID_ITEM_TYPE_MAIN:\r
-    //\r
-    // For Main Item, parse main item\r
-    //\r
-    ParseMainItem (UsbMouseAbsolutePointer, HidItem);\r
-    break;\r
-\r
-  case HID_ITEM_TYPE_GLOBAL:\r
-    //\r
-    // For global Item, parse global item\r
-    //\r
-    ParseGlobalItem (UsbMouseAbsolutePointer, HidItem);\r
-    break;\r
-\r
-  case HID_ITEM_TYPE_LOCAL:\r
-    //\r
-    // For Local Item, parse local item\r
-    //\r
-    ParseLocalItem (UsbMouseAbsolutePointer, HidItem);\r
-    break;\r
-  }\r
-}\r
-//\r
-// A simple parse just read some field we are interested in\r
-//\r
-\r
-/**\r
-  Parse Mouse Report Descriptor\r
-\r
-  @param  UsbMouse          USB_MOUSE_DEV\r
-  @param  ReportDescriptor  Report descriptor to parse\r
-  @param  ReportSize        Report descriptor size\r
-\r
-  @retval EFI_DEVICE_ERROR  Report descriptor error\r
-  @retval EFI_SUCCESS       Success\r
-\r
-**/\r
-EFI_STATUS\r
-ParseMouseReportDescriptor (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  UINT8           *ReportDescriptor,\r
-  IN  UINTN           ReportSize\r
-  )\r
-{\r
-  UINT8     *DescriptorEnd;\r
-  UINT8     *ptr;\r
-  HID_ITEM  HidItem;\r
-\r
-  DescriptorEnd = ReportDescriptor + ReportSize;\r
-\r
-  ptr           = GetNextItem (ReportDescriptor, DescriptorEnd, &HidItem);\r
-\r
-  while (ptr != NULL) {\r
-    if (HidItem.Format != HID_ITEM_FORMAT_SHORT) {\r
-      //\r
-      // Long Format Item is not supported at current HID revision\r
-      //\r
-      return EFI_DEVICE_ERROR;\r
-    }\r
-\r
-    ParseHidItem (UsbMouseAbsolutePointer, &HidItem);\r
-\r
-    ptr = GetNextItem (ptr, DescriptorEnd, &HidItem);\r
-  }\r
-\r
-  UsbMouseAbsolutePointer->NumberOfButtons                 = (UINT8) (UsbMouseAbsolutePointer->PrivateData.ButtonMaxIndex - UsbMouseAbsolutePointer->PrivateData.ButtonMinIndex + 1);\r
-  UsbMouseAbsolutePointer->XLogicMax                       = UsbMouseAbsolutePointer->YLogicMax = 1023;\r
-  UsbMouseAbsolutePointer->XLogicMin                       = UsbMouseAbsolutePointer->YLogicMin = -1023;\r
-\r
-  return EFI_SUCCESS;\r
-}\r
diff --git a/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.h b/edk2/MdeModulePkg/Bus/Usb/UsbMouseSimulateTouchPadDxe/mousehid.h
deleted file mode 100644 (file)
index 4c4a233..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/** @file\r
-\r
-Copyright (c) 2004, 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
-http://opensource.org/licenses/bsd-license.php\r
-\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:\r
-\r
-  MouseHid.h\r
-\r
-Abstract:\r
-\r
-\r
-**/\r
-\r
-#ifndef __MOUSE_HID_H\r
-#define __MOUSE_HID_H\r
-\r
-#include "UsbMouseAbsolutePointer.h"\r
-\r
-//\r
-// HID Item general structure\r
-//\r
-typedef struct _hid_item {\r
-  UINT16  Format;\r
-  UINT8   Size;\r
-  UINT8   Type;\r
-  UINT8   Tag;\r
-  union {\r
-    UINT8   U8;\r
-    UINT16  U16;\r
-    UINT32  U32;\r
-    INT8    I8;\r
-    INT16   I16;\r
-    INT32   I32;\r
-    UINT8   *LongData;\r
-  } Data;\r
-} HID_ITEM;\r
-\r
-typedef struct {\r
-  UINT16  UsagePage;\r
-  INT32   LogicMin;\r
-  INT32   LogicMax;\r
-  INT32   PhysicalMin;\r
-  INT32   PhysicalMax;\r
-  UINT16  UnitExp;\r
-  UINT16 UINT;\r
-  UINT16 ReportId;\r
-  UINT16 ReportSize;\r
-  UINT16 ReportCount;\r
-} HID_GLOBAL;\r
-\r
-typedef struct {\r
-  UINT16  Usage[16];  /* usage array */\r
-  UINT16  UsageIndex;\r
-  UINT16  UsageMin;\r
-} HID_LOCAL;\r
-\r
-typedef struct {\r
-  UINT16  Type;\r
-  UINT16  Usage;\r
-} HID_COLLECTION;\r
-\r
-typedef struct {\r
-  HID_GLOBAL      Global;\r
-  HID_GLOBAL      GlobalStack[8];\r
-  UINT32          GlobalStackPtr;\r
-  HID_LOCAL       Local;\r
-  HID_COLLECTION  CollectionStack[8];\r
-  UINT32          CollectionStackPtr;\r
-} HID_PARSER;\r
-\r
-EFI_STATUS\r
-ParseMouseReportDescriptor (\r
-  IN  USB_MOUSE_ABSOLUTE_POINTER_DEV   *UsbMouseAbsolutePointer,\r
-  IN  UINT8           *ReportDescriptor,\r
-  IN  UINTN           ReportSize\r
-  );\r
-\r
-#endif\r