On Tue, Jan 25, 2022 at 03:30:11PM +0100, Nicolas Ojeda Leon wrote:
> Read the "hardware-info" item from fw-cfg to extract specifications
> of PCI host bridges and analyze the 64-bit apertures of them to
> find out the highest 64-bit MMIO address required which determines
> the address space required by the guest, and, consequently, the
> FirstNonAddress used to calculate size of physical addresses.
> 
> Using the static PeiHardwareInfoLib, read the fw-cfg file of
> hardware information to extract, one by one, all the host
> bridges. Find the last 64-bit MMIO address of each host bridge,
> using the HardwareInfoPciHostBridgeLib API, and compare it to an
> accumulate value to discover the highest address used, which
> corresponds to the highest value that must be included in the
> guest's physical address space.
> 
> Given that platforms with multiple host bridges may provide the PCI
> apertures' addresses, the memory detection logic must take into
> account that, if the host provided the MMIO windows that can and must
> be used, the guest needs to take those values. Therefore, if the
> MMIO windows are found in the host-provided fw-cfg file, skip all the
> logic calculating the physical address size and just use the value
> provided. Since each PCI host bridge corresponds to an element in
> the information provided by the host, each of these must be analyzed
> looking for the highest address used.
> 
> Cc: Alexander Graf <g...@amazon.de>
> Cc: Gerd Hoffmann <kra...@redhat.com>
> 
> Signed-off-by: Nicolas Ojeda Leon <ncol...@amazon.com>

Acked-by: Gerd Hoffmann <kra...@redhat.com>



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86154): https://edk2.groups.io/g/devel/message/86154
Mute This Topic: https://groups.io/mt/88672492/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to