public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Cc: "star.zeng@intel.com" <star.zeng@intel.com>,
	"eric.dong@intel.com" <eric.dong@intel.com>,
	 Leif Lindholm <leif.lindholm@linaro.org>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Udit Kumar <udit.kumar@nxp.com>, Varun Sethi <V.Sethi@nxp.com>
Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and SATA support
Date: Fri, 5 Jan 2018 07:40:56 +0000	[thread overview]
Message-ID: <CAKv+Gu-88kgHq5AZ+iJD=M-Py-36b5kVTwtW+KNREEj8JJb6DA@mail.gmail.com> (raw)
In-Reply-To: <DB5PR04MB09982CE718FB56075E277FAE8E1C0@DB5PR04MB0998.eurprd04.prod.outlook.com>

On 5 January 2018 at 06:47, Meenakshi Aggarwal
<meenakshi.aggarwal@nxp.com> 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)

>
> 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' <ard.biesheuvel@linaro.org>
>> Cc: star.zeng@intel.com; eric.dong@intel.com; Leif Lindholm
>> <leif.lindholm@linaro.org>; Kinney, Michael D
>> <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit Kumar
>> <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
>> 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 <meenakshi.aggarwal@nxp.com>
>> > Cc: star.zeng@intel.com; eric.dong@intel.com; Leif Lindholm
>> > <leif.lindholm@linaro.org>; Kinney, Michael D
>> > <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit Kumar
>> > <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
>> > Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and
>> SATA
>> > support
>> >
>> > On 4 January 2018 at 11:27, Meenakshi Aggarwal
>> > <meenakshi.aggarwal@nxp.com> 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 <meenakshi.aggarwal@nxp.com>
>> > >> Cc: Leif Lindholm <leif.lindholm@linaro.org>; Kinney, Michael D
>> > >> <michael.d.kinney@intel.com>; edk2-devel@lists.01.org; Udit Kumar
>> > >> <udit.kumar@nxp.com>; Varun Sethi <V.Sethi@nxp.com>
>> > >> Subject: Re: [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and
>> > SATA
>> > >> support
>> > >>
>> > >> On 22 December 2017 at 12:16, Meenakshi Aggarwal
>> > >> <meenakshi.aggarwal@nxp.com> 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
>> > >> >


  reply	other threads:[~2018-01-05  7:35 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-22 12:16 [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and SATA support Meenakshi Aggarwal
2017-12-22 12:16 ` [PATCH edk2-platforms 1/3] USB: Added Support of DWC3 USB controller Meenakshi Aggarwal
2017-12-22 12:16 ` [PATCH edk2-platforms 2/3] PciEmulation : Add support for Pci Emulation layer Meenakshi Aggarwal
2017-12-22 12:16 ` [PATCH edk2-platforms 3/3] SATA : Added SATA controller initialization driver Meenakshi Aggarwal
2017-12-22 15:31 ` [PATCH edk2-platforms 0/3] Cover letter:Pci Emulation and SATA support Ard Biesheuvel
2018-01-04 11:27   ` Meenakshi Aggarwal
2018-01-04 11:33     ` Ard Biesheuvel
2018-01-04 12:56       ` Meenakshi Aggarwal
2018-01-05  6:47         ` Meenakshi Aggarwal
2018-01-05  7:40           ` Ard Biesheuvel [this message]
2018-01-05  8:53             ` Meenakshi Aggarwal
2018-01-05  9:16               ` Ard Biesheuvel
2018-01-08 15:55 ` [PATCH edk2-platforms v2 0/2] Cover letter:SATA controller support Meenakshi Aggarwal
2018-01-08 15:55   ` [PATCH edk2-platforms v2 1/2] SATA : Added SATA controller driver Meenakshi Aggarwal
2018-01-08 15:05     ` Ard Biesheuvel
2018-01-09  4:50       ` Meenakshi Aggarwal
2018-01-09  8:26         ` Ard Biesheuvel
2018-01-08 15:55   ` [PATCH edk2-platforms v2 2/2] LS1046 : Enable support of SATA controller Meenakshi Aggarwal
2018-01-08 15:11     ` Ard Biesheuvel
2018-01-09  4:37       ` Meenakshi Aggarwal
2018-01-09  8:27         ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKv+Gu-88kgHq5AZ+iJD=M-Py-36b5kVTwtW+KNREEj8JJb6DA@mail.gmail.com' \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox