From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::242; helo=mail-it0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A932921F833CD for ; Fri, 5 Jan 2018 01:11:37 -0800 (PST) Received: by mail-it0-x242.google.com with SMTP id o130so4017110itg.0 for ; Fri, 05 Jan 2018 01:16:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TbqdAhqIoiMuZxYBY+nC25+DYVdGW5RvXsrc3K9kj9Y=; b=AtKQVkQ8DTc3WUicUtnh664GKbdm/mcIfmdA31R+3tGqN5AIPKVH2+HalAaHqO7+jQ eBy06jgzlJhv5Yk3Y+KsQw+4TCxYc+9mfPJxXA++szbj5YiUTdMtgCmQpncNKrA5tZKm PNoQh+E29Uu9wvHbPdYUIDuUqeCwz8h/nDpMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TbqdAhqIoiMuZxYBY+nC25+DYVdGW5RvXsrc3K9kj9Y=; b=e+7koKF1PezmqnVonsDgo0sFvRZSfyRNH6Rg1aZr1SlXoRu/tW5XwFLxuLN/qRxODF JPkc8mGbHt3FMZxx0FFGUIpvjsjbKiljlIe6d+dUY2pcqUlkisk1hu0zvbSEVEhpn2nc lWapgnfbfzXkJs++FQpWae0rvr9pHHOuFuRetR438uyQBe4CX653MnHmH/WENedJOL7E yqnoTdgBvDEBYT9ncpTIMecpCuCh8UVW9guR6L6jt2TB51AEhLRhYOrLCpS35TP5hssV P1jTG/sdMwAmXG29a86m+jfubKqJX7oOydSOFxDOF/NK07JfbUpCUjri/hB4tINRPrbd nPrA== X-Gm-Message-State: AKGB3mLAsYC3RoPsDWpVFRGhNZP0VdgtE7P4YVo0r1h6QExc2S2ISDcG pR6yzYkLAu6HpzWUgkxZZHoKdwkclyKvoq/Oe1hisQ== X-Google-Smtp-Source: ACJfBotx/FoT9kxYMcIqCoskmg+9qFCAJ+dZPHN348E99EZvZjYtReu0sNom3dyl935iCN8fbJFyySsj9K5FL3+WgiA= X-Received: by 10.36.192.10 with SMTP id u10mr2458242itf.73.1515143803231; Fri, 05 Jan 2018 01:16:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.37.197 with HTTP; Fri, 5 Jan 2018 01:16:42 -0800 (PST) In-Reply-To: References: <1513945005-30002-1-git-send-email-meenakshi.aggarwal@nxp.com> From: Ard Biesheuvel Date: Fri, 5 Jan 2018 09:16:42 +0000 Message-ID: To: Meenakshi Aggarwal Cc: Leif Lindholm , "Kinney, Michael D" , "edk2-devel@lists.01.org" , Udit Kumar , Varun Sethi Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and SATA support 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: , X-List-Received-Date: Fri, 05 Jan 2018 09:11:38 -0000 Content-Type: text/plain; charset="UTF-8" On 5 January 2018 at 08:53, Meenakshi Aggarwal wrote: > > >> -----Original Message----- >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> Sent: Friday, January 05, 2018 1:11 PM >> To: Meenakshi Aggarwal >> Cc: star.zeng@intel.com; eric.dong@intel.com; Leif Lindholm >> ; Kinney, Michael D >> ; edk2-devel@lists.01.org; Udit Kumar >> ; Varun Sethi >> Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and SATA >> support >> >> On 5 January 2018 at 06:47, Meenakshi Aggarwal >> wrote: >> > Hi Ard, >> > >> > I tried NonDiscoverablePciDeviceDxe with Xhci today and unfortunately it >> also didnt work. >> > >> > I didnt debug it much but XhciInitializeDevice() and >> UsbEnumerateNewDev() is failing. >> > >> >> Are you using the correct DMA type for your device? (coherent vs non- >> coherent) >> > I assumed i was but i was not :(. > Correcting DMA type resolved the problem. Glad to hear that! >> > >> > XhcSetBiosOwnership: called to set BIOS ownership >> > XhcResetHC! >> > XhcInitSched:DCBAA=0xFE949000 >> > XhcInitSched: Created CMD ring [FE949400~FE94A400) EVENT ring >> [FE94A400~FE94C400) >> > InstallProtocolInterface: 3E745226-9818-45B6-A2AC-D7CD0E8BA2BC >> FE959038 >> > XhcDriverBindingStart: XHCI started for controller @ FE9EBD98 >> > InstallProtocolInterface: 240612B7-A063-11D4-9A3A-0090273FC14D >> FE9D5020 >> > XhcGetCapability: 2 ports, 64 bit 1 >> > UsbRootHubInit: root hub FE9DB918 - max speed 3, 2 ports >> > XhcClearRootHubPortFeature: status Success >> > UsbEnumeratePort: port 0 state - 01, change - 01 on FE9DB918 >> > UsbEnumeratePort: Device Connect/Disconnect Normally >> > UsbEnumeratePort: new device connected at port 0 >> > XhcUsbPortReset! >> > XhcSetRootHubPortFeature: status Success >> > XhcClearRootHubPortFeature: status Success >> > XhcClearRootHubPortFeature: status Success >> > >> > Wait here for considerable amount of time, then it timeout. >> > >> > XhcInitializeDeviceSlot64: Enable Slot Failed, Status = Time out >> > UsbEnumerateNewDev: hub port 0 is reset >> > UsbEnumerateNewDev: device is of 2 speed >> > UsbEnumerateNewDev: device uses translator (0, 0) >> > XhcControlTransfer: error - Device Error, transfer - 100 >> > UsbEnumerateNewDev: failed to set device address - Device Error >> > >> > >> > Is there some fixed sequence which needs to be followed? >> > >> > Thanks, >> > Meenakshi >> > >> >> -----Original Message----- >> >> From: Meenakshi Aggarwal >> >> Sent: Thursday, January 04, 2018 6:26 PM >> >> To: 'Ard Biesheuvel' >> >> Cc: star.zeng@intel.com; eric.dong@intel.com; Leif Lindholm >> >> ; Kinney, Michael D >> >> ; edk2-devel@lists.01.org; Udit Kumar >> >> ; Varun Sethi >> >> Subject: RE: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and >> SATA >> >> support >> >> >> >> >> >> >> >> > -----Original Message----- >> >> > From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> >> > Sent: Thursday, January 04, 2018 5:03 PM >> >> > To: Meenakshi Aggarwal >> >> > Cc: star.zeng@intel.com; eric.dong@intel.com; Leif Lindholm >> >> > ; Kinney, Michael D >> >> > ; edk2-devel@lists.01.org; Udit Kumar >> >> > ; Varun Sethi >> >> > Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and >> >> SATA >> >> > support >> >> > >> >> > On 4 January 2018 at 11:27, Meenakshi Aggarwal >> >> > wrote: >> >> > > Hi Ard, >> >> > > >> >> > > >> >> > > I tried using NonDiscoverablePciDeviceDxe driver for SATA (AHCI), but >> on >> >> > using this my SATA drive is not been detected by UEFI. >> >> > > >> >> > > Below is the reason of error: >> >> > > >> >> > > From EnumerateAttachedDevice() function AhciModeInitialization() >> >> > function gets called. >> >> > > >> >> > > In AhciModeInitialization() under else loop i am receiving >> EFI_TIMEOUT >> >> > from AhciIdentify() >> >> > > >> >> > > } else if ((Data & EFI_AHCI_ATAPI_SIG_MASK) == >> >> > EFI_AHCI_ATA_DEVICE_SIG) { >> >> > > Status = AhciIdentify (PciIo, AhciRegisters, Port, 0, &Buffer); >> >> > > >> >> > > if (EFI_ERROR (Status)) { >> >> > > REPORT_STATUS_CODE (EFI_PROGRESS_CODE, >> >> > (EFI_PERIPHERAL_FIXED_MEDIA | EFI_P_EC_NOT_DETECTED)); >> >> > > continue; >> >> > > } >> >> > > >> >> > > DeviceType = EfiIdeHarddisk; >> >> > > >> >> > > Then i check In AhciIdentify() function. >> >> > > Here, AhciPioTransfer() calls AhciCheckMemSet() to read >> PioFisReceived >> >> > and D2hFisReceived. >> >> > > And AhciCheckMemSet() returns EFI_NOT_READY for both cases. >> >> > > So timeout occurs. >> >> > > >> >> > > I tried to compare PciEmulation layer and >> NonDiscoverablePciDeviceDxe >> >> > but not able to find much difference. >> >> > > >> >> > > Please suggest what can possibly i am missing. >> >> > > >> >> > >> >> > Does it work for XHCI? >> >> > >> >> I have not tried XHCI yet. >> >> > >> >> > >> -----Original Message----- >> >> > >> From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] >> >> > >> Sent: Friday, December 22, 2017 9:02 PM >> >> > >> To: Meenakshi Aggarwal >> >> > >> Cc: Leif Lindholm ; Kinney, Michael D >> >> > >> ; edk2-devel@lists.01.org; Udit Kumar >> >> > >> ; Varun Sethi >> >> > >> Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation >> and >> >> > SATA >> >> > >> support >> >> > >> >> >> > >> On 22 December 2017 at 12:16, Meenakshi Aggarwal >> >> > >> wrote: >> >> > >> > Following patches add support for pci emulation layer >> >> > >> > and SATA on NXP boards. >> >> > >> > >> >> > >> > Null Library for USB is also present to give completeness >> >> > >> > to Pci Emulation layer. >> >> > >> > >> >> > >> > Meenakshi Aggarwal (3): >> >> > >> > USB: Added Support of DWC3 USB controller. >> >> > >> > PciEmulation : Add support for Pci Emulation layer. >> >> > >> > SATA : Added SATA controller initialization driver. >> >> > >> > >> >> > >> >> >> > >> Please don't add PCI emulation drivers. Instead, we have >> >> > >> NonDiscoverablePciDeviceDxe that supports AHCI, XHCI, EHCI, OHCI, >> >> > >> UHCI, UFS, NVME and SDHCI platform devices. >> >> > >> >> >> > >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.c | 624 >> >> > >> +++++++++++++++++++++ >> >> > >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.h | 306 >> >> ++++++++++ >> >> > >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.inf | 54 ++ >> >> > >> > .../NXP/Drivers/PciEmulation/PciRootBridgeIo.c | 286 >> ++++++++++ >> >> > >> > Platform/NXP/Drivers/SataInitDxe/SataInit.c | 122 ++++ >> >> > >> > Platform/NXP/Drivers/SataInitDxe/SataInit.h | 32 ++ >> >> > >> > Platform/NXP/Drivers/SataInitDxe/SataInitDxe.inf | 43 ++ >> >> > >> > .../NXP/Library/UsbHcdNullLibrary/UsbHcdLibNull.c | 25 + >> >> > >> > .../NXP/Library/UsbHcdNullLibrary/UsbHcdNull.inf | 28 + >> >> > >> > Platform/NXP/NxpQoriqLs.dec | 14 +- >> >> > >> > Platform/NXP/NxpQoriqLs.dsc | 15 + >> >> > >> > 11 files changed, 1547 insertions(+), 2 deletions(-) >> >> > >> > create mode 100644 >> >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.c >> >> > >> > create mode 100755 >> >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.h >> >> > >> > create mode 100644 >> >> > Platform/NXP/Drivers/PciEmulation/PciEmulation.inf >> >> > >> > create mode 100644 >> >> > >> Platform/NXP/Drivers/PciEmulation/PciRootBridgeIo.c >> >> > >> > create mode 100644 Platform/NXP/Drivers/SataInitDxe/SataInit.c >> >> > >> > create mode 100644 Platform/NXP/Drivers/SataInitDxe/SataInit.h >> >> > >> > create mode 100644 >> >> Platform/NXP/Drivers/SataInitDxe/SataInitDxe.inf >> >> > >> > create mode 100644 >> >> > >> Platform/NXP/Library/UsbHcdNullLibrary/UsbHcdLibNull.c >> >> > >> > create mode 100644 >> >> > >> Platform/NXP/Library/UsbHcdNullLibrary/UsbHcdNull.inf >> >> > >> > >> >> > >> > -- >> >> > >> > 1.9.1 >> >> > >> >