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:
(3 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 119: clear_tbt_pcie_rp_bme
This could go in src/include/device/pci.h as like "pci_disable_bus_master()" or something similar.
ok, CB:41042 with pci_dev_disable_bus_master().
https://review.coreboot.org/c/coreboot/+/40968/6/src/soc/intel/tigerlake/chi... PS6, Line 134: platform_fsp_notify_status
That doesn't anser the question. […]
No crash or complain. As described in the commit message, it is for security season to avoid forwarding any DMA transaction to download endpoint devices before handing off to OS.
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 aren't we just adding a pci driver for the root ports so we can schedule work at the right place […]
We only need to disable root ports BME before handing off to OS. It seems proper to implement at this late boot stage after bs_payload_load execution. Adding pci driver for root ports and scheduling seems for complicated scenarios. I did not explore. Please advise alternatively place to clear BME.