Hi guys,

I have some doubt about PciIoGetAttributes behaviour on aarch64 platform
with non-uniform CPU:PCI address space mapping. I'll be grateful if you
verify my understanding.

According to UEFI specification, AddrRangeMin in QWORD Address Space
Descriptor returned by PciIoGetAttributes() should be a CPU address, at
least that's what I conclude from:
> Address Translation Offset. Offset to apply to the Starting address of a
> BAR *to convert it to a PCI address*. This value is zero unless the
> HostAddress and DeviceAddress for the BAR are different.
This mentions "Starting address", which I suppose refers to AddrRangeMin.
It needs to be converted to PCI address, so as-is it should be in CPU
address space.

On the other hand, the AddrRangeMin is assigned BaseAddress value obtained
directly from PciBar:
> Descriptor->AddrRangeMin = PciIoDevice->PciBar[BarIndex].BaseAddress;

PciBar is filled in PciParseBar() using original BAR content (thus
BaseAddress is not translated, PCI address). This way value that refers to
PCI space is returned from PciIoGetBarAttributes as CPU address.

Shouldn't there be translation of it somewhere on the way? Or is my
understanding flawed? Either way, please let me know.

Best regards,
Bartosz
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to