From owner-freebsd-current@FreeBSD.ORG Mon Mar 26 17:52:01 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1ED5106567B for ; Mon, 26 Mar 2012 17:52:01 +0000 (UTC) (envelope-from jos@catnook.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6178FC14 for ; Mon, 26 Mar 2012 17:52:00 +0000 (UTC) Received: by eaaf13 with SMTP id f13so1758611eaa.13 for ; Mon, 26 Mar 2012 10:52:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding:x-gm-message-state; bh=lhGfQIEL5X6PYV9YmGQupnKOzcE0rCV3ikdf9Z/E6xc=; b=RrILSG3vcGY1EQCq7DpsK7KtU1CyTRHUbPY7iTg9X0veFQe5MmeX76SdLY3qaHkMbG gfHhcYfz6w4bT0LptvFeOkS/bwDOoKXH+/LjfZgz62gaxZCHrA9bj6PLqHP2yd/WMRAu lTCx3Efrz2YG6v7lOzm3LU/M5CaQ/+SHmpbvsjPlgOc4StgLHC/UhXOGR66YC+CVxk7t FjVtcFch0PTNUKipfPNUQ/eN1Rli2GQyMJ8nC8fvr/T790PM4uHxaNDHpGgXZZ047I00 mViCFnPJw7gRCBytzB9QQSvG70hrM6S0lCi4ugJ9Z+eBO5J9aWJvHVCM1o6h80GY9j3m JvMg== MIME-Version: 1.0 Received: by 10.213.22.143 with SMTP id n15mr1468536ebb.84.1332784319783; Mon, 26 Mar 2012 10:51:59 -0700 (PDT) Received: by 10.14.130.201 with HTTP; Mon, 26 Mar 2012 10:51:59 -0700 (PDT) In-Reply-To: <20120326174155.GA1931@troutmask.apl.washington.edu> References: <20120323222313.GA1331@troutmask.apl.washington.edu> <20120326154359.GB14611@troutmask.apl.washington.edu> <20120326162129.GB1373@troutmask.apl.washington.edu> <201203261318.37373.jhb@freebsd.org> <20120326174155.GA1931@troutmask.apl.washington.edu> Date: Mon, 26 Mar 2012 10:51:59 -0700 Message-ID: From: Jos Backus To: Steve Kargl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQmgSbiKSFIw9t8RyzTb2HLC0N0MxXaFOXv/BoFjw+pKhgXim4w+jaM87tS3CIU1kOCXKakp Cc: freebsd-current@freebsd.org 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 17:52:01 -0000 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 ve= ctor >> 51 from here in apic_idt_to_irq(): >> >> =A0 =A0 =A0 irq =3D 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 t= his >> in kgdb: >> >> p lapics[0].la_ioint_irqs[3] >> >> That should give you an index, and intr_lookup_source() just does an arr= ay >> lookup. =A0However, 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 =3D 16 > (kgdb) frame 27 > #27 0xffffffff806dc186 in acpi_cpu_c1 () > =A0 =A0at /usr/src/sys/amd64/acpica/acpi_machdep.c:97 > 97 =A0 =A0 =A0 =A0 =A0 =A0 =A0__asm __volatile("sti; hlt"); > (kgdb) x/10i $rip > 0xffffffff806dc186 : =A0 =A0 leaveq > 0xffffffff806dc187 : =A0 =A0 retq > 0xffffffff806dc188 : =A0 =A0 nopl =A0 0x0(%rax,%rax,1) > 0xffffffff806dc190 : push =A0 %rbp > 0xffffffff806dc191 : =A0 =A0 =A0 mov =A0 =A0%rsp,%rb= p > 0xffffffff806dc194 : =A0 =A0 =A0 push =A0 %r12 > 0xffffffff806dc196 : =A0 =A0 =A0 push =A0 %rbx > 0xffffffff806dc197 : =A0 =A0 =A0 mov =A0 =A0%rdi,%rb= x > 0xffffffff806dc19a : > =A0 =A0callq =A00xffffffff807551b0 > 0xffffffff806dc19f : =A0 =A0 =A0mov =A0 =A0%rbx,%rd= i > > > In another email thread, it appears that jkim is chasing > down some issues with the latest ACPI code. =A0Perhaps, 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=3Dc99 -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] =3D ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /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 --=20 Jos Backus jos at catnook.com