public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	 "leif.lindholm@linaro.org" <leif.lindholm@linaro.org>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	 "afish@apple.com" <afish@apple.com>,
	"Tian, Feng" <feng.tian@intel.com>,
	 "Zeng, Star" <star.zeng@intel.com>
Subject: Re: [PATCH v2 1/5] MdeModulePkg: introduce non-discoverable device protocol
Date: Tue, 15 Nov 2016 11:29:16 +0000	[thread overview]
Message-ID: <CAKv+Gu_s0p+p87tmErKBBs8eR9PHvY=Qz4TGdjvoWFUyPpFULA@mail.gmail.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D58E78565@SHSMSX104.ccr.corp.intel.com>

On 15 November 2016 at 08:31, Ni, Ruiyu <ruiyu.ni@intel.com> wrote:
> Ard,
>
> For the below protocol structure, it assumes that the non-discoverable
> PCI device contains only one BAR and the type is limited to USB/AHCI/SD/UFS/NVME
> devices.

For now, yes. It is quite unusual for such non-enumerable devices to
have several MMIO ranges (and I/O ranges do not exist at all on many
architectures, except when dealing with real PCI devices where the
root complex takes care of the I/O to MMIO translation)

> Could we have more types of such kind of device in future?

Yes. I actually added AMBA as well, because those devices have a
standardized identification register

> Could we have a device that contains multiple BAR?

Perhaps others could chime in here? The only example of mutiple BARs
would be multiple SDHCI slots on the same controller, but those could
easily be modeled as separate controllers as well, since they are
completely independent.

> Could we have a device that contains one BAR but the BAR size is non-default size?
>

Another good question. I think the best way for now is to extend the
protocol to allow it, but only add support to the helper library when
the need arises.

> I am asking all about this is because I am thinking would it be more flexible to have
> platform provide a ACPI resource descriptors and the NonDiscoverableDxe driver
> converts the ACPI resource descriptors to PCI BARs?
>
> You could refer to PciIo.GetBarAttributes() to see how one ACPI resource descriptor
> is created for one BAR.
>
> But please ignore my such concern if there is a spec to describe such non-discoverable
> PCI device.
>

No, there is no such spec, and I think your suggestion is very good. I
will investigate.

Thanks,
Ard.


  reply	other threads:[~2016-11-15 11:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-03 11:41 [PATCH v2 1/5] MdeModulePkg: introduce non-discoverable device protocol Ard Biesheuvel
2016-11-03 11:41 ` [PATCH v2 2/5] MdeModule: introduce helper library to register non-discoverable devices Ard Biesheuvel
2016-11-03 11:41 ` [PATCH v2 3/5] MdeModulePkg: implement generic PCI I/O driver for " Ard Biesheuvel
2016-11-15  8:40   ` Ni, Ruiyu
2016-11-15 11:30     ` Ard Biesheuvel
2016-11-16 11:43       ` Ard Biesheuvel
2016-11-16 11:47         ` Ni, Ruiyu
2016-11-03 11:41 ` [PATCH v2 4/5] MdeModulePkg/NonDiscoverablePciDeviceDxe: add support for non-coherent DMA Ard Biesheuvel
2016-11-03 11:41 ` [PATCH v2 5/5] Omap35xxPkg/PciEmulation: port to new non-discoverable device infrastructure Ard Biesheuvel
2016-11-15  8:31 ` [PATCH v2 1/5] MdeModulePkg: introduce non-discoverable device protocol Ni, Ruiyu
2016-11-15 11:29   ` Ard Biesheuvel [this message]
2016-11-15  8:38 ` Ni, Ruiyu
2016-11-15 11:29   ` 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_s0p+p87tmErKBBs8eR9PHvY=Qz4TGdjvoWFUyPpFULA@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