Attention is currently required from: Hung-Te Lin, Julius Werner, Jianjun Wang. Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56790 )
Change subject: arch/arm64: Add PCI configuration interface ......................................................................
Patch Set 1:
(1 comment)
File src/arch/arm64/include/arch/pci_cfg.h:
https://review.coreboot.org/c/coreboot/+/56790/comment/c8f6a708_e37efdbb PS1, Line 12: extern void *arch_pci_map_bus(u32 dev, u32 where, u8 size);
Hi Furquan, […]
Hi Jianjun,
I have been looking at how things are done in the Linux kernel and I like the idea of having a callback in the common code that allows the platform to perform any bus mapping if required. Something like `pci_map_bus()` that can configure the bus as required and return the MMIO address for the 4K config space of the device. For ECAM, this can use MMCONFIG. For other platforms (e.g. Mediatek), you can use the callback to perform any required configuration and return appropriate address. I don't think we can change `struct device` in coreboot. Instead it will have to be a callback that the PCI MMIO ops make to get to the MMIO address.
Does this make sense to you?
We would need this change both in coreboot and libpayload.
(P.S. I noticed there is similar effort ongoing from another vendor to enable PCIe support in coreboot and libpayload: https://review.coreboot.org/c/coreboot/+/53903. We should consolidate this into a single effort).