Re: APM

Autor: Rafal Posmyk (raphael.posmyk_at_hamburg.netsurf.de)
Data: Tue 31 Oct 1995 - 19:06:57 MET


In article <DHB5s9.AvD_at_cyf-kr.edu.pl>
from Tue, 31 Oct 1995 10:14:39 GMT
(Krzysztof M. Obrzud) wrote:

> Pytanie brzmi: Czy istnieje punkt 3, a mianowicie uspienie komputera
> na drodze czysto softwarowej (z programu np. ksiegowego czy innego).

W Specyfikacji APM v1.0 czytamy:

[...]
3.1.2.1. CPU Idle

Informs the System BIOS that the system is currently idle, and that
processing should be suspended until the next system event (typically
an interrupt) occurs. This function allows the System BIOS to take
some implementation specific power saving action, such as a CPU HLT
instruction or stopping the CPU clock.

In cases where an interrupt causes the system to leave the idle state,
the interrupt may or may not have been serviced when the BIOS returns
from the CPU Idle call. The caller should not make any assumptions
concerning interrupt servicing, and should allow pending interrupts to
be taken upon return from CPU Idle.

If interrupts are serviced from within the BIOS CPU Idle function, the
interrupt handler must return to the BIOS when the interrupt
processing is completed. The caller cannot use it's knowledge of
being in the idle state to retain control from an interrupt handler.
For example, some system implementations may slow the processor CPU
clock rate before waiting on an interrupt, and restore the normal
clock rate after the interrupt is serviced but before returning from
the idle call.

When the caller regains control from the System BIOS idle routine, it
should determine if there is actually any processing to be performed,
and reissue the CPU Idle call if not. If the caller is a multitasking
supervisor, it may be necessary for it to dispatch its applications,
allowing them to check for activity that they should now perform.

Call with:
        AH = 53h
        AL = 05H

Returns success:
        CY = 0

This function is available in both the APM Int 15h and Protect Mode
interface.

[...]
3.1.3. Set Power State

3.1.3.1. Call Description

This call will place the system or device specified in the power
device ID into the requested state.

Call with:
        AH = 53h
        AL = 07H
        BX = Power Device ID
        CX = System State ID
                        0000H Ready*
                        0001H Stand-by
                        0002H Suspend
                        0003H Off*
                        0004H-FFFFH Reserved
                        * Not supported for System Device ID 0001H
Returns:
        If function successful:
        Carry = 0
         If function unsuccessful:
        Carry = 1
        AH = error code
                        01h = power management functionality disabled
                        09h = Unrecognized Device ID
                        0Ah= Parameter value in CX out of range
                        60h = Cannot enter requested state

This call is available in both the APM Int 15h and Protect Mode
interfaces.

3.1.3.2. System Stand-by

Explicitly commands the System BIOS to put the system into the
stand-by state. The caller invokes this function in response to a
System Stand-by Request Notification from the System BIOS after the
caller has performed any processing of its own. The caller may also
initiate a stand-by operation at its own discretion. For example, it
the caller determines that the system is idle and is not already in
the stand-by state.
[...]

... i tak dalej. Polecalbym przed uzyciem przeczytac calosc
specyfikacji (dokad mam wyslac). Jest pare kruczkow :-)

Rafal

+-------------------------------------------------------------------+
| Raphael Posmyk (Hamburg, Germany) |
| "... carpe diem, quam minimum credula postero..." (Horatius) |
| Please send/reply all to raphael.posmyk_at_hamburg.netsurf.de |
+-------------------------------------------------------------------+



To archiwum zostało wygenerowane przez hypermail 2.1.7 : Tue 18 May 2004 - 12:26:16 MET DST