]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[pci] Handle non-zero starting bus in ECAM allocations
authorMichael Brown <mcb30@ipxe.org>
Thu, 2 Nov 2023 15:05:15 +0000 (15:05 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 2 Nov 2023 15:05:15 +0000 (15:05 +0000)
commit74ec00a9f336152fccf8df9cc9c5a46ab1a649b4
tree14a5793350c82398ec2aa4f4360f41613a3e4f9f
parentf883203132b3d06ffb354f1b11d1f65a0c70ff42
[pci] Handle non-zero starting bus in ECAM allocations

The base address provided in the PCI ECAM allocation within the ACPI
MCFG table is the base address for the segment as a whole, not for the
starting bus within that allocation.  On machines that provide ECAM
allocations with a non-zero starting bus number (observed with an AWS
EC2 m7a.large instance), this will result in iPXE accessing the wrong
memory addresses within the ECAM region.

Fix by adding the appropriate starting bus offset to the base address.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/bus/ecam.c