acpi_resource bug?

2011-02-13 Thread Matthew Fleming
I'm not very familiar with the acpi code, but we have seen an
intermittent issue on boot:

Panic occurred in module kernel loaded at 0x8010:

Stack: --
kernel:trap_fatal+0xac
kernel:trap_pfault+0x24c
kernel:trap+0x42e
kernel:bcopy+0x16
kernel:AcpiWalkResources+0xdf
kernel:acpi_lookup_irq_resource+0x9e
kernel:acpi_alloc_resource+0x249
kernel:bus_alloc_resource+0x97
kernel:sioattach+0x446
kernel:device_attach+0x63
kernel:bus_generic_attach+0x27
kernel:acpi_probe_children+0x50
kernel:acpi_attach+0x836
kernel:device_attach+0x63
kernel:bus_generic_attach+0x27
kernel:nexus_attach+0x25
kernel:device_attach+0x63
kernel:root_bus_configure+0x2d
kernel:configure+0x1a
kernel:mi_startup+0x64
--
cpuid = 0; apic id = 00
fault virtual address   = 0xff8003abe000
fault code  = supervisor read data, page not present

acpi_lookup_irq_handler() is trying to bcopy an entire ACPI_RESOURCE
(68 bytes) from the input pointer, even though in this case the
resource was a ACPI_RESOURCE_TYPE_IRQ (5 bytes), and the loop in
AcpiWalkResourcessaw is seeing res-Length == 0x10.

In this case, I found the following resouces on the list:

(gdb) x/2wx  0xff8003abdfb0
0xff8003abdfb0: 0x0004  0x0010
(gdb) x/2wx  0xff8003abdfc0
0xff8003abdfc0: 0x0004  0x0010
(gdb) x/2wx  0xff8003abdfd0
0xff8003abdfd0: 0x  0x0010
(gdb) x/2wx  0xff8003abdfe0
0xff8003abdfe0: 0x0001  0x0010
(gdb) x/2wx  0xff8003abdff0
0xff8003abdff0: 0x0007  0x0010

So copying 68 bytes from 0xff8003abdfd0 will always fault.

What I wonder is the following:

1) should the length of the bcopy() be changed to either respect
res-Length or the actual length of the ACPI_RESOURCE_DATA for the
type?

2) why would there be no memory mapped at the next virtual page on
some boots, but not others?  I *think* that a reboot doesn't clear the
issue, but booting into a different kernel with no relevant changes
will change whether the panic on boot is hit.

Thanks,
matthew
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


[head] does not build arm

2011-02-13 Thread Oliver Pinter
Hi all!

I try to build 9-CURRENT for arm, but become this error:

tcp_output.o(.text+0x2b00): In function `tcp_addoptions':
: undefined reference to `__ucmpdi2'
*** Error code 1

Stop in /usr/home/op/xtalin/build/arm.arm/usr/9-CURRENT.git/sys/DB-88F5XXX.
*** Error code 1

the command is:
# make buildkernel TARGET_ARCH=arm KERNCONF=DB-88F5XXX

host:
FreeBSD pandora-devel9 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Sun Feb 13
22:41:19 CET 2011
root@pandora-devel9:/usr/obj/usr/9-CURRENT.git/sys/GENERIC  amd64

and the top of the source:
commit 7eaeb4db8ae148ecfcf232bf7652d9cf508788d3
Author: uqs uqs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Date:   Sun Feb 13 22:17:49 2011 +

Add back soon-to-be-release FreeBSD 7.4 which got clobbered in the previous
merges.


git-svn-id: svn://svn.freebsd.org/base/head@218672
ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org