intel / FdtBusPkg

Device Tree-based Platform Device Driver Development for Tiano UEFI
https://wiki.riseproject.dev/display/HOME/EDK2_00_03+-+FdtBusDxe+support
11 stars 1 forks source link

Extend EFI_DT_RANGE with TranslatedBase and BusDtIo fields, just like EFI_DT_REG #79

Closed andreiw closed 7 months ago

andreiw commented 7 months ago

PciHostBridgeLibEcam.c assumes the "ranges" map from PCI memory/IO spaces to CPU space, but that doesn't necessarily have to be true. But the code has no way of detecting whether the parent value is a CPU address or not. Like the reg parsing code, we ought to try translating all the way to the root and let clients see the additional translatedbase value.

andreiw commented 7 months ago

Also, just like EFI_DT_REG, if BusDtIo == NULL, we ought to try ensuring the region is visible to UEFI. Again, this helps client code since it avoids having to deal with GCD manipulation (making such drivers UEFI drivers, not DXE drivers, yay)

andreiw commented 7 months ago

Fixed by https://github.com/intel/FdtBusPkg/pull/82/commits/03eda5d604b657e10b4c160178c4b17600926a62