4.9-RELEASE, ACPI and DELL Latitude D600

John Baldwin jhb at FreeBSD.org
Thu Nov 6 08:25:42 PST 2003


On 06-Nov-2003 Andre Grosse Bley wrote:
> Hi all, 
> 
> i am trying to install FreeBSD 4.9-RELEASE on a Dell Latitude D600
> notebook. "standard" Kernel without ACPI works fine 
> (dmesg at http://www.nm.ruhr-uni-bochum.de/~gandalf/dell/dmesg.noacpi.txt)
> 
> Since i need the batterystatus (and the Bios doesnt seem to support APM
> anymore) i activated acpi: The machine paniced after detecting the brgphy0.
> After removing pcic0/pcic1 from the kernel configuration, i was able to
> boot with ACPI (wow!;)
> But no batterystatus. Googling found a solution:
> 
> http://sandcat.nl/~stijn/freebsd/dell.php
> 
> I needed to add
> acpi_dsdt_load="YES"
> acpi_dsdt_name="/boot/acpi_dsdt.aml"
> acpi_dsdt_type="acpi_dsdt"
> 
> 
> to /boot/loader.conf
> 
> dmesg is at http://www.nm.ruhr-uni-bochum.de/~gandalf/dell/dmesg.acpi.txt
> 
> sysctl hw.acpi gives:
> 
> hw.acpi.supported_sleep_state: S1 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: 1
> 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: 3127
> hw.acpi.thermal.tz0.active: -1
> hw.acpi.thermal.tz0.thermal_flags: 0
> hw.acpi.thermal.tz0._PSV: -1
> hw.acpi.thermal.tz0._HOT: -1
> hw.acpi.thermal.tz0._CRT: 3752
> hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
> hw.acpi.acline: 1
> hw.acpi.battery.life: 46
> hw.acpi.battery.time: -1
> hw.acpi.battery.state: 2
> hw.acpi.battery.units: 2
> hw.acpi.battery.info_expire: 5
> 
> My problem: the machine panics when closing the lid, even after
> sysctl hw.acpi.lid_switch_state=NONE.
> 
> Traceback without the sysctl is as follows:
> 
> root at feap:~ $gdb -k /kernel.debug /var/crash/vmcore.1
> IdlePTD at phsyical address 0x00470000
> initial pcb at physical address 0x003b04e0
> panicstr: page fault
> panic messages:
> ---
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x70
> fault code              = supervisor read, page not present
> instruction pointer     = 0x8:0xc01b5198
> stack pointer           = 0x10:0xc0367b70
> frame pointer           = 0x10:0xc0367b94
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = interrupt enabled, resume, IOPL = 0
> current process         = Idle
> interrupt mask          = net tty bio cam
> trap number             = 12
> panic: page fault
> 
> syncing disks...
> 
> Fatal trap 12: page fault while in kernel mode
> fault virtual address   = 0x30
> fault code              = supervisor read, page not present
> instruction pointer     = 0x8:0xc02784d0
> stack pointer           = 0x10:0xc0367998
> frame pointer           = 0x10:0xc03679a0
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = interrupt enabled, resume, IOPL = 0
> current process         = Idle
> interrupt mask          = net tty bio cam
> trap number             = 12
> panic: page fault
> Uptime: 4m6s
> 
>#0  dumpsys () at /usr/src/sys/kern/kern_shutdown.c:487
>#1  0xc01b20f7 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:316
>#2  0xc01b2535 in panic (fmt=0xc035f76c "%s")
>     at /usr/src/sys/kern/kern_shutdown.c:595
>#3  0xc02fa003 in trap_fatal (frame=0xc0367958, eva=48)
>     at /usr/src/sys/i386/i386/trap.c:974
>#4  0xc02f9cb1 in trap_pfault (frame=0xc0367958, usermode=0, eva=48)
>     at /usr/src/sys/i386/i386/trap.c:867
>#5  0xc02f9857 in trap (frame={tf_fs = -1071841264, tf_es = -65520,
>       tf_ds = -1070202864, tf_edi = 0, tf_esi = -1036472064,
>       tf_ebp = -1070171744, tf_isp = -1070171772, tf_ebx = -1070075364,
>       tf_edx = 6866944, tf_ecx = -614904832, tf_eax = 0, tf_trapno = 12,
>       tf_err = 0, tf_eip = -1071151920, tf_cs = 8, tf_eflags = 66182,
>       tf_esp = -1036472064, tf_ss = -1036472064})
>     at /usr/src/sys/i386/i386/trap.c:466
>#6  0xc02784d0 in acquire_lock (lk=0xc037f21c)
>     at /usr/src/sys/ufs/ffs/ffs_softdep.c:266
>#7  0xc027c5d0 in softdep_update_inodeblock (ip=0xc238b100, bp=0xcc94a43c,
>     waitfor=0) at /usr/src/sys/ufs/ffs/ffs_softdep.c:3813
>#8  0xc0277605 in ffs_update (vp=0xdb594c00, waitfor=0)
>     at /usr/src/sys/ufs/ffs/ffs_inode.c:106
>#9  0xc027fa4e in ffs_sync (mp=0xc2318600, waitfor=2, cred=0xc1453680,
>     p=0xc03caf20) at /usr/src/sys/ufs/ffs/ffs_vfsops.c:1025
>#10 0xc01e2e7b in sync (p=0xc03caf20, uap=0x0)
>     at /usr/src/sys/kern/vfs_syscalls.c:577
>#11 0xc01b1e92 in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:235
>#12 0xc01b2535 in panic (fmt=0xc035f76c "%s")
>     at /usr/src/sys/kern/kern_shutdown.c:595
>#13 0xc02fa003 in trap_fatal (frame=0xc0367b30, eva=112)
>     at /usr/src/sys/i386/i386/trap.c:974
>#14 0xc02f9cb1 in trap_pfault (frame=0xc0367b30, usermode=0, eva=112)
>     at /usr/src/sys/i386/i386/trap.c:867
>#15 0xc02f9857 in trap (frame={tf_fs = -1070202864, tf_es = -1070465008,
>       tf_ds = -1070465008, tf_edi = 0, tf_esi = -1069882148,
>       tf_ebp = -1070171244, tf_isp = -1070171300, tf_ebx = 0, tf_edx = 0,
>       tf_ecx = 200, tf_eax = 6291968, tf_trapno = 12, tf_err = 0,
>       tf_eip = -1071951464, tf_cs = 8, tf_eflags = 66118, tf_esp = 0,
>       tf_ss = 274877907}) at /usr/src/sys/i386/i386/trap.c:466
>#16 0xc01b5198 in tsleep (ident=0xc03ae4dc, priority=0,
>     wmesg=0xc0328583 "acpislp", timo=200) at /usr/src/sys/kern/kern_synch.c:436

Ah, the problem is that ACPI tries to sleep from a task, which is not safe
to do.  This is not easy to fix. :(

-- 

John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/


More information about the freebsd-hackers mailing list