From: Laszlo Ersek <lersek@redhat.com>
To: Guo Heyi <heyi.guo@linaro.org>, "Ni, Ruiyu" <ruiyu.ni@Intel.com>
Cc: Eric Dong <eric.dong@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
edk2-devel@lists.01.org,
Michael D Kinney <michael.d.kinney@intel.com>,
Star Zeng <star.zeng@intel.com>
Subject: Re: [RFC v4 1/3] MdeModulePkg/PciHostBridgeDxe: Add support for address translation
Date: Wed, 28 Feb 2018 10:39:24 +0100 [thread overview]
Message-ID: <7df05a7c-1161-5c4a-7720-5c27c6fd9129@redhat.com> (raw)
In-Reply-To: <20180228075348.GB27903@SZX1000114654>
On 02/28/18 08:53, Guo Heyi wrote:
> On Wed, Feb 28, 2018 at 03:25:03PM +0800, Ni, Ruiyu wrote:
>> Heyi,
>> My understanding is this whole change is backward compatible.
>> Which means an old version of PciHostBridgeLib + new PciHostBridgeLib.h +
>> new PciHostBridgeDxe driver won't cause build failure.
>> right?
>
> Not really; as Laszlo indicated in one mail, some implementations of
> PciHostBridgeLib uses temporary PCI_ROOT_BRIDGE_APERTURE variables and only
> initialize Base and Limit fields of the variables, like the code in
> https://github.com/tianocore/edk2/blob/master/CorebootPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeSupport.c#L315
> and
> https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c#L216
> and
> https://github.com/tianocore/edk2/blob/master/OvmfPkg/Library/PciHostBridgeLib/XenSupport.c#L189
Right -- while Ray is asking whether this change can cause a build
failure (and no, it can't), it is true that some PciHostBridgeLib
instances don't fully clear some structures that "PciHostBridgeLib.h"
defines (only member-wise assignments exist). So client code has to be
patched up for functionality, not for build errors.
> I'm also preparing the patches for these PciHostBridgeLib instances in edk2
> tree, which are expected to be committed after PciHostBridgeLib.h change and
> before PciHostBridge driver change.
That's a great idea; it should help with bisectability.
In fact, you could submit those patches first (even independently); I
think they'd mostly just insert a few well-placed ZeroMem() calls. One
could argue that they should have been added right from the start (we
expected the "PciHostBridgeLib.h" structures to expand over time, just
missed a few init spots for them).
Thanks,
Laszlo
next prev parent reply other threads:[~2018-02-28 9:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 2:09 [RFC v4 0/3] Add translation support to generic PciHostBridge Heyi Guo
2018-02-27 2:09 ` [RFC v4 1/3] MdeModulePkg/PciHostBridgeDxe: Add support for address translation Heyi Guo
2018-02-27 8:48 ` Ni, Ruiyu
2018-02-27 8:55 ` Ard Biesheuvel
2018-02-27 9:33 ` Guo Heyi
2018-02-27 9:59 ` Ni, Ruiyu
2018-02-27 10:14 ` Ard Biesheuvel
2018-02-27 10:45 ` Guo Heyi
2018-02-27 11:44 ` Guo Heyi
2018-02-28 2:29 ` Ni, Ruiyu
2018-02-28 7:25 ` Ni, Ruiyu
2018-02-28 7:53 ` Guo Heyi
2018-02-28 9:39 ` Laszlo Ersek [this message]
2018-02-28 23:31 ` Guo Heyi
2018-03-01 3:56 ` Guo Heyi
2018-03-01 4:44 ` Ni, Ruiyu
2018-02-27 2:09 ` [RFC v4 2/3] MdeModulePkg/PciBus: convert host address to device address Heyi Guo
2018-02-27 2:09 ` [RFC v4 3/3] MdeModulePkg/PciBus: return CPU address for GetBarAttributes Heyi Guo
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=7df05a7c-1161-5c4a-7720-5c27c6fd9129@redhat.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