Date: Mon, 26 Mar 2012 10:51:59 -0700 From: Jos Backus <jos@catnook.com> To: Steve Kargl <sgk@troutmask.apl.washington.edu> Cc: freebsd-current@freebsd.org Subject: Re: general protection fault panic Message-ID: <CAETOPp2XhjbESoqtDKU0ecuK73npSPdpQrz3nfgRBCMSy1=9pg@mail.gmail.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 26, 2012 at 10:41 AM, Steve Kargl <sgk@troutmask.apl.washington.edu> 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 <acpi_cpu_c1+6>: =A0 =A0 leaveq > 0xffffffff806dc187 <acpi_cpu_c1+7>: =A0 =A0 retq > 0xffffffff806dc188 <acpi_cpu_c1+8>: =A0 =A0 nopl =A0 0x0(%rax,%rax,1) > 0xffffffff806dc190 <nexus_acpi_attach>: push =A0 %rbp > 0xffffffff806dc191 <nexus_acpi_attach+1>: =A0 =A0 =A0 mov =A0 =A0%rsp,%rb= p > 0xffffffff806dc194 <nexus_acpi_attach+4>: =A0 =A0 =A0 push =A0 %r12 > 0xffffffff806dc196 <nexus_acpi_attach+6>: =A0 =A0 =A0 push =A0 %rbx > 0xffffffff806dc197 <nexus_acpi_attach+7>: =A0 =A0 =A0 mov =A0 =A0%rdi,%rb= x > 0xffffffff806dc19a <nexus_acpi_attach+10>: > =A0 =A0callq =A00xffffffff807551b0 <nexus_init_resources> > 0xffffffff806dc19f <nexus_acpi_attach+15>: =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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAETOPp2XhjbESoqtDKU0ecuK73npSPdpQrz3nfgRBCMSy1=9pg>