There may be multiple instances of EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL for a single PCI segment. Use the bus number range descriptor from the ACPI resource list to identify the correct protocol instance.
There is some discrepancy between the ACPI and UEFI specifications regarding the interpretation of values within the ACPI resource list.
The ACPI specification defines the min/max field values to be within the secondary (device-side) address space, and defines the offset field value as "the offset that must be added to the address on the secondary side to obtain the address on the primary side".
The UEFI specification states instead that the offset field value is the "offset to apply to the starting address to convert it to a PCI
address", helpfully omitting to clarify whether "to apply...