Browse Prior Art Database

A Method to Suppress an Error Message When Detaching Extended Battery

IP.com Disclosure Number: IPCOM000016174D
Original Publication Date: 2002-Oct-30
Included in the Prior Art Database: 2003-Jun-21
Document File: 4 page(s) / 290K

Publishing Venue

IBM

Abstract

A program is disclosed to suppress an error message when detaching an extended battery in ACPI OS environment. In general, a battery device is handled as Control Method battery on ACPI Advanced Configuration and Power Interface) system. A Control Method Battery interface is completely defined by AML ACPI Machine Language , ACPI BIOS). For most cases, the battery slot is still considered to be present in the system even when a battery is attached or removed. The _STA for the battery device always returns a value with bits 0-3 set and toggles bit 4 to indicate the actual presence of a battery. However, for systems that have a battery slot in a slice or an extended battery as Fig.1 indicates, it is beneficial to indicate the entire battery device including a battery slot has been attached or removed (101)(102) so that 'Power Meter' applet of Windows 2000* OS shows the additional battery slot dynamically. In this case, the "Unsafe Removal" error message is shown unless OS processes the ejection of the battery slot before removing the battery itself (103). 101

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 53% of the total text.

Page 1 of 4

A Method to Suppress an Error Message When Detaching Extended Battery

A program is disclosed to suppress an error message when detaching an extended battery in ACPI OS environment.

In general, a battery device is handled as Control Method battery on ACPI ( Advanced Configuration and Power Interface) system. A Control Method Battery interface is completely defined by AML ( ACPI Machine Language , ACPI BIOS). For most cases, the battery slot is still considered to be present in the system even when a battery is attached or removed. The _STA for the battery device always returns a value with bits 0-3 set and toggles bit 4 to indicate the actual presence of a battery.

However, for systems that have a battery slot in a slice or an extended battery as Fig.1 indicates, it is beneficial to indicate the entire battery device including a battery slot has been attached or removed (101)(102) so that 'Power Meter' applet of Windows 2000* OS shows the additional battery slot dynamically. In this case, the "Unsafe Removal" error message is shown unless OS processes the ejection of the battery slot before removing the battery itself (103).

101

102

Fig.1 Unsafe Removal message due to removal of an extended Battery

One method to prevent this error message is, like most other devices, OS is notified of the removal of the battery through "Safely Remove Hardware" applet or a mechanical switch before it is removed actually. Then, OS processes the battery ejection and

103

1

[This page contains 8 pictures or other non-text objects]

Page 2 of 4

indicates a user that the control method battery device can now be safely removed from the system. In this case, a user can't remove the battery device while the system is in standby or hibernate state unless the system wakes up before the battery is removed.

A new method makes it possible that the "Unsafe Removal" message is not shown when the battery is removed during standby or hibernate without waking the system.

[ A method to prevent an error message]

AML code prepares a flag that indicates whether a battery slot is present or not. It is set when an extended battery is attached, but not cleared when it is removed so that a virtual , empty battery slot is sill present. As Fig.2 indicates, Power Meter shows only primary battery when the system boots up without an extended battery(201). When the extended battery is attached, Power Meter shows two battery slots (202). After the extended battery is removed, Power Meter applet shows the empty battery slot, but the "Unsafe removal" message is not shown(203).

          201 202 203Fig.2 Suppress an error message when detaching an extended battery

Fig.3 indicates the flowchart that explains the behavior of AML code when an extended battery is attached. When AML gets the attach event of the extended battery (301), it sets a battery slot present flag to 1 (302). AML notifies OS of the battery attach event. Then, OS evaluates the _STA method (401) of AML code to enumerate the batte...