John Zhao has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40968 )
Change subject: soc/intel/tigerlake: Clear TBT PCIe root ports BME at exit boot service ......................................................................
Patch Set 6:
(2 comments)
https://review.coreboot.org/c/coreboot/+/40968/6/src/soc/intel/tigerlake/chi... File src/soc/intel/tigerlake/chip.c:
https://review.coreboot.org/c/coreboot/+/40968/6/src/soc/intel/tigerlake/chi... PS6, Line 142: if ((pci_read_config32(dev, CAPID0_A) & VTD_DISABLE))
I don't understand this logic. I would think the policy should not be dependent on VTD disable. […]
If Vt-d is enabled with opt_in(bit 2) in DMAR table along with PCIe root ports _DSD property: "ExternalFacingPort", kernel turns IOMMU on. Disabling BME at end of boot stage avoids DMA transaction to download endpoint devices.
https://review.coreboot.org/c/coreboot/+/40968/6/src/soc/intel/tigerlake/chi... PS6, Line 157: clear_tbt_pcie_rp_bme(dev, PCI_DEVICE_ID_INTEL_TGL_TBT_RP3);
Why is it ever appropriate to have BME set on these ports in the firmware? A pci driver is straight […]
After bus scanning (static and generic), pci drivers resource operations (read/set/enable/assign) are completed at early boot stage before drivers are initialized.