coreboot-kgpe-d16/src/device
Felix Singer e4a7d9f693 device: Add method to configure bus mastering based on Kconfig
The bus master bit is set at many places in coreboot's code, but the
reason for that is not quite clear. We examined not setting the
bus master bit whereever possible and tried booting without it,
which worked fine for internal PCI devices but not for PCIe. As a PCIe
device we used a Samsung M.2 NVMe SSD.

For security reasons, we would like to disable bus mastering where
possible. Depending on the device, bus mastering might get enabled
by the operating system (e.g. for iGPU) and it might be required for
some devices to work properly. However, the idea is to leave it disabled
and configure the IOMMU first before enabling it.

To have some sort of "backwards compatibility", add a method which
configures bus mastering based on an additional config option. Since
CB:42460 makes usage of this treewide, enable it by default to keep the
current behaviour for now.

Tested with Siemens/Chili, a Coffee Lake based platform.

Change-Id: I876c48ea3fb4f9cf7b6a5c2dcaeda07ea36cbed3
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42459
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-31 18:34:22 +00:00
..
dram src: Change BOOL CONFIG_ to CONFIG() in comments & strings 2020-07-26 21:20:30 +00:00
oprom src: Use space after 'if', 'for' 2020-08-05 11:37:00 +00:00
Kconfig device: Add method to configure bus mastering based on Kconfig 2020-08-31 18:34:22 +00:00
Makefile.inc device/xhci: Add xHCI utility to enumerate capabilities 2020-06-10 18:50:36 +00:00
azalia_device.c {sb/intel/*/azalia.c,device/azalia_device.c}: Reduce differences 2020-08-17 06:58:45 +00:00
cardbus_device.c src: Never set ISA Enable on PCI bridges 2020-07-28 10:54:02 +00:00
cpu_device.c
device.c treewide: Replace CONFIG(ARCH_xx) tests 2020-06-17 21:13:09 +00:00
device_const.c Change all assert(0) to BUG() 2020-08-03 05:15:15 +00:00
device_util.c device_util,agesa/family14: Do not consider unassigned resources in find_pci_tolm() 2020-05-26 15:15:05 +00:00
hypertransport.c
i2c.c
i2c_bus.c
mmio.c
pci_class.c
pci_device.c Revert "device/pci_device.c: Do not complain about disabled devices" 2020-08-04 22:07:21 +00:00
pci_early.c
pci_ops.c
pci_rom.c device/pci_rom.c: Treat BASE_DISPLAY class as GPU 2020-08-15 05:59:49 +00:00
pciexp_device.c Revert "Revert "pciexp_device: Add option to allocate prefetch memory above 4G boundary"" 2020-05-28 09:42:46 +00:00
pcix_device.c
pnp_device.c
resource_allocator_common.c device: Move resource allocation into a separate compilation unit 2020-05-26 15:15:21 +00:00
resource_allocator_v3.c device/resource_allocator_v3: Do not set IORESOURCE_ASSIGNED for size 0 resource 2020-05-26 15:15:54 +00:00
resource_allocator_v4.c device/resource_allocator_v4: Improve the logging in resource allocator 2020-05-28 09:43:44 +00:00
root_device.c
smbus_ops.c
software_i2c.c
xhci.c device/xhci: Add helper method to iterate over xhci_supported_protocl 2020-07-12 17:01:24 +00:00