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:
Subject: Re: kern/51251: ACPI device probe raises NMI
Date: Sat, 2 Jul 2016 17:46:23 +0200
Some further info:
The machine has a TCO device "tco0 at ichlpcib0" and it boots with
LPCIB_SMI_EN enabled. There is no BIOS option to disable this bit.
tco0 will unset this bit but it is much too late. With the attached
diff (an ugly proof-of-concept) the machine boots multiuser.
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
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 22 Jun 2016 10:31:33 -0000
@@ -42,4 +42,6 @@ __KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,
#include <dev/acpi/acpi_mcfg.h>
+#include <dev/ic/i82801lpcreg.h>
+
#include "locators.h"
@@ -565,4 +567,26 @@ acpimcfg_map_bus(device_t self, pci_chip
aprint_debug("\n");
+ for (i = 0; i < 32; i++) {
+ pcitag_t tag;
+ pcireg_t reg, ioreg;
+ bus_space_handle_t ioh;
+
+ tag = pci_make_tag(pc, bus, i, 0);
+ reg = pci_conf_read(pc, tag, 0);
+ if (reg != PCI_ID_CODE(PCI_VENDOR_INTEL,
+ PCI_PRODUCT_INTEL_82801EB_LPC))
+ continue;
+
+ reg = pci_conf_read(pc, tag, LPCIB_PCI_PMBASE);
+ if (bus_space_map(x86_bus_space_io, PCI_MAPREG_IO_ADDR(reg),
+ LPCIB_PCI_PM_SIZE, 0, &ioh) != 0)
+ continue;
+
+ ioreg = bus_space_read_4(x86_bus_space_io, ioh, LPCIB_SMI_EN);
+ ioreg &= ~LPCIB_SMI_EN_TCO_EN;
+ bus_space_write_4(x86_bus_space_io, ioh, LPCIB_SMI_EN, ioreg);
+ bus_space_unmap(x86_bus_space_io, ioh, LPCIB_PCI_PM_SIZE);
+ }
+
/* Probe extended configuration space of all devices. */
memset(mb->valid_devs, 0xff, sizeof(mb->valid_devs));
Home |
Main Index |
Thread Index |
Old Index