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: Mon, 4 Jul 2016 10:17:11 +0200
On Sun, Jul 03, 2016 at 06:50:01PM +0000, David Young wrote:
[snip]
> IIUC, extended configuration space is memory-mapped? Looks like
> memory-mapped I/O is not enabled on 0:29:0. Perhaps that explains
> the NMI. Does ACPI expect for NetBSD to set the enables? If you set
> PCI_COMMAND_MEM_ENABLE on the CSR for 0:29:0 before ACPI probes it,
> maybe that will also prevent the NMI?
With this change
--- acpi_mcfg.c 11 Oct 2015 21:49:22 -0000 1.2
+++ acpi_mcfg.c 4 Jul 2016 08:14:03 -0000
@@ -489,4 +489,12 @@ acpimcfg_device_probe(const struct pci_a
mb->last_probed = tag;
+reg = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG);
+printf("[ %03d:%02d:%d: %08x", bus, dev, func, reg);
+if ((reg & PCI_COMMAND_MEM_ENABLE) == 0) {
+ reg |= PCI_COMMAND_MEM_ENABLE;
+ printf(" -> %08x", reg);
+ pci_conf_write(pc, tag, PCI_COMMAND_STATUS_REG, reg);
+}
+printf(" ]\n");
/* Probe extended configuration space. */
if (((reg = pci_conf_read(pc, tag, PCI_CONF_SIZE)) == (pcireg_t)-1) ||
I get
pci0 at mainbus0 bus 0: configuration mode 1
[ 000:00:0: 00900146 ]
acpi0: MCFG: 000:00:0: Ok (cfg[0x100]=0x00000000)
[ 000:00:1: 00000100 -> 00000102 ]
acpi0: MCFG: 000:00:1: Ok (cfg[0x100]=0x00000000)
[ 000:02:0: 00100147 ]
acpi0: MCFG: 000:02:0: Ok (cfg[0x100]=0x00010001)
[ 000:04:0: 00100147 ]
acpi0: MCFG: 000:04:0: Ok (cfg[0x100]=0x00010001)
[ 000:06:0: 00100147 ]
acpi0: MCFG: 000:06:0: Ok (cfg[0x100]=0x00010001)
[ 000:07:0: 00100147 ]
acpi0: MCFG: 000:07:0: Ok (cfg[0x100]=0x00010001)
[ 000:08:0: 00800000 -> 00800002 ]
acpi0: MCFG: 000:08:0: Ok (cfg[0x100]=0x00000000)
[ 000:29:0: 02800005 -> 02800007 ]
NMI ... going to debugger
--
J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
Home |
Main Index |
Thread Index |
Old Index