From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>
Cc: Bartosz Szczepanek <bsz@semihalf.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: CPU/PCI addressing in PciIoGetAttributes
Date: Tue, 5 Sep 2017 14:40:33 +0100 [thread overview]
Message-ID: <CAKv+Gu-bBSTutZXa9_FjXB+RtQnnEafqqhfGiR5xfR0Yot4Yow@mail.gmail.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BA23CEF@SHSMSX104.ccr.corp.intel.com>
On 5 September 2017 at 08:07, Ni, Ruiyu <ruiyu.ni@intel.com> wrote:
> Bartosz,
>
> Based on your findings, the AddrRangeMin has to be a device address☺
>
> As far as I can remember, this history is:
> In the very beginning, Spec owner assumes the device address equals to CPU address.
> The implementation of GetBarAttributes() directly returns the address read from the BAR.
> But later we found device address doesn’t equal to CPU address, especially in ARM platform.
> So in order to expose the offset of the two addresses, the AddressTranslationOffset field was used.
> To avoid breaking the existing consumers, GetBarAttributes() remains to return the BAR address.
>
> Anyone please correct me if I am wrong.
>
The spec is quite clear: the address descriptor should *not* contain
the raw BAR value, but the CPU's translated view. So I think we should
fix the implementation to comply with that.
The risk for breakage should be low, given that the translation is
zero in 99% of the cases anyway, especially on traditional UEFI (PC)
platforms.
next prev parent reply other threads:[~2017-09-05 13:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-04 11:43 CPU/PCI addressing in PciIoGetAttributes Bartosz Szczepanek
2017-09-05 7:07 ` Ni, Ruiyu
2017-09-05 7:44 ` Bartosz Szczepanek
2017-09-05 13:40 ` Ard Biesheuvel [this message]
2017-09-06 9:34 ` Bartosz Szczepanek
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-bBSTutZXa9_FjXB+RtQnnEafqqhfGiR5xfR0Yot4Yow@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