Attention is currently required from: Shelley Chen, Felix Singer, Furquan Shaikh, Martin Roth, Tim Wawrzynczak, Paul Menzel, Julius Werner, Angel Pons, Kyösti Mälkki, Yu-Ping Wu. Jianjun Wang has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57861 )
Change subject: Documentation/RFC: Generalize PCI support in coreboot ......................................................................
Patch Set 12:
(1 comment)
File Documentation/RFC/pci_config_access.md:
https://review.coreboot.org/c/coreboot/+/57861/comment/5c809bd3_59dc916b PS12, Line 125: ### Specifying MMIO support for PCI devices that don't support ECAM : : We’ll need to be able to distinguish between a platform using the ECAM access : method and any other MMIO access mechanism. For devices that support ECAM, they : would have to select the `ECAM_MMONCF_SUPPORT` config. For devices that don't : support ECAM and would still need MMIO support, they would need to explictly : select the `NO_ECAM_MMCONF_SUPPORT` config and include the `pci_mmio_cfg.h' : header file in their platform-specific source. Hi Shelley,
This will be a little confused in Mediatek platform, we can support ECAM access method, but it need to rely on the MMIO space to do so.
We will have two scenarios to access the config space:
1. No ECAM support, we will use pci_map_bus() to map the internal register to access the config space of devices, and the MMIO space is only used to access the BARs;
2. ECAM support, we need to remain some MMIO space for ECAM access method(1MB for each bus for 32 devices with 8 functions in maximum), and the other spaces will be used to access the BARs.
The reality problem is that we don't have large MMIO space like x86 does, so we will prefer to use the method with no ECAM support, but the function of get_pci_mmio_cfgbase() seems a little confused in this scenario.
Thanks.