From owner-freebsd-acpi@FreeBSD.ORG Thu Mar 31 04:19:09 2005 Return-Path: Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E74F16A4CE for ; Thu, 31 Mar 2005 04:19:09 +0000 (GMT) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 7A29843D48 for ; Thu, 31 Mar 2005 04:19:07 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 23166 invoked by uid 0); 31 Mar 2005 04:19:05 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 31 Mar 2005 04:19:05 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.3/8.13.3) with ESMTP id j2V4IrF9001840; Thu, 31 Mar 2005 12:18:53 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <424B7A2D.5060902@alphaque.com> Date: Thu, 31 Mar 2005 12:18:53 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050326 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-acpi@freebsd.org References: <42334057.5070705@gmx.net> <42492F0B.3040704@alphaque.com> In-Reply-To: <42492F0B.3040704@alphaque.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: enable acpi X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Mar 2005 04:19:09 -0000 acpi related, but on freebsd 4.11 (cvsupped and built on 24 march). i've compiled with device acpica in the kernel, but i get sporadic page faults as attached. i do know that acpica is experimental and that LINT does warn of kernel panics and machine hangs. however i was wondering if anyone has got this working succesfully on any machine. gdb trace of the kernel crashdump reveals: #0 dumpsys () at ../../kern/kern_shutdown.c:487 #1 0xc01d3e17 in boot (howto=260) at ../../kern/kern_shutdown.c:316 #2 0xc01d4255 in panic (fmt=0xc03c816c "%s") at ../../kern/kern_shutdown.c:595 #3 0xc03484df in trap_fatal (frame=0xc03d15ac, eva=48) at ../../i386/i386/trap.c:974 #4 0xc034818d in trap_pfault (frame=0xc03d15ac, usermode=0, eva=48) at ../../i386/i386/trap.c:867 #5 0xc0347d33 in trap (frame={tf_fs = 16, tf_es = -969474032, tf_ds = -969474032, tf_edi = 0, tf_esi = -1043903232, tf_ebp = -1069738508, tf_isp = -1069738536, tf_ebx = -1069565924, tf_edx = 6867968, tf_ecx = -693655040, tf_eax = 0, tf_trapno = 12, tf_err = 0, tf_eip = -1070897928, tf_cs = 8, tf_eflags = 66182, tf_esp = -1043903232, tf_ss = -1043903232}) at ../../i386/i386/trap.c:466 #6 0xc02b64f8 in acquire_lock (lk=0xc03fb81c) at ../../ufs/ffs/ffs_softdep.c:266 #7 0xc02ba5f8 in softdep_update_inodeblock (ip=0xc1c74d00, bp=0xc63732a8, waitfor=0) at ../../ufs/ffs/ffs_softdep.c:3813 #8 0xc02b562d in ffs_update (vp=0xd6a7aa00, waitfor=0) at ../../ufs/ffs/ffs_inode.c:106 #9 0xc02bf15d in ffs_fsync (ap=0xc03d16a0) at ../../ufs/ffs/ffs_vnops.c:273 #10 0xc02bda23 in ffs_sync (mp=0xc1c31800, waitfor=2, cred=0xc0d8d680, p=0xc0444d00) at vnode_if.h:558 #11 0xc02058cb in sync (p=0xc0444d00, uap=0x0) at ../../kern/vfs_syscalls.c:583 #12 0xc01d3bb2 in boot (howto=256) at ../../kern/kern_shutdown.c:235 #13 0xc01d4255 in panic (fmt=0xc03c816c "%s") at ../../kern/kern_shutdown.c:595 #14 0xc03484df in trap_fatal (frame=0xc03d17b8, eva=112) at ../../i386/i386/trap.c:974 #15 0xc034818d in trap_pfault (frame=0xc03d17b8, usermode=0, eva=112) at ../../i386/i386/trap.c:867 #16 0xc0347d33 in trap (frame={tf_fs = -1069744112, tf_es = -1070137328, tf_ds = -1070137328, tf_edi = 0, tf_esi = -1069380132, tf_ebp = -1069737956, tf_isp = -1069738012, tf_ebx = 0, tf_edx = 12800, tf_ecx = 200, tf_eax = 6291456, tf_trapno = 12, tf_err = 0, tf_eip = -1071812936, tf_cs = 8, tf_eflags = 65606, tf_esp = 12800, tf_ss = 274877907}) at ../../i386/i386/trap.c:466 #17 0xc01d6eb8 in tsleep (ident=0xc0428ddc, priority=0, wmesg=0xc03806a3 "acpislp", timo=200) at ../../kern/kern_synch.c:436 #18 0xc0179ff2 in AcpiOsSleep (Seconds=0, Milliseconds=200) at ../../dev/acpica/Osd/OsdSchedule.c:256 #19 0xc0159685 in AcpiExSystemDoSuspend (HowLong=200) at ../../contrib/dev/acpica/exsystem.c:261 #20 0xc015580e in AcpiExOpcode_1A_0T_0R (WalkState=0xc1b6fc28) at ../../contrib/dev/acpica/exoparg1.c:202 #21 0xc014bcb1 in AcpiDsExecEndOp (WalkState=0xc1b6fc28) at ../../contrib/dev/acpica/dswexec.c:516 #22 0xc01615f8 in AcpiPsParseLoop (WalkState=0xc1b6fc28) at ../../contrib/dev/acpica/psparse.c:977 #23 0xc0161af5 in AcpiPsParseAml (WalkState=0xc1b6fc28) at ../../contrib/dev/acpica/psparse.c:1258 #24 0xc0162892 in AcpiPsxExecute (MethodNode=0xc1b5e328, Params=0x0, ReturnObjDesc=0xc03d1a1c) at ../../contrib/dev/acpica/psxface.c:281 #25 0xc015d0fb in AcpiNsExecuteControlMethod (MethodNode=0xc1b5e328, Params=0x0, ReturnObjDesc=0xc03d1a1c) at ../../contrib/dev/acpica/nseval.c:527 #26 0xc015cfdf in AcpiNsEvaluateByHandle (Handle=0xc1b5e328, Params=0x0, ReturnObject=0xc03d1abc) at ../../contrib/dev/acpica/nseval.c:409 #27 0xc015cd62 in AcpiNsEvaluateRelative (Handle=0xc1b5b4a8, Pathname=0xc03d1b00 "_Q11", Params=0x0, ReturnObject=0xc03d1abc) at ../../contrib/dev/acpica/nseval.c:225 #28 0xc015f941 in AcpiEvaluateObject (Handle=0xc1b5b4a8, Pathname=0xc03d1b00 "_Q11", ExternalParams=0x0, ReturnBuffer=0x0) at ../../contrib/dev/acpica/nsxfeval.c:357 #29 0xc0175aeb in EcGpeQueryHandler (Context=0xc1b7a540) at ../../dev/acpica/acpi_ec.c:503 #30 0xc0179f63 in AcpiOsExecuteQueue (arg=0xc1b88440, pending=1) at ../../dev/acpica/Osd/OsdSchedule.c:234 #31 0xc01e349d in taskqueue_run (queue=0xc0d862c0) at ../../kern/subr_taskqueue.c:186 #32 0xc01e34d6 in taskqueue_swi_run () at ../../kern/subr_taskqueue.c:202 #33 0xc033a860 in splz_swi () the segment of code in tsleep() kern/kern_sync.c says, s = splhigh(); if (cold || panicstr) { /* * After a panic, or during autoconfiguration, * just give interrupts a chance, then just return; * don't run any other procs or panic below, * in case this is the idle process and already asleep. */ splx(safepri); splx(s); return (0); } so tsleep() catches the panic and tries to return(0). question is, why is AcpiOsSleep() borking on it's tsleep(&dummy, 0, "acpislp", timo) call ? i've tried replacing the tsleep() in AcpiOsSleep() with DELAY(microseconds) instead, and it works. however this isnt an ideal fix as the CPU isn't relinquished by a DELAY() like a tsleep() does. is there another kernel sleep() call i can use, since AcpiOsSleep() just needs to sleep and not wait for events ? the box in question is a Benq Joybook 6000 with the following dmesg segment: Mar 29 17:50:44 prophet /kernel: Copyright (c) 1992-2005 The FreeBSD Project. Mar 29 17:50:44 prophet /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 Mar 29 17:50:44 prophet /kernel: The Regents of the University of California. All rights reserved. Mar 29 17:50:44 prophet /kernel: FreeBSD 4.11-STABLE #3: Tue Mar 29 17:40:52 MYT 2005 Mar 29 17:50:44 prophet /kernel: dinesh@prophet.alphaque.com:/usr/obj/usr/src/sys/ALPHAQUE Mar 29 17:50:44 prophet /kernel: Timecounter "i8254" frequency 1193182 Hz Mar 29 17:50:44 prophet /kernel: Timecounter "TSC" frequency 1395479702 Hz Mar 29 17:50:44 prophet /kernel: CPU: Intel(R) Pentium(R) M processor 1400MHz (1395.48-MHz 686-class CPU) Mar 29 17:50:44 prophet /kernel: Origin = "GenuineIntel" Id = 0x695 Stepping = 5 Mar 29 17:50:44 prophet /kernel: Features=0xa7e9f9bf Mar 29 17:50:44 prophet /kernel: real memory = 234815488 (229312K bytes) Mar 29 17:50:44 prophet /kernel: avail memory = 223420416 (218184K bytes) Mar 29 17:50:44 prophet /kernel: Preloaded elf kernel "kernel" at 0xc04a4000. Mar 29 17:50:44 prophet /kernel: netsmb_dev: loaded Mar 29 17:50:44 prophet /kernel: Pentium Pro MTRR support enabled Mar 29 17:50:44 prophet /kernel: md0: Malloc disk Mar 29 17:50:44 prophet /kernel: Using $PIR table, 6 entries at 0xc00fe840 Mar 29 17:50:44 prophet /kernel: acpi0: on motherboard Mar 29 17:50:44 prophet /kernel: acpi0: power button is handled as a fixed feature programming model. Mar 29 17:50:44 prophet /kernel: Timecounter "ACPI-fast" frequency 3579545 Hz Mar 29 17:50:44 prophet /kernel: acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_cpu0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_tz0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_button0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_lid0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_button1: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_acad0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_cmbat0: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_cmbat1: on acpi0 Mar 29 17:50:44 prophet /kernel: acpi_ec0: port 0x66,0x62 on acpi0 and the following acpi sysctls: hw.acpi.supported_sleep_state: S3 S4 S5 hw.acpi.power_button_state: S5 hw.acpi.sleep_button_state: S1 hw.acpi.lid_switch_state: S1 hw.acpi.standby_state: S1 hw.acpi.suspend_state: S3 hw.acpi.sleep_delay: 0 hw.acpi.s4bios: 1 hw.acpi.verbose: 0 hw.acpi.disable_on_poweroff: 1 hw.acpi.cpu.max_speed: 8 hw.acpi.cpu.current_speed: 8 hw.acpi.cpu.performance_speed: 8 hw.acpi.cpu.economy_speed: 4 hw.acpi.thermal.min_runtime: 0 hw.acpi.thermal.polling_rate: 30 hw.acpi.thermal.tz0.temperature: 3152 hw.acpi.thermal.tz0.active: 1 hw.acpi.thermal.tz0.thermal_flags: 0 hw.acpi.thermal.tz0._PSV: 3762 hw.acpi.thermal.tz0._HOT: -1 hw.acpi.thermal.tz0._CRT: 3762 hw.acpi.thermal.tz0._ACx: 3760 3130 -1 -1 -1 -1 -1 -1 -1 -1 hw.acpi.acline: 1 hw.acpi.battery.life: -1 hw.acpi.battery.time: -1 hw.acpi.battery.state: 7 hw.acpi.battery.units: 2 hw.acpi.battery.info_expire: 5 any pointers would be much appreciated. ------------------------------------------------------------------------ Mar 29 17:55:10 prophet /kernel.working: kernel trap 12 with interrupts disabled Mar 29 17:55:10 prophet /kernel.working: Mar 29 17:55:10 prophet /kernel.working: Mar 29 17:55:10 prophet /kernel.working: Fatal trap 12: page fault while in kernel mode Mar 29 17:55:10 prophet /kernel.working: fault virtual address = 0x70 Mar 29 17:55:10 prophet /kernel.working: fault code = supervisor read, page not present Mar 29 17:55:10 prophet /kernel.working: instruction pointer = 0x8:0xc01bb87c Mar 29 17:55:10 prophet /kernel.working: stack pointer = 0x10:0xc03a0528 Mar 29 17:55:10 prophet /kernel.working: frame pointer = 0x10:0xc03a054c Mar 29 17:55:10 prophet /kernel.working: code segment = base 0x0, limit 0xfffff, type 0x1b Mar 29 17:55:10 prophet /kernel.working: = DPL 0, pres 1, def32 1, gran 1 Mar 29 17:55:10 prophet /kernel.working: processor eflags = resume, IOPL = 0 Mar 29 17:55:10 prophet /kernel.working: current process = Idle Mar 29 17:55:10 prophet /kernel.working: interrupt mask = net tty bio cam Mar 29 17:55:10 prophet /kernel.working: trap number = 12 Mar 29 17:55:10 prophet /kernel.working: panic: page fault Mar 29 17:55:10 prophet /kernel.working: Mar 29 17:55:10 prophet /kernel.working: syncing disks... Mar 29 17:55:10 prophet /kernel.working: Mar 29 17:55:10 prophet /kernel.working: Fatal trap 12: page fault while in kernel mode Mar 29 17:55:10 prophet /kernel.working: fault virtual address = 0x30 Mar 29 17:55:10 prophet /kernel.working: fault code = supervisor read, page not present Mar 29 17:55:10 prophet /kernel.working: instruction pointer = 0x8:0xc029ac00 Mar 29 17:55:10 prophet /kernel.working: stack pointer = 0x10:0xc03a0258 Mar 29 17:55:10 prophet /kernel.working: frame pointer = 0x10:0xc03a0260 Mar 29 17:55:10 prophet /kernel.working: code segment = base 0x0, limit 0xfffff, type 0x1b Mar 29 17:55:10 prophet /kernel.working: = DPL 0, pres 1, def32 1, gran 1 Mar 29 17:55:10 prophet /kernel.working: processor eflags = interrupt enabled, resume, IOPL = 0 Mar 29 17:55:11 prophet /kernel.working: current process = Idle Mar 29 17:55:11 prophet /kernel.working: interrupt mask = net tty bio cam Mar 29 17:55:11 prophet /kernel.working: trap number = 12 Mar 29 17:55:11 prophet /kernel.working: panic: page fault Mar 29 17:55:11 prophet /kernel.working: Uptime: 1m52s Mar 29 17:55:11 prophet /kernel.working: Terminate ACPI Mar 29 17:55:11 prophet /kernel.working: Automatic reboot in 15 seconds - press a key on the console to abort Mar 29 17:55:11 prophet /kernel.working: Rebooting... -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+