From nobody Mon Dec 23 05:44:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 152102005053860.25992775959605; Wed, 14 Mar 2018 02:34:10 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7358C2256862C; Wed, 14 Mar 2018 02:27:45 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 06ACC224CCC15 for ; Wed, 14 Mar 2018 02:27:42 -0700 (PDT) Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 02:34:04 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by orsmga007.jf.intel.com with ESMTP; 14 Mar 2018 02:34:03 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,469,1515484800"; d="scan'208";a="24534659" From: Star Zeng To: edk2-devel@lists.01.org Date: Wed, 14 Mar 2018 17:33:55 +0800 Message-Id: <1521020038-102684-4-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1521020038-102684-1-git-send-email-star.zeng@intel.com> References: <1521020038-102684-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH V2 3/6] Revert "DebugUsb3: Support IOMMU" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Hao Wu , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This reverts commit de8373fa07f87ca735139bb86c51e2c29fb1d956. Cc: Ruiyu Ni Cc: Hao Wu Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- .../DebugCommunicationLibUsb3Common.c | 222 ++++++----- .../DebugCommunicationLibUsb3Dxe.c | 435 +----------------= ---- .../DebugCommunicationLibUsb3Dxe.inf | 12 +- .../DebugCommunicationLibUsb3Internal.h | 60 +-- .../DebugCommunicationLibUsb3Pei.c | 234 +---------- .../DebugCommunicationLibUsb3Pei.inf | 8 +- 6 files changed, 129 insertions(+), 842 deletions(-) diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Common.c b/SourceLevelDebugPkg/Library/DebugCommunicationL= ibUsb3/DebugCommunicationLibUsb3Common.c index 87fb0265489b..49bad6b5864d 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Common.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Common.c @@ -14,6 +14,11 @@ =20 #include "DebugCommunicationLibUsb3Internal.h" =20 +// +// The global variable which can be used after memory is ready. +// +USB3_DEBUG_PORT_HANDLE mDebugCommunicationLibUsb3DebugPortHandle; + UINT16 mString0Desc[] =3D { // String Descriptor Type + Length ( USB_DESC_TYPE_STRING << 8 ) + STRING0_DESC_LEN, @@ -80,7 +85,7 @@ XhcClearR32Bit( Write the data to the XHCI debug register. =20 @param Handle Debug port handle. - @param Offset The offset of the debug register. + @param Offset The offset of the runtime register. @param Data The data to write. =20 **/ @@ -124,16 +129,16 @@ XhcReadDebugReg ( } =20 /** - Set one bit of the debug register while keeping other bits. + Set one bit of the runtime register while keeping other bits. =20 @param Handle Debug port handle. - @param Offset The offset of the debug register. + @param Offset The offset of the runtime register. @param Bit The bit mask of the register to set. =20 **/ VOID XhcSetDebugRegBit ( - IN USB3_DEBUG_PORT_HANDLE *Handle, + IN USB3_DEBUG_PORT_HANDLE *Handle, IN UINT32 Offset, IN UINT32 Bit ) @@ -146,28 +151,6 @@ XhcSetDebugRegBit ( } =20 /** - Clear one bit of the debug register while keeping other bits. - - @param Handle Debug port handle. - @param Offset The offset of the debug register. - @param Bit The bit mask of the register to clear. - -**/ -VOID -XhcClearDebugRegBit ( - IN USB3_DEBUG_PORT_HANDLE *Handle, - IN UINT32 Offset, - IN UINT32 Bit - ) -{ - UINT32 Data; - - Data =3D XhcReadDebugReg (Handle, Offset); - Data &=3D ~Bit; - XhcWriteDebugReg (Handle, Offset, Data); -} - -/** Program and eanble XHCI MMIO base address. =20 @return XHCI MMIO base address. @@ -216,7 +199,7 @@ UpdateXhcResource ( IN EFI_PHYSICAL_ADDRESS XhciMmioBase ) { - if (Handle =3D=3D NULL) { + if ((Handle =3D=3D NULL) || (Handle->XhciMmioBase =3D=3D XhciMmioBase)) { return; } =20 @@ -233,7 +216,7 @@ UpdateXhcResource ( =20 @param Handle Debug port handle. =20 - @retval RETURN_UNSUPPORTED The usb host controller does not support usb = debug port capability. + @retval RETURN_UNSUPPORTED The usb host controller does not supported us= b debug port capability. @retval RETURN_SUCCESS Get bar and offset successfully. =20 **/ @@ -253,14 +236,6 @@ CalculateUsbDebugPortMmioBase ( EFI_PHYSICAL_ADDRESS CapabilityPointer; UINT8 CapLength; =20 - if (Handle->Initialized !=3D USB3DBG_UNINITIALIZED) { - if (Handle->Initialized =3D=3D USB3DBG_NO_DBG_CAB) { - return RETURN_UNSUPPORTED; - } else { - return RETURN_SUCCESS; - } - } - VendorId =3D PciRead16 (PcdGet32(PcdUsbXhciPciAddress) + PCI_VENDOR_ID_O= FFSET); DeviceId =3D PciRead16 (PcdGet32(PcdUsbXhciPciAddress) + PCI_DEVICE_ID_O= FFSET); =20 @@ -313,7 +288,6 @@ CalculateUsbDebugPortMmioBase ( Handle->DebugCapabilityBase =3D CapabilityPointer; Handle->DebugCapabilityOffset =3D CapabilityPointer - Handle->XhciMmioBa= se; Handle->XhciOpRegister =3D Handle->XhciMmioBase + CapLength; - Handle->DebugSupport =3D TRUE; Handle->Initialized =3D USB3DBG_DBG_CAB; return RETURN_SUCCESS; =20 @@ -352,9 +326,6 @@ NeedReinitializeHardware( Dcctrl =3D XhcReadDebugReg (Handle, XHC_DC_DCCTRL); if ((Dcctrl & BIT0) =3D=3D 0) { Result =3D TRUE; - } else if (!Handle->Ready) { - Handle->Ready =3D TRUE; - Handle->Initialized =3D USB3DBG_ENABLED; } =20 return Result; @@ -707,13 +678,6 @@ InitializeUsbDebugHardware ( } =20 // - // Clear DCE bit and LSE bit in DCCTRL - // - if ((XhcReadDebugReg (Handle, XHC_DC_DCCTRL) & (BIT1|BIT31)) =3D=3D (BIT= 1|BIT31)) { - XhcClearDebugRegBit (Handle, XHC_DC_DCCTRL, BIT1|BIT31); - } - - // // Construct the buffer for read, poll and write. // Handle->UrbIn.Data =3D (EFI_PHYSICAL_ADDRESS)(UINTN) Buffer; @@ -782,35 +746,6 @@ Enable: } =20 /** - Discover and initialize usb debug port. - - @param Handle Debug port handle. - -**/ -VOID -DiscoverInitializeUsbDebugPort ( - IN USB3_DEBUG_PORT_HANDLE *Handle - ) -{ - EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS XhciMmioBase; - - // - // Read 64-bit MMIO base address - // - XhciMmioBase =3D ProgramXhciBaseAddress (); - Handle->XhciMmioBase =3D XhciMmioBase; - - Status =3D CalculateUsbDebugPortMmioBase (Handle); - if (!RETURN_ERROR (Status)) { - UpdateXhcResource (Handle, XhciMmioBase); - if (NeedReinitializeHardware (Handle)) { - InitializeUsbDebugHardware (Handle); - } - } -} - -/** Read data from debug device and save the data in buffer. =20 Reads NumberOfBytes data bytes from a debug device into the buffer @@ -837,6 +772,7 @@ DebugPortReadBuffer ( ) { USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; + RETURN_STATUS Status; UINT8 Index; UINT8 *Data; =20 @@ -844,17 +780,25 @@ DebugPortReadBuffer ( return 0; } =20 - UsbDebugPortHandle =3D GetUsb3DebugPortInstance (); - if (UsbDebugPortHandle =3D=3D NULL) { - return 0; + // + // If Handle is NULL, it means memory is ready for use. + // Use global variable to store handle value. + // + if (Handle =3D=3D NULL) { + UsbDebugPortHandle =3D &mDebugCommunicationLibUsb3DebugPortHandle; + } else { + UsbDebugPortHandle =3D (USB3_DEBUG_PORT_HANDLE *)Handle; } - - if (UsbDebugPortHandle->Initialized !=3D USB3DBG_ENABLED) { + =20 + if (UsbDebugPortHandle->Initialized =3D=3D USB3DBG_NO_DBG_CAB) { return 0; } - - if (UsbDebugPortHandle->InNotify) { - return 0; + =20 + if (NeedReinitializeHardware(UsbDebugPortHandle)) { + Status =3D InitializeUsbDebugHardware (UsbDebugPortHandle); + if (RETURN_ERROR(Status)) { + return 0; + } } =20 Data =3D (UINT8 *)(UINTN)UsbDebugPortHandle->Data; @@ -904,8 +848,10 @@ DebugPortWriteBuffer ( ) { USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; + RETURN_STATUS Status; UINTN Sent; UINTN Total; + EFI_PHYSICAL_ADDRESS XhciMmioBase; UINTN Index; =20 if (NumberOfBytes =3D=3D 0 || Buffer =3D=3D NULL) { @@ -915,24 +861,39 @@ DebugPortWriteBuffer ( Sent =3D 0; Total =3D 0; =20 - UsbDebugPortHandle =3D GetUsb3DebugPortInstance (); - if (UsbDebugPortHandle =3D=3D NULL) { - return 0; + // + // If Handle is NULL, it means memory is ready for use. + // Use global variable to store handle value. + // + if (Handle =3D=3D NULL) { + UsbDebugPortHandle =3D &mDebugCommunicationLibUsb3DebugPortHandle; + } else { + UsbDebugPortHandle =3D (USB3_DEBUG_PORT_HANDLE *)Handle; } - - if (UsbDebugPortHandle->Initialized !=3D USB3DBG_ENABLED) { + =20 + if (UsbDebugPortHandle->Initialized =3D=3D USB3DBG_NO_DBG_CAB) { return 0; } =20 - if (UsbDebugPortHandle->InNotify) { - return 0; + // + // MMIO base address is possible to clear, set it if it is cleared. (Xhc= iMemorySpaceClose in PchUsbCommon.c) + // + XhciMmioBase =3D ProgramXhciBaseAddress (); + + UpdateXhcResource (UsbDebugPortHandle, XhciMmioBase); + + if (NeedReinitializeHardware(UsbDebugPortHandle)) { + Status =3D InitializeUsbDebugHardware (UsbDebugPortHandle); + if (RETURN_ERROR(Status)) { + return 0; + } } =20 // // When host is trying to send data, write will be blocked. // Poll to see if there is any data sent by host at first. // - DebugPortPollBuffer (UsbDebugPortHandle); + DebugPortPollBuffer (Handle); =20 Index =3D 0; while ((Total < NumberOfBytes)) { @@ -941,7 +902,7 @@ DebugPortWriteBuffer ( } else { Sent =3D (UINT8)(NumberOfBytes - Total); } - XhcDataTransfer (UsbDebugPortHandle, EfiUsbDataOut, Buffer + Total, &S= ent, DATA_TRANSFER_WRITE_TIMEOUT); + Status =3D XhcDataTransfer (UsbDebugPortHandle, EfiUsbDataOut, Buffer = + Total, &Sent, DATA_TRANSFER_WRITE_TIMEOUT); Total +=3D Sent; } =20 @@ -969,20 +930,33 @@ DebugPortPollBuffer ( { USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; UINTN Length; + RETURN_STATUS Status; + EFI_PHYSICAL_ADDRESS XhciMmioBase; =20 - UsbDebugPortHandle =3D GetUsb3DebugPortInstance (); - if (UsbDebugPortHandle =3D=3D NULL) { - return FALSE; + // + // If Handle is NULL, it means memory is ready for use. + // Use global variable to store handle value. + // + if (Handle =3D=3D NULL) { + UsbDebugPortHandle =3D &mDebugCommunicationLibUsb3DebugPortHandle; + } else { + UsbDebugPortHandle =3D (USB3_DEBUG_PORT_HANDLE *)Handle; } =20 - if (UsbDebugPortHandle->Initialized !=3D USB3DBG_ENABLED) { - return FALSE; + if (UsbDebugPortHandle->Initialized =3D=3D USB3DBG_NO_DBG_CAB) { + return 0; } =20 - if (UsbDebugPortHandle->InNotify) { - return FALSE; + XhciMmioBase =3D ProgramXhciBaseAddress (); + UpdateXhcResource (UsbDebugPortHandle, XhciMmioBase); + =20 + if (NeedReinitializeHardware(UsbDebugPortHandle)) { + Status =3D InitializeUsbDebugHardware(UsbDebugPortHandle); + if (RETURN_ERROR(Status)) { + return FALSE; + } } - + =20 // // If the data buffer is not empty, then return TRUE directly. // Otherwise initialize a usb read transaction and read data to internal= data buffer. @@ -995,7 +969,7 @@ DebugPortPollBuffer ( // Read data as much as we can // Length =3D XHCI_DEBUG_DEVICE_MAX_PACKET_SIZE; - XhcDataTransfer (UsbDebugPortHandle, EfiUsbDataIn, (VOID *)(UINTN)UsbDeb= ugPortHandle->Data, &Length, DATA_TRANSFER_POLL_TIMEOUT); + XhcDataTransfer (Handle, EfiUsbDataIn, (VOID *)(UINTN)UsbDebugPortHandle= ->Data, &Length, DATA_TRANSFER_POLL_TIMEOUT); =20 if (Length > XHCI_DEBUG_DEVICE_MAX_PACKET_SIZE) { return FALSE; @@ -1043,16 +1017,50 @@ DebugPortInitialize ( IN DEBUG_PORT_CONTINUE Function ) { + RETURN_STATUS Status; + USB3_DEBUG_PORT_HANDLE Handle; USB3_DEBUG_PORT_HANDLE *UsbDebugPortHandle; =20 - UsbDebugPortHandle =3D GetUsb3DebugPortInstance (); - if (UsbDebugPortHandle =3D=3D NULL) { - return NULL; + // + // Validate the PCD PcdDebugPortHandleBufferSize value=20 + // + ASSERT (PcdGet16 (PcdDebugPortHandleBufferSize) =3D=3D sizeof (USB3_DEBU= G_PORT_HANDLE)); + + if (Function =3D=3D NULL && Context !=3D NULL) { + UsbDebugPortHandle =3D (USB3_DEBUG_PORT_HANDLE *)Context; + } else { + ZeroMem(&Handle, sizeof (USB3_DEBUG_PORT_HANDLE)); + UsbDebugPortHandle =3D &Handle; } =20 + if (Function =3D=3D NULL && Context !=3D NULL) { + return (DEBUG_PORT_HANDLE *) Context; + } + =20 + // + // Read 64-bit MMIO base address + // + UsbDebugPortHandle->XhciMmioBase =3D ProgramXhciBaseAddress (); + + Status =3D CalculateUsbDebugPortMmioBase (UsbDebugPortHandle); + if (RETURN_ERROR (Status)) { + goto Exit; + } + + if (NeedReinitializeHardware(&Handle)) { + Status =3D InitializeUsbDebugHardware (&Handle); + if (RETURN_ERROR(Status)) { + goto Exit; + } + } + +Exit: + if (Function !=3D NULL) { - Function (Context, UsbDebugPortHandle); + Function (Context, &Handle); + } else { + CopyMem(&mDebugCommunicationLibUsb3DebugPortHandle, &Handle, sizeof (U= SB3_DEBUG_PORT_HANDLE)); } =20 - return (DEBUG_PORT_HANDLE)(UINTN)UsbDebugPortHandle; + return (DEBUG_PORT_HANDLE)(UINTN)&mDebugCommunicationLibUsb3DebugPortHan= dle; } diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Dxe.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibU= sb3/DebugCommunicationLibUsb3Dxe.c index 1582b9a8d6de..c4a8a4768299 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.c @@ -1,7 +1,7 @@ /** @file Debug Port Library implementation based on usb3 debug port. =20 - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -15,331 +15,8 @@ #include #include #include -#include -#include -#include #include "DebugCommunicationLibUsb3Internal.h" =20 -GUID gUsb3DbgGuid =3D USB3_DBG_GUID; - -USB3_DEBUG_PORT_HANDLE *mUsb3Instance =3D NULL; - -/** - Creates a named event that can be signaled. - - This function creates an event using NotifyTpl, NoifyFunction. - If Name is NULL, then ASSERT(). - If NotifyTpl is not a legal TPL value, then ASSERT(). - If NotifyFunction is NULL, then ASSERT(). - - @param Name Supplies the GUID name of the event. - @param NotifyTpl Supplies the task priority level of the ev= ent notifications. - @param NotifyFunction Supplies the function to notify when the e= vent is signaled. - @param Event A pointer to the event created. - - @retval EFI_SUCCESS A named event was created. - @retval EFI_OUT_OF_RESOURCES There are not enough resource to create th= e named event. - -**/ -EFI_STATUS -EFIAPI -Usb3NamedEventListen ( - IN CONST EFI_GUID *Name, - IN EFI_TPL NotifyTpl, - IN EFI_EVENT_NOTIFY NotifyFunction, - IN EFI_EVENT *Event - ) -{ - EFI_STATUS Status; - VOID *RegistrationLocal; - - ASSERT (Name !=3D NULL); - ASSERT (NotifyFunction !=3D NULL); - ASSERT (NotifyTpl <=3D TPL_HIGH_LEVEL); - - // - // Create event - // - Status =3D gBS->CreateEvent ( - EVT_NOTIFY_SIGNAL, - NotifyTpl, - NotifyFunction, - NULL, - Event - ); - ASSERT_EFI_ERROR (Status); - - // - // Register for an installation of protocol interface - // - Status =3D gBS->RegisterProtocolNotify ( - (EFI_GUID *) Name, - *Event, - &RegistrationLocal - ); - ASSERT_EFI_ERROR (Status); - - return Status; -} - -/** - USB3 map one DMA buffer. - - @param Instance Pointer to USB3 debug port instance. - @param PciIo Pointer to PciIo for USB3 debug port. - @param Address DMA buffer address to be mapped. - @param NumberOfBytes Number of bytes to be mapped. - @param BackupBuffer Backup buffer address. - -**/ -VOID -Usb3MapOneDmaBuffer ( - IN USB3_DEBUG_PORT_HANDLE *Instance, - IN EFI_PCI_IO_PROTOCOL *PciIo, - IN EFI_PHYSICAL_ADDRESS Address, - IN UINTN NumberOfBytes, - IN EFI_PHYSICAL_ADDRESS BackupBuffer - ) -{ - EFI_STATUS Status; - VOID *HostAddress; - EFI_PHYSICAL_ADDRESS DeviceAddress; - VOID *Mapping; - - HostAddress =3D (VOID *) (UINTN) Address; - Status =3D PciIo->Map ( - PciIo, - EfiPciIoOperationBusMasterCommonBuffer, - HostAddress, - &NumberOfBytes, - &DeviceAddress, - &Mapping - ); - ASSERT_EFI_ERROR (Status); - ASSERT (DeviceAddress =3D=3D ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress= )); - if (Instance->FromHob) { - // - // Reallocate the DMA buffer by AllocateAddress with - // the memory type accessible by SMM. - // - CopyMem ((VOID *) (UINTN) BackupBuffer, (VOID *) (UINTN) Address, Numb= erOfBytes); - Status =3D gBS->FreePages (Address, EFI_SIZE_TO_PAGES (NumberOfBytes)); - ASSERT_EFI_ERROR (Status); - Status =3D gBS->AllocatePages ( - AllocateAddress, - EfiACPIMemoryNVS, - EFI_SIZE_TO_PAGES (NumberOfBytes), - &Address - ); - ASSERT_EFI_ERROR (Status); - CopyMem ((VOID *) (UINTN) Address, (VOID *) (UINTN) BackupBuffer, Numb= erOfBytes); - } -} - -/** - USB3 map DMA buffers. - - @param Instance Pointer to USB3 debug port instance. - @param PciIo Pointer to PciIo for USB3 debug port. - -**/ -VOID -Usb3MapDmaBuffers ( - IN USB3_DEBUG_PORT_HANDLE *Instance, - IN EFI_PCI_IO_PROTOCOL *PciIo - ) -{ - EFI_STATUS Status; - EDKII_IOMMU_PROTOCOL *IoMmu; - EFI_PHYSICAL_ADDRESS BackupBuffer; - UINTN BackupBufferSize; - - IoMmu =3D NULL; - Status =3D gBS->LocateProtocol (&gEdkiiIoMmuProtocolGuid, NULL, (VOID **= ) &IoMmu); - if (EFI_ERROR (Status) || (IoMmu =3D=3D NULL)) { - // - // No need to map the DMA buffers. - // - return; - } - - // - // Allocate backup buffer for the case that the USB3 - // debug port instance and DMA buffers are from PEI HOB. - // For this case, the DMA buffers need to be reallocated - // by AllocateAddress with the memory type accessible by - // SMM. - // - BackupBufferSize =3D MAX (XHCI_DEBUG_DEVICE_MAX_PACKET_SIZE * 2 + USB3_D= EBUG_PORT_WRITE_MAX_PACKET_SIZE, - MAX (sizeof (TRB_TEMPLATE) * TR_RING_TRB_NUMBER, - MAX (sizeof (TRB_TEMPLATE) * EVENT_RING_TRB= _NUMBER, - MAX (sizeof (EVENT_RING_SEG_TABLE_ENTR= Y) * ERST_NUMBER, - MAX (sizeof (XHC_DC_CONTEXT), - STRING0_DESC_LEN + MANU_DESC= _LEN + PRODUCT_DESC_LEN + SERIAL_DESC_LEN))))); - - Status =3D gBS->AllocatePages ( - AllocateAnyPages, - EfiBootServicesData, - EFI_SIZE_TO_PAGES (BackupBufferSize), - &BackupBuffer - ); - ASSERT_EFI_ERROR (Status); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->UrbIn.Data, - XHCI_DEBUG_DEVICE_MAX_PACKET_SIZE * 2 + USB3_DEBUG_PORT_WRITE_MAX_PACK= ET_SIZE, - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->TransferRingIn.RingSeg0, - sizeof (TRB_TEMPLATE) * TR_RING_TRB_NUMBER, - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->TransferRingOut.RingSeg0, - sizeof (TRB_TEMPLATE) * TR_RING_TRB_NUMBER, - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->EventRing.EventRingSeg0, - sizeof (TRB_TEMPLATE) * EVENT_RING_TRB_NUMBER, - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->EventRing.ERSTBase, - sizeof (EVENT_RING_SEG_TABLE_ENTRY) * ERST_NUMBER, - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - Instance->DebugCapabilityContext, - sizeof (XHC_DC_CONTEXT), - BackupBuffer - ); - - Usb3MapOneDmaBuffer ( - Instance, - PciIo, - ((XHC_DC_CONTEXT *) (UINTN) Instance->DebugCapabilityContext)->DbcInfo= Context.String0DescAddress, - STRING0_DESC_LEN + MANU_DESC_LEN + PRODUCT_DESC_LEN + SERIAL_DESC_LEN, - BackupBuffer - ); - - gBS->FreePages (BackupBuffer, EFI_SIZE_TO_PAGES (BackupBufferSize)); -} - -/** - Invoke a notification event - - @param[in] Event Event whose notification function is b= eing invoked. - @param[in] Context The pointer to the notification functi= on's context, - which is implementation-dependent. - -**/ -VOID -EFIAPI -Usb3PciIoNotify ( - IN EFI_EVENT Event, - IN VOID *Context - ) -{ - EFI_STATUS Status; - UINTN PciIoHandleCount; - EFI_HANDLE *PciIoHandleBuffer; - UINTN Index; - EFI_PCI_IO_PROTOCOL *PciIo; - UINTN PciSegment; - UINTN PciBusNumber; - UINTN PciDeviceNumber; - UINTN PciFunctionNumber; - UINT32 PciAddress; - - ASSERT (mUsb3Instance !=3D NULL); - - Status =3D gBS->LocateHandleBuffer ( - ByProtocol, - &gEfiPciIoProtocolGuid, - NULL, - &PciIoHandleCount, - &PciIoHandleBuffer - ); - if (!EFI_ERROR (Status) && - (PciIoHandleBuffer !=3D NULL) && - (PciIoHandleCount !=3D 0)) {=20 - for (Index =3D 0; Index < PciIoHandleCount; Index++) { - Status =3D gBS->HandleProtocol ( - PciIoHandleBuffer[Index], - &gEfiPciIoProtocolGuid, - (VOID **) &PciIo - ); - ASSERT_EFI_ERROR (Status); - Status =3D PciIo->GetLocation (PciIo, &PciSegment, &PciBusNumber, &P= ciDeviceNumber, &PciFunctionNumber); - ASSERT_EFI_ERROR (Status); - PciAddress =3D (UINT32) ((PciBusNumber << 20) | (PciDeviceNumber << = 15) | (PciFunctionNumber << 12)); - if (PciAddress =3D=3D PcdGet32(PcdUsbXhciPciAddress)) { - // - // Found the PciIo for USB3 debug port. - // - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); - mUsb3Instance->InNotify =3D TRUE; - Usb3MapDmaBuffers (mUsb3Instance, PciIo); - mUsb3Instance->InNotify =3D FALSE; - gBS->CloseEvent ((EFI_EVENT) (UINTN) mUsb3Instance->PciIoEvent); - break; - } - } - - gBS->FreePool (PciIoHandleBuffer); - } -} - -/** - Return USB3 debug instance address. - -**/ =20 -USB3_DEBUG_PORT_HANDLE * -GetUsb3DebugPortInstance ( - VOID - ) -{ - USB3_DEBUG_PORT_HANDLE *Instance; - EFI_PEI_HOB_POINTERS Hob; - - Instance =3D NULL; - - if (mUsb3Instance !=3D NULL) { - Instance =3D mUsb3Instance; - goto Done; - } - - Hob.Raw =3D GetFirstGuidHob (&gUsb3DbgGuid); - if (Hob.Raw !=3D NULL) { - Instance =3D GET_GUID_HOB_DATA (Hob.Guid); - } - -Done: - if (Instance !=3D NULL) { - DiscoverInitializeUsbDebugPort (Instance); - } - return Instance; -} - /** Allocate aligned memory for XHC's usage. =20 @@ -374,113 +51,3 @@ AllocateAlignBuffer ( =20 return Buf; } - -/** - The constructor function initialize USB3 debug port. - - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -DebugCommunicationUsb3DxeConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - USB3_DEBUG_PORT_HANDLE UsbDbg; - USB3_DEBUG_PORT_HANDLE *Instance; - EFI_PHYSICAL_ADDRESS Address; - EFI_STATUS Status; - EFI_EVENT Event; - - Instance =3D GetUsb3DebugPortInstance (); - - Status =3D EfiGetSystemConfigurationTable (&gUsb3DbgGuid, (VOID **) &mUs= b3Instance); - if (!EFI_ERROR (Status)) { - goto Done; - } - - if (Instance =3D=3D NULL) { - // - // Initialize USB debug - // - ZeroMem (&UsbDbg, sizeof (UsbDbg)); - UsbDbg.Initialized =3D USB3DBG_UNINITIALIZED; - - DiscoverInitializeUsbDebugPort (&UsbDbg); - - Instance =3D &UsbDbg; - } - - // - // It is first time to run DXE instance, copy Instance from Hob to ACPIN= vs. - // - Address =3D SIZE_4GB; - Status =3D gBS->AllocatePages ( - AllocateMaxAddress, - EfiACPIMemoryNVS, - EFI_SIZE_TO_PAGES (sizeof (USB3_DEBUG_PORT_HANDLE)), - &Address - ); - if (EFI_ERROR (Status)) { - return Status; - } - - CopyMem ( - (VOID *)(UINTN)Address, - Instance, - sizeof (USB3_DEBUG_PORT_HANDLE) - ); - mUsb3Instance =3D (USB3_DEBUG_PORT_HANDLE *)(UINTN)Address; - - Status =3D gBS->InstallConfigurationTable (&gUsb3DbgGuid, mUsb3Instance); - if (EFI_ERROR (Status)) { - return Status; - } - -Done: - if (mUsb3Instance->Ready && (mUsb3Instance->PciIoEvent =3D=3D 0)) { - Status =3D Usb3NamedEventListen ( - &gEfiPciIoProtocolGuid, - TPL_NOTIFY, - Usb3PciIoNotify, - &Event - ); - if (!EFI_ERROR (Status)) { - mUsb3Instance->PciIoEvent =3D (EFI_PHYSICAL_ADDRESS) (UINTN) Event; - } - } - - return EFI_SUCCESS; -} - -/** - The destructor function. - - @param ImageHandle The firmware allocated handle for the EFI image. - @param SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The destructor always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -DebugCommunicationUsb3DxeDestructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - if ((mUsb3Instance !=3D NULL) && (mUsb3Instance->PciIoEvent !=3D 0)) { - // - // Close the event created. - // - gBS->CloseEvent ((EFI_EVENT) (UINTN) mUsb3Instance->PciIoEvent); - mUsb3Instance->PciIoEvent =3D 0; - } - return EFI_SUCCESS; -} - diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Dxe.inf b/SourceLevelDebugPkg/Library/DebugCommunicationLi= bUsb3/DebugCommunicationLibUsb3Dxe.inf index c4e4282c98b4..08b9ec12d298 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.inf +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.inf @@ -1,7 +1,7 @@ ## @file # Debug Communication Library instance based on usb3 debug port. # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -21,8 +21,6 @@ [Defines] MODULE_TYPE =3D DXE_DRIVER VERSION_STRING =3D 1.0 LIBRARY_CLASS =3D DebugCommunicationLib|DXE_CORE DXE_DR= IVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI= _DRIVER SMM_CORE - CONSTRUCTOR =3D DebugCommunicationUsb3DxeConstructor - DESTRUCTOR =3D DebugCommunicationUsb3DxeDestructor =20 # # The following information is for reference only and not required by the = build tools. @@ -56,11 +54,7 @@ [Pcd] =20 # The value of data buffer size used for USB debug port handle. # It should be equal to sizeof (USB3_DEBUG_PORT_HANDLE). - gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|250 = ## SOMETIMES_CONSUMES - -[Protocols] - gEfiPciIoProtocolGuid ## CONSUMES - gEdkiiIoMmuProtocolGuid ## CONSUMES + gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|239 = ## SOMETIMES_CONSUMES =20 [LibraryClasses] BaseLib @@ -71,4 +65,4 @@ [LibraryClasses] UefiBootServicesTableLib UefiLib BaseMemoryLib - HobLib + =20 \ No newline at end of file diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Internal.h b/SourceLevelDebugPkg/Library/DebugCommunicatio= nLibUsb3/DebugCommunicationLibUsb3Internal.h index 66757dafaebe..356485c5f697 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Internal.h +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Internal.h @@ -1,7 +1,7 @@ /** @file Debug Port Library implementation based on usb3 debug port. =20 - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -46,7 +46,6 @@ #define USB3DBG_DBG_CAB 1 // The XHCI host controller supports deb= ug capability #define USB3DBG_ENABLED 2 // The XHCI debug device is enabled #define USB3DBG_NOT_ENABLED 4 // The XHCI debug device is not enabled -#define USB3DBG_UNINITIALIZED 255 // The XHCI debug device is uninitialized =20 #define USB3_DEBUG_PORT_WRITE_MAX_PACKET_SIZE 0x08 =20 @@ -457,7 +456,7 @@ typedef struct _USB3_DEBUG_PORT_INSTANCE { UINT8 Initialized; =20 // - // The flag indicates debug capability is supported + // The flag indicates debug device is ready // BOOLEAN DebugSupport; =20 @@ -467,26 +466,6 @@ typedef struct _USB3_DEBUG_PORT_INSTANCE { BOOLEAN Ready; =20 // - // The flag indicates the instance is from HOB - // - BOOLEAN FromHob; - - // - // IOMMU PPI Notify registered - // - BOOLEAN PpiNotifyRegistered; - - // - // Prevent notification being interrupted by debug timer - // - BOOLEAN InNotify; - - // - // PciIo protocol event - // - EFI_PHYSICAL_ADDRESS PciIoEvent; - - // // The flag indicates if USB 3.0 ports has been turn off/on power // =20 BOOLEAN ChangePortPower; @@ -749,39 +728,4 @@ XhcDataTransfer ( IN UINTN Timeout ); =20 -/** - Initialize usb debug port hardware. - - @param Handle Debug port handle. - - @retval TRUE The usb debug port hardware configuration is ch= anged. - @retval FALSE The usb debug port hardware configuration is no= t changed. - -**/ -RETURN_STATUS -EFIAPI -InitializeUsbDebugHardware ( - IN USB3_DEBUG_PORT_HANDLE *Handle - ); - -/** - Discover and initialize usb debug port. - - @param Handle Debug port handle. - -**/ -VOID -DiscoverInitializeUsbDebugPort ( - IN USB3_DEBUG_PORT_HANDLE *Handle - ); - -/** - Return USB3 debug instance address. - -**/ =20 -USB3_DEBUG_PORT_HANDLE * -GetUsb3DebugPortInstance ( - VOID - ); - #endif //__SERIAL_PORT_LIB_USB__ diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Pei.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibU= sb3/DebugCommunicationLibUsb3Pei.c index 40e9b6406b2e..902a3b626acc 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.c @@ -1,7 +1,7 @@ /** @file Debug Port Library implementation based on usb3 debug port. =20 - Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License which accompanies this distribution. The full text of the license may b= e found at @@ -14,215 +14,13 @@ =20 #include #include -#include #include -#include #include "DebugCommunicationLibUsb3Internal.h" =20 -GUID gUsb3DbgGuid =3D USB3_DBG_GUID; - -/** - USB3 IOMMU PPI notify. - - @param[in] PeiServices Pointer to PEI Services Table. - @param[in] NotifyDesc Pointer to the descriptor for the Notification= event that - caused this function to execute. - @param[in] Ppi Pointer to the PPI data associated with this f= unction. - - @retval EFI_STATUS Always return EFI_SUCCESS -**/ -EFI_STATUS -EFIAPI -Usb3IoMmuPpiNotify ( - IN EFI_PEI_SERVICES **PeiServices, - IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDesc, - IN VOID *Ppi - ) -{ - USB3_DEBUG_PORT_HANDLE *Instance; - - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); - - Instance =3D GetUsb3DebugPortInstance (); - ASSERT (Instance !=3D NULL); - - Instance->InNotify =3D TRUE; - - // - // Reinitialize USB3 debug port with granted DMA buffer from IOMMU PPI. - // - InitializeUsbDebugHardware (Instance); - - // - // Wait some time for host to be ready after re-initialization. - // - MicroSecondDelay (1000000); - - Instance->InNotify =3D FALSE; - - return EFI_SUCCESS; -} - -EFI_PEI_NOTIFY_DESCRIPTOR mUsb3IoMmuPpiNotifyDesc =3D { - (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINA= TE_LIST), - &gEdkiiIoMmuPpiGuid, - Usb3IoMmuPpiNotify -}; - -/** - Allocates pages that are suitable for an OperationBusMasterCommonBuffer = or - OperationBusMasterCommonBuffer64 mapping. - - @param IoMmu Pointer to IOMMU PPI. - @param Pages The number of pages to allocate. - @param HostAddress A pointer to store the base system memory = address of the - allocated range. - @param DeviceAddress The resulting map address for the bus mast= er PCI controller to use to - access the hosts HostAddress. - @param Mapping A resulting value to pass to Unmap(). - - @retval EFI_SUCCESS The requested memory pages were allocated. - @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal = attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. - @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - -**/ -EFI_STATUS -IoMmuAllocateBuffer ( - IN EDKII_IOMMU_PPI *IoMmu, - IN UINTN Pages, - OUT VOID **HostAddress, - OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, - OUT VOID **Mapping - ) -{ - EFI_STATUS Status; - UINTN NumberOfBytes; - - *HostAddress =3D NULL; - *DeviceAddress =3D 0; - *Mapping =3D NULL; - - Status =3D IoMmu->AllocateBuffer ( - IoMmu, - EfiBootServicesData, - Pages, - HostAddress, - 0 - ); - if (EFI_ERROR (Status)) { - return EFI_OUT_OF_RESOURCES; - } - - NumberOfBytes =3D EFI_PAGES_TO_SIZE (Pages); - Status =3D IoMmu->Map ( - IoMmu, - EdkiiIoMmuOperationBusMasterCommonBuffer, - *HostAddress, - &NumberOfBytes, - DeviceAddress, - Mapping - ); - if (EFI_ERROR (Status)) { - IoMmu->FreeBuffer (IoMmu, Pages, *HostAddress); - *HostAddress =3D NULL; - return EFI_OUT_OF_RESOURCES; - } - Status =3D IoMmu->SetAttribute ( - IoMmu, - *Mapping, - EDKII_IOMMU_ACCESS_READ | EDKII_IOMMU_ACCESS_WRITE - ); - if (EFI_ERROR (Status)) { - IoMmu->Unmap (IoMmu, *Mapping); - IoMmu->FreeBuffer (IoMmu, Pages, *HostAddress); - *Mapping =3D NULL; - *HostAddress =3D NULL; - return Status; - } - - return Status; -} - -/** - USB3 get IOMMU PPI. - - @return Pointer to IOMMU PPI. - -**/ -EDKII_IOMMU_PPI * -Usb3GetIoMmu ( - VOID - ) -{ - EFI_STATUS Status; - EDKII_IOMMU_PPI *IoMmu; - - IoMmu =3D NULL; - Status =3D PeiServicesLocatePpi ( - &gEdkiiIoMmuPpiGuid, - 0, - NULL, - (VOID **) &IoMmu - ); - if (!EFI_ERROR (Status) && (IoMmu !=3D NULL)) { - return IoMmu; - } - - return NULL; -} - -/** - Return USB3 debug instance address. - -**/ =20 -USB3_DEBUG_PORT_HANDLE * -GetUsb3DebugPortInstance ( - VOID - ) -{ - USB3_DEBUG_PORT_HANDLE *Instance; - EFI_PEI_HOB_POINTERS Hob; - EFI_STATUS Status; - - Hob.Raw =3D GetFirstGuidHob (&gUsb3DbgGuid); - if (Hob.Raw =3D=3D NULL) { - // - // Save Instance into HOB - // - Instance =3D BuildGuidHob ( - &gUsb3DbgGuid, - sizeof (USB3_DEBUG_PORT_HANDLE) - ); - ASSERT (Instance !=3D NULL); - ZeroMem (Instance, sizeof (USB3_DEBUG_PORT_HANDLE)); - - Instance->FromHob =3D TRUE; - Instance->Initialized =3D USB3DBG_UNINITIALIZED; - } else { - Instance =3D GET_GUID_HOB_DATA (Hob.Guid); - } - - if (!Instance->InNotify) { - DiscoverInitializeUsbDebugPort (Instance); - } - - if (Instance->Ready && - !Instance->PpiNotifyRegistered && - (Usb3GetIoMmu () =3D=3D NULL)) { - Status =3D PeiServicesNotifyPpi (&mUsb3IoMmuPpiNotifyDesc); - ASSERT_EFI_ERROR (Status); - Instance->PpiNotifyRegistered =3D TRUE; - } - - return Instance; -} - /** Allocate aligned memory for XHC's usage. =20 - @param BufferSize The size, in bytes, of the Buffer. + @param BufferSize The size, in bytes, of the Buffer. =20 @return A pointer to the allocated buffer or NULL if allocation fails. =20 @@ -236,9 +34,6 @@ AllocateAlignBuffer ( EFI_PHYSICAL_ADDRESS Address; EFI_STATUS Status; VOID *MemoryDiscoveredPpi; - EDKII_IOMMU_PPI *IoMmu; - VOID *HostAddress; - VOID *Mapping; =20 Buf =3D NULL; =20 @@ -252,28 +47,9 @@ AllocateAlignBuffer ( (VOID **) &MemoryDiscoveredPpi ); if (!EFI_ERROR (Status)) { - IoMmu =3D Usb3GetIoMmu (); - if (IoMmu !=3D NULL) { - Status =3D IoMmuAllocateBuffer ( - IoMmu, - EFI_SIZE_TO_PAGES (BufferSize), - &HostAddress, - &Address, - &Mapping - ); - if (!EFI_ERROR (Status)) { - ASSERT (Address =3D=3D ((EFI_PHYSICAL_ADDRESS) (UINTN) HostAddress= )); - Buf =3D (VOID *)(UINTN) Address; - } - } else { - Status =3D PeiServicesAllocatePages ( - EfiACPIMemoryNVS, - EFI_SIZE_TO_PAGES (BufferSize), - &Address - ); - if (!EFI_ERROR (Status)) { - Buf =3D (VOID *)(UINTN) Address; - } + Status =3D PeiServicesAllocatePages (EfiACPIMemoryNVS, EFI_SIZE_TO_PAG= ES (BufferSize), &Address); + if (!EFI_ERROR (Status)) { + Buf =3D (VOID *)(UINTN) Address; } } return Buf; diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Pei.inf b/SourceLevelDebugPkg/Library/DebugCommunicationLi= bUsb3/DebugCommunicationLibUsb3Pei.inf index 33074db49a78..2108face50d2 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.inf +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.inf @@ -1,7 +1,7 @@ ## @file # Debug Communication Library instance based on usb3 debug port. # -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the B= SD License @@ -41,7 +41,6 @@ [Packages] =20 [Ppis] gEfiPeiMemoryDiscoveredPpiGuid ## CONSUMES - gEdkiiIoMmuPpiGuid ## CONSUMES =20 [Pcd] # The memory BAR of ehci host controller, in which usb debug feature is = enabled. @@ -58,7 +57,7 @@ [Pcd] =20 # The value of data buffer size used for USB debug port handle. # It should be equal to sizeof (USB3_DEBUG_PORT_HANDLE). - gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|250 = ## SOMETIMES_CONSUMES + gEfiSourceLevelDebugPkgTokenSpaceGuid.PcdDebugPortHandleBufferSize|239 = ## SOMETIMES_CONSUMES =20 [LibraryClasses] BaseLib @@ -68,7 +67,6 @@ [LibraryClasses] TimerLib BaseMemoryLib PeiServicesLib - HobLib - + =20 [Depex.common.PEIM] gEfiPeiMemoryDiscoveredPpiGuid --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel