summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-06-17 07:41:53 +0000
committerhselasky <hselasky@FreeBSD.org>2015-06-17 07:41:53 +0000
commit46e7b2b082c772cd1bc03b7398cd04f046efa61a (patch)
tree2d70ee319cfa0dd6d0fcb3e5b3075c5b05dca204 /sys/dev/pci
parent1786513a8dec318f224361d099419987e8e9a761 (diff)
downloadFreeBSD-src-46e7b2b082c772cd1bc03b7398cd04f046efa61a.zip
FreeBSD-src-46e7b2b082c772cd1bc03b7398cd04f046efa61a.tar.gz
MFC r284012:
Disable VGA PCI interrupts until a chipset driver is loaded for VGA PCI devices. Else unhandled display adapter interrupts might freeze the CPU or consume a lot of CPU. PR: 156596
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/vga_pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 6e733f5..835293c 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -125,6 +125,13 @@ vga_pci_is_boot_display(device_t dev)
if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0)
return (0);
+ /*
+ * Disable interrupts until a chipset driver is loaded for
+ * this PCI device. Else unhandled display adapter interrupts
+ * might freeze the CPU.
+ */
+ pci_write_config(dev, PCIR_COMMAND, config | PCIM_CMD_INTxDIS, 2);
+
/* This video card is the boot display: record its unit number. */
vga_pci_default_unit = unit;
device_set_flags(dev, 1);
OpenPOWER on IntegriCloud