From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@lists.01.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: Re: [PATCH v2 0/7] OvmfPkg, ArmVirtPkg: add and use PCI(E) Capabilities Library
Date: Thu, 24 May 2018 22:04:34 +0200 [thread overview]
Message-ID: <e7ad6dca-b499-a049-3a27-e1e98e21e56d@redhat.com> (raw)
In-Reply-To: <20180523202121.8125-1-lersek@redhat.com>
On 05/23/18 22:21, Laszlo Ersek wrote:
> Repo: https://github.com/lersek/edk2.git
> Branch: pci_cap_v2
>
> In v2, the new libs are initially introduced under OvmfPkg, rather
> than MdePkg. v1 was posted at
> <http://mid.mail-archive.com/20180504213637.11266-1-lersek@redhat.com>.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Jordan Justen <jordan.l.justen@intel.com>
I've addressed Ard's requests with the following (cumulative) diff:
> diff --git a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c
> b/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c
> index 6789359f0a54..c059264b322d 100644
> --- a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c
> +++ b/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c
> @@ -874,6 +874,8 @@ PciCapGetInfo (
> {
> PCI_CAP *InstanceZero;
>
> + ASSERT (Info != NULL);
> +
> InstanceZero = (Cap->Key.Instance == 0 ? Cap :
> Cap->NumInstancesUnion.InstanceZero);
>
> diff --git a/OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.c
> b/OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.c
> index 84369e4dc3a8..358d87f93103 100644
> --- a/OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.c
> +++ b/OvmfPkg/Library/UefiPciCapPciIoLib/UefiPciCapPciIoLib.c
> @@ -73,10 +73,10 @@ ProtoDevTransferConfig (
> // possible in one iteration of the loop. Otherwise, transfer only one
> // unit, to improve the alignment.
> //
> - if (Size >= BIT2 && (ConfigOffset & (BIT2 - 1)) == 0) {
> + if (Size >= 4 && (ConfigOffset & 3) == 0) {
> Width = EfiPciIoWidthUint32;
> Count = Size >> Width;
> - } else if (Size >= BIT1 && (ConfigOffset & (BIT1 - 1)) == 0) {
> + } else if (Size >= 2 && (ConfigOffset & 1) == 0) {
> Width = EfiPciIoWidthUint16;
> Count = 1;
> } else {
After retesting the series, I pushed it as commit range
4b8552d794e7..5685a243b6f8.
I've also filed <https://bugzilla.tianocore.org/show_bug.cgi?id=957>
about upstreaming the libraries from the first three patches to a more
central package.
Thanks!
Laszlo
prev parent reply other threads:[~2018-05-24 20:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-23 20:21 [PATCH v2 0/7] OvmfPkg, ArmVirtPkg: add and use PCI(E) Capabilities Library Laszlo Ersek
2018-05-23 20:21 ` [PATCH v2 1/7] OvmfPkg: introduce PciCapLib Laszlo Ersek
2018-05-24 7:53 ` Ard Biesheuvel
2018-05-24 14:39 ` Laszlo Ersek
2018-05-24 14:41 ` Ard Biesheuvel
2018-05-24 17:25 ` Laszlo Ersek
2018-05-23 20:21 ` [PATCH v2 2/7] OvmfPkg: introduce PciCapPciSegmentLib Laszlo Ersek
2018-05-24 8:08 ` Ard Biesheuvel
2018-05-24 14:43 ` Laszlo Ersek
2018-05-24 14:55 ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 3/7] OvmfPkg: introduce PciCapPciIoLib Laszlo Ersek
2018-05-24 8:13 ` Ard Biesheuvel
2018-05-24 14:50 ` Laszlo Ersek
2018-05-24 14:54 ` Ard Biesheuvel
2018-05-24 14:54 ` Ard Biesheuvel
2018-05-24 17:22 ` Laszlo Ersek
2018-05-23 20:21 ` [PATCH v2 4/7] OvmfPkg: resolve PciCapLib, PciCapPciSegmentLib, PciCapPciIoLib Laszlo Ersek
2018-05-24 8:14 ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 5/7] ArmVirtPkg: " Laszlo Ersek
2018-05-24 8:14 ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 6/7] OvmfPkg/PciHotPlugInitDxe: convert to PciCapLib Laszlo Ersek
2018-05-24 8:15 ` Ard Biesheuvel
2018-05-23 20:21 ` [PATCH v2 7/7] OvmfPkg/Virtio10Dxe: " Laszlo Ersek
2018-05-24 8:16 ` Ard Biesheuvel
2018-05-24 14:55 ` Laszlo Ersek
2018-05-24 20:04 ` Laszlo Ersek [this message]
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=e7ad6dca-b499-a049-3a27-e1e98e21e56d@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