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
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel