NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/51251: ACPI device probe raises NMI
The following reply was made to PR kern/51251; it has been noted by GNATS.
From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: David Young <dyoung%pobox.com@localhost>
Subject: Re: kern/51251: ACPI device probe raises NMI
Date: Sun, 10 Jul 2016 16:30:22 +0200
The following diff fixes the problem for me:
Index: acpi_mcfg.c
===================================================================
RCS file: /cvsroot/src/sys/dev/acpi/acpi_mcfg.c,v
retrieving revision 1.2
diff -p -u -2 -r1.2 acpi_mcfg.c
--- acpi_mcfg.c 11 Oct 2015 21:49:22 -0000 1.2
+++ acpi_mcfg.c 10 Jul 2016 14:26:33 -0000
@@ -491,5 +491,5 @@ acpimcfg_device_probe(const struct pci_a
/* Probe extended configuration space. */
if (((reg = pci_conf_read(pc, tag, PCI_CONF_SIZE)) == (pcireg_t)-1) ||
- (alias = acpimcfg_ext_conf_is_aliased(pc, tag))) {
+ (reg == 0) || (alias = acpimcfg_ext_conf_is_aliased(pc, tag))) {
aprint_debug_dev(acpi_sc->sc_dev,
"MCFG: %03d:%02d:%d: invalid config space "
@@ -527,4 +527,7 @@ acpimcfg_map_bus(device_t self, pci_chip
bus_space_handle_t bsh;
bus_addr_t baddr;
+ pcitag_t tag;
+ pcireg_t reg;
+ bool is_e7520_mch;
int boff;
int last_dev, last_func;
@@ -570,6 +573,27 @@ acpimcfg_map_bus(device_t self, pci_chip
mb->last_probed = pci_make_tag(pc, bus, 0, 0);
+ /*
+ * On an Intel E7520 we have to temporarily disable
+ * Enhanced Config Access error detection and reporting
+ * by setting the appropriate error mask in HI_ERRMASK register.
+ *
+ * See "Intel E7520 Memory Controller Hub (MCH) Datasheet",
+ * Document 303006-002, pg. 82
+ */
+ tag = pci_make_tag(pc, 0, 0, 1);
+ reg = pci_conf_read(pc, tag, PCI_ID_REG);
+ is_e7520_mch = (reg ==
+ PCI_ID_CODE(PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_E7525_MCHER));
+ if (is_e7520_mch) {
+ reg = pci_conf_read(pc, tag, 0x54);
+ pci_conf_write(pc, tag, 0x54, reg | 0x20);
+ }
+
acpimcfg_scan_bus(sc, pc, bus);
+ if (is_e7520_mch) {
+ pci_conf_write(pc, tag, 0x54, reg);
+ }
+
/* Unmap extended configration space of all dev/func. */
bus_space_unmap(seg->ms_bst, bsh, ACPIMCFG_SIZE_PER_BUS);
Does it qualify for commit?
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
Home |
Main Index |
Thread Index |
Old Index