Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 2008 20:05:37 GMT
From:      "Jorge Niedbalski R." <niedbalski@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/122056: Acpi battery ioctl interface integer divide fault
Message-ID:  <200803242005.m2OK5bAC033330@www.freebsd.org>
Resent-Message-ID: <200803242010.m2OKA3oh043090@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122056
>Category:       i386
>Synopsis:       Acpi battery ioctl interface integer divide fault
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 24 20:10:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jorge Niedbalski R.
>Release:        7.0-RELEASE
>Organization:
IP6
>Environment:
FreeBSD saqsaywaman.int.ip6nw.com 7.0-RELEASE FreeBSD 7.0-RELEASE #1: Fri Mar 21 01:03:48 BRT 2008     root@:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
Using the ioctl interface provided for manipulating /dev/acpi pseudo-device , in particular the  ACPIIO_BATT_GET_BATTINFO request give me a integer  divide kernel fault exception.

The computer sysctl oids acpi information :

hw.acpi.supported_sleep_state: S3 S4 S5
hw.acpi.power_button_state: S5
hw.acpi.sleep_button_state: S3
hw.acpi.lid_switch_state: NONE
hw.acpi.standby_state: S1
hw.acpi.suspend_state: S3
hw.acpi.sleep_delay: 1
hw.acpi.s4bios: 0
hw.acpi.verbose: 0
hw.acpi.disable_on_reboot: 0
hw.acpi.handle_reboot: 0
hw.acpi.reset_video: 0
hw.acpi.cpu.cx_lowest: C1
hw.acpi.acline: 1
hw.acpi.battery.life: 100
hw.acpi.battery.time: -1
hw.acpi.battery.state: 0
hw.acpi.battery.units: 1
hw.acpi.battery.info_expire: 5
hw.acpi.thermal.min_runtime: 0
hw.acpi.thermal.polling_rate: 10
hw.acpi.thermal.user_override: 0
hw.acpi.thermal.tz0.temperature: 52.0C
hw.acpi.thermal.tz0.active: -1
hw.acpi.thermal.tz0.passive_cooling: 1
hw.acpi.thermal.tz0.thermal_flags: 0
hw.acpi.thermal.tz0._PSV: 88.0C
hw.acpi.thermal.tz0._HOT: 95.0C
hw.acpi.thermal.tz0._CRT: -1
hw.acpi.thermal.tz0._ACx: -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
>How-To-Repeat:
To repeat the problem, follow the next steps :

1) Connect the AC power cable to the computer,
2) Remove the battery from the computer.
3) Reconnect the battery to the computer
4) Request a ioctl ACPIIO_BATT_GET_BATTINFO to the /dev/acpi device like this function :

(where fd is a reference to a open filedescriptor with /dev/acpi (in RO mode))

int get_battery_status(int *fd, short number) {

                union acpi_battery_ioctl_arg battio;
                
                battio.unit = number;

                if(ioctl(*fd, ACPIIO_BATT_GET_BATTINFO, &battio) == -1) {
                        return -1;
                }

                if(battio.battinfo.state == ACPI_BATT_STAT_NOT_PRESENT) {
                        return -1;
                }

                return 0;
}


>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803242005.m2OK5bAC033330>