home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Unsorted BBS Collection
/
thegreatunsorted.tar
/
thegreatunsorted
/
programming
/
misc_programming
/
int2.spc
< prev
next >
Wrap
Text File
|
1990-01-05
|
9KB
|
253 lines
The Specification of NMI Service Routine (INT 2H)
-------------------------------------------------
Content
A. Description ......................... AT compatible
B. Laptop notes ...................... for 1100LX model
C. EISA notes ........................ for 1200 model
A. Description:
The non-maskable interrupt is a hardware interrupt that can not be
masked. It signals the system microprocessor when a parity, a channel
error has occurred. On the 1100LX laptop model, this routine also handles
the screen inactive, power saving, and sleep mode. These kinds of
NMI must be distinguished by the service routine.
If parity or channel error ocurred, NMI will display error message
and halt the system.
NOTE:
1. NMIs can be disabled by setting bit 7 of CMOS ( port 70h ).
B. Laptop notes:
For 1100LX laptop model, functions of int 2h is shown below:
1. It is called by RTC interrupt (int 70H) because the system is
inactive (user did not press any key) for a long time.
2. To force system into sleep mode, NMI is triggered when the user
presses the stand_by button or a low battery power occurred.
3. If screen is inactive time-out, turn off the LCD and disable
external monitor display.
4. If sleep mode is active, turn off LCD and disable external monitor,
power off hard disk,floppy and modem, and change CPU speed into
low speed.
When CPU is in low speed, the system will check the wakeup flag.
If the system is activated by the user by pressing the sleep mode
button or when external power is supplied do the following:
- recover CPU clock
- turn on screen
- power on hard disk and modem
5. If low battery power is on level 1, flush power LED (8 MHz).
6. If low battery power is on level 2, flush power LED (4 MHz) and
enter into stand_by mode.
7. When using an external power supply, power saving function is
ignored.
8. If an unexpected NMI occurred, nothing need to be done just leave
this routine.
BIOS Data Area (segment at 400h)
0b4h -- word -- standby inactive time counter (in seconds)
0b6h -- byte -- power saving flag
bit 7 = 1 -- system inactive flag
bit 6 = 1 -- in stand_by
bit 5 = 1 -- screen inactive saving enable
bit 4 = 1 -- sleep enable
bit 3 = -- system use power type last time
bit 2 = 1 -- screen inactive flag
bit 1 = 1 -- power on by alarm flag
bit 0 = 1 -- active flag
Port 36Fh for read/write
Bit-0 0 Hard disk +12V OFF
1 Hard disk +12V ON
Bit-1 0 Hard disk +5V OFF
1 Hard disk +5V ON
Bit-2 0 Floppy disk +5V OFF
1 Floppy disk +5V ON
Bit-3 0 LCD +5V OFF
1 LCD +5V ON
Bit-4 0 LCD Backlight +12V OFF
1 LCD Backlight +12V ON
Bit-5 0 LCD -23V OFF
1 LCD -23V ON
Bit-6 0 Modem +5V OFF
1 Modem +5V ON
Bit-7 0 Use external keyboard
1 Use internal keyboard
Port 35Fh for read
Bit-0 0 Normal status
1 Battery low level 1
Bit-1 0 Normal status
1 Battery low level 2
Bit-2 Monitor sense bit
Bit-3 0 System power use AC adapter
1 System power use Battery
Bit-4 0 Stand-by LED OFF
1 Stand-by LED ON
Bit-5 N/A
Bit-6 N/A
Bit-7 0 Normal status
1 Stand-by button pressed
Port 35Fh for write
Bit-0 0 Low speed
1 High speed
Bit-1 N/A
Bit-2 0 Normal status
1 Turn off DC/DC converter ===> power off
Bit-3 0 Enable NMI generated
1 Clear NMI status
Bit-4 0 Turn OFF stand-by LED
1 Turn ON stand-by LED
Bit-5 N/A
Bit-6 N/A
Bit-7 N/A
Sequence of int 2h on 1100LX :
Clear NMI flag (set port 35Fh bit-3 = 1 )
DO CASE
CASE 1 : Power type change:
IF system use AC power (Port 35Fh bit-3 = 0) THEN
reload system inactive timer.
turn off flash power LED.
IF system is in sleep mode THEN (wake up system)
recover CPU speed, activate HDD/FDD/
MODEM and Display turn off stand_by LED.
ENDIF
ELSE
IF Battery low level 2 THEN
DO CASE 2.
ELSE
IF Battery low level 1 THEN
DO CASE 4.
ENDIF
ENDIF
ENDIF
CASE 2 : Battery low level 2 : port 35Fh bit-1 = 1
Warning user by speaker and flash power LED.
* Square wave output of CMOS (4 Hz).
* Speaker beep.
When the CPU change to low speed:
- inactivate the HDD, FDD, Modem
- display (Screen,Controller)
- turn on stand-by LED.
Dummy loop until system uses AC power.
(by checking the AC power usage bit)
Stop warning beep and off flash power LED.
CASE 3 : Stand-by button pressed: Port 35Fh bit-7 = 1
IF in normal mode (40:b6h bit 6 = 0) THEN
set stand_by flag (40:b6h bit 6 = 1)
CPU change low speed, inactive the HDD, FDD, Modem
and display (Screen,Controller) turn on stand-by
LED.
loop until stand-by pressed by user
recover CPU speed, active the HDD, FDD, MODEM and
Display, turn off stand_by LED.
reset stand_by flag (40:b6h bit 6 = 0)
ENDIF
CASE 4 : Battery low level 1 : port 35Fh bit-0 = 1
Warning user by flash power LED.
* Using SQW output (8 Hz) of RTC.
CASE 5 : system inactive time-out (40:b6h bit 7 = 1)
clear system inactive time-out bit
set stand_by flag (40:b6h bit 6 = 1)
CPU change to low speed, inactive the HDD, FDD, Modem
and display (Screen,Controller), turn on stand-by LED.
Dummy loop until stand-by is pressed by the user
Recover CPU speed, active the HDD, FDD, MODEM and
Display, turn off stand_by LED.
reset stand_by flag (40:b6h bit 6 = 0)
reset system inactive flag (40:b6h bit 7 = 0)
CASE 6 : Parity/channel error
Display error message and system halt
OTHER : Do nothing
END CASE
Enable NMI (Set port 35Fh bit-3 = 1, then 35Fh bit-3 = 0)
Comment:
* Case 5 is software int 2 which is invoked by RTC update_end
interrupt. this case is available on system use battery power.
* During power up, the following voltages should be applied
to reduce the power supply surge current.
- System board applies +5V,+12V,-12V
- LCD applies +5V,-23V,+12V
- HDD applies +5V,+12V
- FDD applies +5V
Notes: The following is very important for LCD:
* LCD power on sequence: +5V > video display > -23V > +12V
* LCD power off sequence: +12V > -23V > video display > +5V
C. For EISA notes:
For 1200 EISA model function of int 2h as shown below:
case 1: Parity error
Display error message and then halt the system.
case 2: I/O channel error
Search which expansion board causes I/O check error.
Display error message and correct the expansion board (send
IOCHKRST plus at least 500 ns to the expansion board and then
reinitialize and enable it).
case 3: Fail_save timeout
Display error message and then halt the system.
case 4: Bus timeout
Read bus master status latch (port 464h, 465h)
Display error message
Clear bus timeout status and reinitialize system
case 5: Software NMI (when write any value into port 462h)