From owner-freebsd-current@FreeBSD.ORG Fri Jan 7 22:08:35 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2015816A4CE; Fri, 7 Jan 2005 22:08:35 +0000 (GMT) Received: from pne-smtpout1-sn2.hy.skanova.net (pne-smtpout1-sn2.hy.skanova.net [81.228.8.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BE8143D48; Fri, 7 Jan 2005 22:08:34 +0000 (GMT) (envelope-from pawel.worach@telia.com) Received: from [127.0.0.1] (81.225.14.129) by pne-smtpout1-sn2.hy.skanova.net (7.1.026.6) (authenticated as u86211448) id 4199C6960003A2E1; Fri, 7 Jan 2005 23:08:02 +0100 Message-ID: <41DF0839.6040700@telia.com> Date: Fri, 07 Jan 2005 23:07:53 +0100 From: Pawel Worach User-Agent: Mozilla Thunderbird 1.0 (X11/20041223) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nate Lawson References: <20587818.1102626838092.JavaMail.tomcat@pne-ps4-sn1> <41DEC937.5030709@telia.com> <41DED722.7070801@root.org> <200501071451.01876.jhb@FreeBSD.org> <41DEED05.4040000@root.org> In-Reply-To: <41DEED05.4040000@root.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@FreeBSD.org cc: John Baldwin Subject: Re: page fault panic in device_get_softc/acpi_pcib_route_interrupt X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2005 22:08:35 -0000 Nate Lawson wrote: > Pawel, can you split out the lines so we can isolate where the panic is > occurring? At the end of acpi_pcib.c, before the call to > acpi_pci_link_route_interrupt(), add: > > { > device_t foo = acpi_get_device(lnkdev); > printf("acpi handle %p, name %s\n", lnkdev, lnkdev? acpi_name(lnkdev) : > "none"); > printf("link device: %p index %d\n", foo, prt->SourceIndex); > printf("device parent %s, state %x\n", > device_get_nameunit(device_get_parent(foo)), device_get_state(foo)); > } > Doesn't look like device_get_state() likes this device either. Is something strange with the trace below? I'm certain I added the printf's right above http://fxr.watson.org/fxr/source/dev/acpica/acpi_pcib.c#L257 so shouldn't there be a frame with acpi_pcib_route_interrupt() in between the device_get_state() and acpi_pcib_acpi_route_interrupt() frames? acpi_MatchHid() Hid: PNP0A03 acpi_MatchHid() Hid: PNP0A03 pcib0: on acpi0 pci0: on pcib0 acpi handle 0xc1ec8d20, name \LPUS link device: 0 index 0 Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x38 fault code = supervisor read, page not present instruction pointer = 0x8:0xc05203d7 stack pointer = 0x10:0xc08209f8 frame pointer = 0x10:0xc0820a5c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 0 (swapper) [thread pid 0 tid 0 ] Stopped at device_get_state+0x7: movl 0x38(%eax),%eax db> tr Tracing pid 0 tid 0 td 0xc06ef960 device_get_state(c1f16b80,c1f8b780,1,c1f7e1d4,1) at device_get_state+0x7 acpi_pcib_acpi_route_interrupt(c1f16b80,c1f8b780,1,c06c7f10,c1f8b808) at acpi_pcib_acpi_route_interrupt+0x2f pci_assign_interrupt_method(c1f16c00,c1f8b780,f,2,24) at pci_assign_interrupt_method+0x71 pci_add_child(c1f16c00,c1f8b800,f,2,80) at pci_add_child+0x207 pci_add_children(c1f16c00,0,80,c0820b54,c052188f) at pci_add_children+0x123 acpi_pci_attach(c1f16c00,c1f4484c,c06c14ec,c06aa680,0) at acpi_pci_attach+0x86 device_attach(c1f16c00,c1ed5d80,c0820bdc,c07c54fc,c1f16b80) at device_attach+0x2c9 bus_generic_attach(c1f16b80,c07d9630,0,c0820bcc,0) at bus_generic_attach+0x18 acpi_pcib_attach(c1f16b80,c1f7e1d4,0,c0820c04,c07c00c7) at acpi_pcib_attach+0xec acpi_pcib_acpi_attach(c1f16b80,c1f4384c,c06c14ec,c06aa680,0) at acpi_pcib_acpi_attach+0xf9 device_attach(c1f16b80,2f,c0820cbc,c07c28f4,c1ed5d80) at device_attach+0x2c9 bus_generic_attach(c1ed5d80,2e,2f,c1f7dc08,2e) at bus_generic_attach+0x18 acpi_attach(c1ed5d80,c1f4604c,c06c14ec,c06aa680,0) at acpi_attach+0x7b4 device_attach(c1ed5d80,c1f15000,c0820d18,c0679ffa,c1f15000) at device_attach+0x2c9 bus_generic_attach(c1f15000,c1f1504c,c0820d54,c0520839,c1f15000) at bus_generic_attach+0x18 nexus_attach(c1f15000,c1f3c04c,c06c14ec,c06aa680,0) at nexus_attach+0x1a device_attach(c1f15000,c06dda30,c0820d78,c06670d8,c1f15680) at device_attach+0x2c9 root_bus_configure(c1f15680,c06bb361,0,c0820d98,c04d1126) at root_bus_configure+0x19 configure(0,0,c1e6f774,81ec00,81e000) at configure+0x28 mi_startup() at mi_startup+0xd6 begin() at begin+0x2c db> (gdb) l *device_get_state+0x7 0xc05203d7 is in device_get_state (/usr/src/sys/kern/subr_bus.c:2055). 2050 * @brief Return the device's state 2051 */ 2052 device_state_t 2053 device_get_state(device_t dev) 2054 { 2055 return (dev->state); 2056 } 2057 2058 /** 2059 * @brief Set the DF_ENABLED flag for the device -- Pawel