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 5831321F833B5 for ; Thu, 4 Jan 2018 03:28:04 -0800 (PST) Received: by mail-it0-x242.google.com with SMTP id b5so1985526itc.3 for ; Thu, 04 Jan 2018 03:33:08 -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=HSdSIKLEJGFGNaP3Pdhr2pw5jLEB0zXP1ZMe1eKmu64=; b=Mao1azZ+3V6cQ36UotGd1omEm7WHCK+Q2BM5Fwi7aPeFE4zr9XPQzYSwASY+TVYIfL byfFIgfVHk1XkfcTbCTEfCCWBKL4ckIn8lsC/BMKPy+nR5hEjPoizXZUv0SQk7eQdk+d IsVaHHtuEOKoccmNnbRvCdqito4qtYKMMuvtU= 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=HSdSIKLEJGFGNaP3Pdhr2pw5jLEB0zXP1ZMe1eKmu64=; b=LWjOvUAeoH7ml8+TR6sRrNwYS1cM26nVkJKiaiE9UmxYDA3X+qA67VtJMppqZ/xKce tDAdAjVrx1dPhyKlNBv373w1Z3czc5ze9IEQULzzCaopjKJCTve7cagkqeUH1T0tv4nF sTnJT4fvScEseMx+To+rdX7eIG6y6RFke1MqeWqpbnWKnizcQ2UQDKTY0YgaPbBhGrMt Q4mbtMtuD7aYja7rt+fVdydRYKrlnXGBpaCzBO1IXNDAV+HoF4Oua9CSzB9gxSIfiM+X CxC8OiGy1MP/2kRt/VISka9/SQT8SCNPjsu67ndLkLYU0f0Yj67IPWI3/aF4DsSmgevf 8mAg== X-Gm-Message-State: AKGB3mJ1U1+u+zkfcXIlxEhoOB7j5ceAAT0TckHcmLGQMGCMoMFoet5r Un93Rg6N34r8NFrPridSWBDI0Z/3tsh1yBtgDeX2qA== X-Google-Smtp-Source: ACJfBoszQt5+SxJDi7wb7WqKNJtNqMQQNR2bXZybo4bRmKZrTFlP67rlY9aJxOXs+tHRLnubyShE4S3r6Rs1L1B/qmI= X-Received: by 10.36.55.138 with SMTP id r132mr5363816itr.34.1515065587742; Thu, 04 Jan 2018 03:33:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.37.197 with HTTP; Thu, 4 Jan 2018 03:33:07 -0800 (PST) In-Reply-To: References: <1513945005-30002-1-git-send-email-meenakshi.aggarwal@nxp.com> From: Ard Biesheuvel Date: Thu, 4 Jan 2018 11:33:07 +0000 Message-ID: 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 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: Thu, 04 Jan 2018 11:28:04 -0000 Content-Type: text/plain; charset="UTF-8" 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? >> -----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 >> >