device: Add a disabling PCIe device bus master function
A function pci_dev_disable_bus_master() is created. This function can be used to disable Thunderbolt PCIe root ports, bridges and devices for Vt-d based security platform at end of boot service. BUG=None TEST=Verified PCIe device bus master enable bit is cleared. Signed-off-by: John Zhao <john.zhao@intel.com> Change-Id: Ie92a15bf2c66fdc311098acb81019d4fb7f68313 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41042 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
aaebfa800c
commit
95b4ece0fe
|
@ -1643,4 +1643,9 @@ void pci_assign_irqs(struct device *dev, const unsigned char pIntAtoD[4])
|
|||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void pci_dev_disable_bus_master(const struct device *dev)
|
||||
{
|
||||
pci_update_config16(dev, PCI_COMMAND, ~PCI_COMMAND_MASTER, 0x0);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -127,6 +127,7 @@ static inline int pci_base_address_is_memory_space(unsigned int attr)
|
|||
return (attr & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_MEMORY;
|
||||
}
|
||||
|
||||
void pci_dev_disable_bus_master(const struct device *dev);
|
||||
#endif /* CONFIG_PCI */
|
||||
|
||||
void pci_early_bridge_init(void);
|
||||
|
|
Loading…
Reference in New Issue