]> git.proxmox.com Git - mirror_edk2.git/blobdiff - SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Internal.h
Use MaxPacketSize as the initial buffer size to read data.
[mirror_edk2.git] / SourceLevelDebugPkg / Library / DebugCommunicationLibUsb3 / DebugCommunicationLibUsb3Internal.h
index 2f2025075a11438e8d67e4309ac4450ea4cd67a8..9190853c568282c91f78d52cb9d55b7eb58f1277 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Debug Port Library implementation based on usb3 debug port.\r
 \r
-  Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2015, 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
 #include <Library/TimerLib.h>\r
 #include <Library/DebugCommunicationLib.h>\r
 #include <Library/PciLib.h>\r
-#include <Library/SerialPortLib.h>      // Todo: remove in future\r
-\r
-//\r
-// Internal serial debug - remove finally\r
-//\r
-#include <Library/SerialPortLib.h>\r
-#include <Library/PrintLib.h>\r
 \r
 //\r
 // USB Debug GUID value\r
 #define USB3DBG_ENABLED       2   // The XHCI debug device is enabled\r
 #define USB3DBG_NOT_ENABLED   4   // The XHCI debug device is not enabled\r
 \r
-#define USB3_DEBUG_PORT_MAX_PACKET_SIZE 0x08\r
+#define USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE 0x08\r
+\r
+//\r
+// MaxPacketSize for DbC Endpoint Descriptor IN and OUT\r
+//\r
+#define XHCI_DEBUG_DEVICE_MAX_PACKET_SIZE    0x400\r
 \r
 #define XHCI_DEBUG_DEVICE_VENDOR_ID   0x0525\r
 #define XHCI_DEBUG_DEVICE_PRODUCT_ID  0x127A\r
 \r
 #define XHC_USBSTS_HALT               BIT0\r
 \r
-//\r
-// Transfer the data of 8 bytes each time\r
-//\r
-#define XHC_DEBUG_PORT_DATA_LENGTH   8\r
-\r
 //\r
 // Indicate the timeout when data is transferred in microsecond. 0 means infinite timeout.\r
 //\r
@@ -528,9 +521,9 @@ typedef struct _USB3_DEBUG_PORT_INSTANCE {
   //\r
   UINT8                                   DataCount;\r
   //\r
-  // The data buffer. Maximum length is 8 bytes.\r
+  // The data buffer address for data read and poll.\r
   //\r
-  UINT8                                   Data[8];\r
+  EFI_PHYSICAL_ADDRESS                    Data;\r
   //\r
   // Timter settings\r
   //\r