From owner-freebsd-current@FreeBSD.ORG Mon Mar 26 20:31:10 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C496E1065678; Mon, 26 Mar 2012 20:31:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 97ED98FC1B; Mon, 26 Mar 2012 20:31:10 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 05453B963; Mon, 26 Mar 2012 16:31:10 -0400 (EDT) From: John Baldwin To: Jos Backus Date: Mon, 26 Mar 2012 16:29:28 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p10; KDE/4.5.5; amd64; ; ) References: <20120323222313.GA1331@troutmask.apl.washington.edu> <20120326174155.GA1931@troutmask.apl.washington.edu> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201203261629.28986.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 26 Mar 2012 16:31:10 -0400 (EDT) Cc: Ryan Stone , freebsd-current@freebsd.org, Rui Paulo , Steve Kargl Subject: Re: general protection fault panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 26 Mar 2012 20:31:10 -0000 On Monday, March 26, 2012 1:51:59 pm Jos Backus wrote: > On Mon, Mar 26, 2012 at 10:41 AM, Steve Kargl > wrote: > > On Mon, Mar 26, 2012 at 01:18:37PM -0400, John Baldwin wrote: > >> On Monday, March 26, 2012 12:21:29 pm Steve Kargl wrote: > >> > >> You know your APIC ID is 0, so you should be able to find the IRQ for vector > >> 51 from here in apic_idt_to_irq(): > >> > >> irq = lapics[apic_id].la_ioint_irqs[vector - APIC_IO_INTS]; > >> > >> Your apic_id is 0, and APIC_IO_INTS is 48, so you should be able to do this > >> in kgdb: > >> > >> p lapics[0].la_ioint_irqs[3] > >> > >> That should give you an index, and intr_lookup_source() just does an array > >> lookup. However, I'd be curious to see what the assembly looks like > >> (x/10i $rip at this frame). > >> > > > > > > (kgdb) p lapics[0].la_ioint_irqs[3] > > $1 = 16 > > (kgdb) frame 27 > > #27 0xffffffff806dc186 in acpi_cpu_c1 () > > at /usr/src/sys/amd64/acpica/acpi_machdep.c:97 > > 97 __asm __volatile("sti; hlt"); > > (kgdb) x/10i $rip > > 0xffffffff806dc186 : leaveq > > 0xffffffff806dc187 : retq > > 0xffffffff806dc188 : nopl 0x0(%rax,%rax,1) > > 0xffffffff806dc190 : push %rbp > > 0xffffffff806dc191 : mov %rsp,%rbp > > 0xffffffff806dc194 : push %r12 > > 0xffffffff806dc196 : push %rbx > > 0xffffffff806dc197 : mov %rdi,%rbx > > 0xffffffff806dc19a : > > callq 0xffffffff807551b0 > > 0xffffffff806dc19f : mov %rbx,%rdi > > > > > > In another email thread, it appears that jkim is chasing > > down some issues with the latest ACPI code. Perhaps, this > > is related? > > > > If it helps, I'll put kernel.debug and vmcore.0 at > > http://troutmask.apl.washington.edu/~kargl/jhb > > -- > > Steve > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > Just in case it's related: I'm seeing the following error on my > -current system when building with clang: > > clang -c -O -pipe -std=c99 -g -Wall -Wredundant-decls > -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes > -Wpointer-arith -Winline - > Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions > -Wmissing-include-dirs -fdiagnostics-show-option > -Wno-error-tautological-compare > -Wno-error-empty-body -Wno-error-parentheses-equality -nostdinc -I. > -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OP > TION_HEADERS -include opt_global.h -mno-aes -mno-avx -mno-mmx > -mno-sse -msoft-float -ffreestanding -fstack-protector -Werror > /usr/src/sys/ > x86/x86/local_apic.c > /usr/src/sys/x86/x86/local_apic.c:312:2: error: array index of '-16' > indexes before the beginning of the array [-Werror,-Warray-bounds] > lapics[apic_id].la_ioint_irqs[IDT_DTRACE_RET - APIC_IO_INTS] = > ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > /usr/src/sys/x86/x86/local_apic.c:123:2: note: array 'la_ioint_irqs' > declared here > int la_ioint_irqs[APIC_NUM_IOINTS + 1]; > ^ > 1 error generated. > *** [local_apic.o] Error code 1 No, that is just a straight up bug from when IDT_DTRACE_RET was changed to 0x20 from some high number. Hmm, I wonder how the person who did that chose 0x20 since 0x20 is mapped to the 8259A IRQ 0 and may not really be safe to use. :( We can come up with a different number (which at that point would make the relevant code in local_apic.c valid again). This should not be related to Steve's issue though I believe. -- John Baldwin