English
Language : 

PC87570 Datasheet, PDF (166/168 Pages) National Semiconductor (TI) – PC87570 Keyboard and Power Management Controller
Bootloader Description
If STRPST.SHBM = 1 (read Strap Register, Shared BIOS Memory bit)
Set MCFG.SHMEM (Enable Shared BIOS Memory access)
If KBC Header Signature not valid or KBC code size equal 0
Jump to KBC_Mem_Fail (bytes 0 & 1 = signature, byte 2 = size)
If Checksum of KBC code not valid
Jump to KBC_Mem_Fail
If OEM_Detect_Crisis Address = FFFFh
Jump to KBC code entry (OEM_Detect_Crisis Address is byte 4 in KBC Header, Start of KBC code is byte
2 of KBC Header)
Else Jump to OEM_Detect_Crisis routine
OEM_Detect_Crisis routine resides in external memory and must:
1. Save RA register on entry and use its contents as a return address
2. Preserve all configuration registers xxCFG
3. Preserve Boot Program variables in RAM F000h - F0010h
4. Return with Interrupts disabled: PFAIL.EN=0, PSR.I=0
5. Return with PSR.Z = 1 if NO crisis detected
Note: It is OK for the OEM_Detect_Crisis routine to destroy stacks and interrupt dispatch table
If PSR.Z = 1 Jump to KBC code entry (Start of KBC code is byte 2 of KBC Header)
Else Jump to OEM_Mem_Fail (handle Crisis as if it were an external memory failure)
Config_Mem_Fail (come here if Configuration Block Signature is not valid)
Jump to EXT_Mem_Fail
OEM_Mem_Fail
Set OEM Failure Flag & Jump to EXT_Mem_Fail
KBC_Mem_Fail
Set KBC Failure Flag & Jump to EXT_Mem_Fail
EXT_Mem_Fail
Stacks & Dispatch table is restored (may have been modified by OEM_Detect_Crisis routine), Host Interface is turned on,
registers are initialized and program goes into a loop awaiting system input on the host interface, port 64h (port 60h is read
only because commands to the keyboard are not supported).
Commands:
90h Load RAM
Command 90h gets 4 byte of System Data: RAM address LOW, HIGH and Data array length LOW,HIGH and then
receives and loads number of bytes specified by length into the controller RAM. Ack FAh is returned to the System
if address range for Program execution was not violated. Otherwise error FFh is returned.
91h Execute
Command 91h gets 2 byte of System Data: code-label LOW, HIGH and transfer control the specified address. The
return addresses (passed in RAMAckRET and RAMErrRET variables) may be used by invoked routine to notify the
System.
92h Read Boot Status
Read Boot Status and combine it with Power Fail flag.
AAh Self Test
Since external KBC memory failure was detected, report error code FFh.
D0h, D1H Read/Write GA20
D0h - Combine actual GateA20 state with emulated 8042 output port and send data to system.
D1h - Only set/reset GateA20 line based on the system data bit 1.
www.national.com
166