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 3/5] MdeModulePkg: implement generic PCI I/O driver for non-discoverable devices
Date: Wed, 16 Nov 2016 11:43:10 +0000	[thread overview]
Message-ID: <CAKv+Gu-ZZHFebTWGfAChyW8c=jLWHxRkxXSKXdtZN2vUg-ZvSg@mail.gmail.com> (raw)
In-Reply-To: <CAKv+Gu_V2xB13oVBnys2DEeeSaus=sWjAKTDw-R-umic=kfg9g@mail.gmail.com>

On 15 November 2016 at 11:30, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> On 15 November 2016 at 08:40, Ni, Ruiyu <ruiyu.ni@intel.com> wrote:
>> Ard,
>> Can you check whether PciLib can be used to replace the implementation in
>> NonDiscoverablePciDeviceIo.c?
>>
>
> OK

I am not sure how this should work. This driver needs to coexist with
real PCI host bridge drivers, and the config space access method is
fully defined by the requirements of the driver, i.e., each PCI config
space access should be served from the fake PCI config space in
memory, and never be forwarded to a real device.

So /providing/ a PciLib implementation, and requiring that that
particular implementation must be used with this driver makes no
sense, I think.
And depending on a PciLib implementation does not make sense either,
since the platform cannot choose which method to use.

Note that we are not emulating a PCI bus hierarchy, where a single
contiguous chunk of memory emulates the entire config space of several
devices. Each device is fully independent, and provides a minimal
config space to describe the type of device, and the BARs

Or did I miss something?


  reply	other threads:[~2016-11-16 11:43 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 [this message]
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
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-ZZHFebTWGfAChyW8c=jLWHxRkxXSKXdtZN2vUg-ZvSg@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