Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/42459 )
Change subject: [RFC] device: Add method for configuring bus master based on config option ......................................................................
Patch Set 8:
(2 comments)
So, long story short, we would like to clean the BM situation in coreboot up before we start fiddling with IOMMUs in coreboot or the payloads. There are many devices in coreboot for which we enable it and we couldn't find a reason.
Beside random devices throughout the tree (which are covered by the next commit) there are two cases in the device/ code, 1. PCI bridges and 2. "system" class devices. At least for the PCI bridges we know it's needed because most payloads (in their current state) wouldn't be able to work with devices below bridges. The "system" class devices are very odd, the only ones we encountered are SD card controllers and Intel's newish Gaussian Mixture Model device... both don't seem to need special attention. Devices that just need it, like Intel's host and LPC bridges have the BM bit hardwired to 1.
For all but the bridge devices we wanted to add the Kconfig switch here in case somebody feels uncomfortable about just bluntly disabling BM everywhere. But if nobody sees a problem in that, we could also just skip the Kconfig ;)
Opinions most welcome!
https://review.coreboot.org/c/coreboot/+/42459/6//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/42459/6//COMMIT_MSG@16 PS6, Line 16: for internal PCI devices.
I was confused on bus master vs memory decode. […]
Most promiment payloads would indeed be affected by a global switch. They don't enable bus mastering for PCI bridges. So the plan is to have a separate option for those.
The original thought was to only have a switch for devices where we couldn't find a reason (e.g. in EDS/BIOS Spec) why coreboot enables bus mastering. Turned out that we couldn't find a reason for any device but Intel's IGD (which, rather oddly, even scans out a linear framebuffer with disabled bus mastering ^^).
https://review.coreboot.org/c/coreboot/+/42459/8/src/device/Kconfig File src/device/Kconfig:
https://review.coreboot.org/c/coreboot/+/42459/8/src/device/Kconfig@520 PS8, Line 520: Enable This should say `allow` too. And some help text would be nice that this enables bus mastering for devices for unknown reasons.