[edk2-devel] [PATCH v2 4/4] OvmfPkg/PciHotPlugInitDxe: reserve more mmio space

Gerd Hoffmann kraxel at redhat.com
Wed Oct 5 05:01:56 UTC 2022


On Tue, Oct 04, 2022 at 05:57:46PM +0200, Laszlo Ersek wrote:
> On 10/04/22 15:47, Gerd Hoffmann wrote:
> > In case the 64-bit pci mmio window is larger than the default size
> > of 32G be generous and hand out larger chunks of address space for
> > prefetchable mmio bridge windows.

> > +      SetMmioPadding (
> > +        --FirstResource,
> > +        TRUE,
> > +        FALSE,
> > +        (UINTN)HighBitSetRoundUp64 (RShiftU64 (Pci64Size, 8))
> > +        );

> Looks good to me, thanks; I'm just missing the rationale on the
> RShiftU64() call. Please elaborate.

Cover letter explains this a bit.  The idea is to scale things up with
the available address space.  Patch #3 does that for the 64-bit pci mmio
window.  This patch does the same for the bridge windows, leveraging the
patch #3 calculations by looking at PcdPciMmio64Size.  The shift by 8
assigns 1/256 of the total mmio window size to each bridge.

The '8' is just pulled out of thin air.  Looks reasonable to me, in case
it turns out it is not we can adjust that in the future.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#94743): https://edk2.groups.io/g/devel/message/94743
Mute This Topic: https://groups.io/mt/94113630/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list