Date: Wed, 03 Dec 2008 20:01:21 +0100 From: Dimitry Andric <dimitry@andric.com> To: FreeBSD STABLE <freebsd-stable@freebsd.org> Subject: device_attach: acpi_hpet0 attach returned 12 Message-ID: <4936D781.8090907@andric.com>
next in thread | raw e-mail | index | archive | help
Hi, Apparently there's a HPET on one of my 7.1-ALMOST-STABLE machines, and it's enabled in the BIOS too, but it fails to attach: Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 7.1-PRERELEASE #0: Fri Nov 28 16:04:48 CET 2008 dim@vfbsd7.home.andric.com:/usr/obj/usr/src/sys/TENSOR Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: VIA Esther processor 1200MHz (1200.01-MHz 686-class CPU) Origin = "CentaurHauls" Id = 0x6a9 Stepping = 9 Features=0xa7c9baff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,APIC,SEP,MTRR,PGE,CMOV,PAT,CLFLUSH,ACPI,MMX,FXSR,SSE,SSE2,TM,PBE> Features2=0x181<SSE3,EST,TM2> VIA Padlock Features=0x3fcc<RNG,AES,AES-CTR,SHA1,SHA256,RSA> real memory = 518914048 (494 MB) avail memory = 498270208 (475 MB) ACPI APIC Table: <CN700 AWRDACPI> ioapic0 <Version 0.3> irqs 0-23 on motherboard kbd1 at kbdmux0 cryptosoft0: <software crypto> on motherboard padlock0: <AES-CBC,SHA1,SHA256> on motherboard acpi0: <CN700 AWRDACPI> on motherboard acpi0: [ITHREAD] acpi0: Power Button (fixed) acpi0: reservation of 0, a0000 (3) failed acpi0: reservation of 100000, 1ede0000 (3) failed Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 acpi_hpet0: <High Precision Event Timer> iomem 0xfe800000-0xfe8003ff on acpi0 device_attach: acpi_hpet0 attach returned 12 [...] It looks like the HPET should be at address 0xfe800000-0xfe8003ff, but if I look in the output of "devinfo -rv", I see the following: nexus0 cryptosoft0 padlock0 apic0 acpi0 Interrupt request lines: 9 I/O ports: 0x10-0x1f 0x22-0x3f 0x44-0x5f 0x62-0x63 0x65-0x6f 0x74-0x7f 0x91-0x93 0xa2-0xbf 0xe0-0xef 0x290-0x297 0x400-0x47f 0x4d0-0x4d1 0x500-0x50f 0x800-0x805 I/O memory addresses: 0xf0000-0xfffff 0x1eee0000-0x1eefffff 0xfe800000-0xfe8000ff [...] So apparently the ACPI memory range information says the HPET only uses 256 bytes of iomem, while FreeBSD assumes 1024. The latter is correct, at least according to the Intel HPET spec I dug up somewhere. When I dump ACPI info using acpidump -dt, I see: [...] /* HPET: Length=56, Revision=1, Checksum=196, OEMID=CN700, OEM Table ID=AWRDACPI, OEM Revision=0x42302e31, Creator ID=AWRD, Creator Revision=0x98 HPET Number=0 ADDR=0xfe800000:0[0] (Memory) HW Rev=0x1 Comparitors=2 Counter Size=0 Legacy IRQ routing capable={TRUE} PCI Vendor ID=0x1106 Minimal Tick=144 */ [...] Device (MEM) { Name (_HID, EisaId ("PNP0C01")) Method (_CRS, 0, NotSerialized) { Name (BUF0, ResourceTemplate () { Memory32Fixed (ReadOnly, 0x000F0000, // Address Base 0x00010000, // Address Length ) Memory32Fixed (ReadWrite, 0xFE800000, // Address Base 0x00000100, // Address Length ) [...] Device (HPET) { Name (_HID, EisaId ("PNP0103")) Name (ATT3, ResourceTemplate () { IRQNoFlags () {0} IRQNoFlags () {8} Memory32Fixed (ReadWrite, 0xFE800000, // Address Base 0x00000400, // Address Length ) }) [...] So apparently the devinfo information is gotten from ACPI's "Device (MEM)" declaration, which seems to be inconsistent with the "Device (HPET)" declaration later on. My question is therefore: is this just buggy ACPI information in the BIOS, and can I override it with a custom DSDT file in the boot loader? Or is there some other workaround?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4936D781.8090907>