cs5535 National Semiconductor Corporation, cs5535 Datasheet - Page 111

no-image

cs5535

Manufacturer Part Number
cs5535
Description
Geode Cs5535 Companion Multi-function South Bridge
Manufacturer
National Semiconductor Corporation
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
cs5535-KSZ
Manufacturer:
CIRRUSLOGIC
Quantity:
20 000
Part Number:
cs5535-UDC
Manufacturer:
AMD
Quantity:
20 000
Part Number:
cs5535-UDCF
Manufacturer:
AMD
Quantity:
20 000
Revision 0.8
KEL Functional Description
4.9.2
The purpose of the KEL is to model the legacy 8042 key-
board/mouse controller interfaced via legacy I/O Addresses
060h and 064h (also known as Ports 60 and 64). This hard-
ware and supporting processor System Management
Mode (SMM) software are designed to support systems
that do not have a true PS/2-compatible keyboard and/or
mouse interface, but those that have alternative devices
performing the equivalent function. Generally, the alterna-
tive device is a keyboard or mouse off a USB (Universal
Serial Bus) port, but it need not be. Due to the origins of the
hardware to be explained shortly, this discussion generally
assumes a USB alternative device, but this is not a require-
ment from a hardware perspective.
The KEL closely models the keyboard emulation hardware
detailed in the USB OpenHost Controller Interface specifi-
cation (OHCI). It is specifically designed to be software
compatible with this model. In the USB model, it is part of
the USB “Host Controller”, but is logically separate from it.
The discussion and description that follows is taken from
the OHCI specification, but with modifications to reflect the
Geode CS5535 specific implementation.
To support applications and drivers in non-USB-aware
environments (e.g., DOS), a peripheral subsystem needs
to provide some hardware support for the emulation of a
PS/2 keyboard and/or mouse by their USB equivalents
(alternative devices). For OHCI, this emulation support is
provided by a set of registers that are controlled by code
running in SMM. Working in conjunction, this hardware and
software produces approximately the same behavior-to-
application code as would be produced by a PS/2-compati-
ble keyboard and/or mouse interface.
When data is received from the alternative device, the
emulation code is notified and becomes responsible for
translating the alternative device keyboard/mouse data into
a data sequence that is equivalent to what would be pro-
duced by a PS/2-compatible keyboard/mouse interface.
The translated data is made available to the system
through the legacy keyboard interface I/O Addresses 060h
and 064h. Likewise, when data/control is to be sent to the
alternative device (as indicated by the system writing to the
legacy keyboard interface), the emulation code is notified
and becomes responsible for translating the information
into appropriate data to be sent to the alternative device.
On the PS/2 keyboard/mouse interface, a read of I/O
Address 060h returns the current contents of the keyboard
output buffer; a read of I/O Address 064h returns the con-
tents of the keyboard status register. An I/O write to I/O
Addresses 060h and 064h puts data into the keyboard
input buffer (data is being input into the keyboard sub-
system). When emulation is enabled, reads and writes of
I/O Addresses 060h and 064h are captured in the KEL
HceOutput, HceStatus, and/or HceInput operational regis-
ters.
The KEL described here supports a mixed environment in
which either the keyboard or mouse is implemented as an
alternative device and the other device is attached to a
standard PS/2 interface.
Keyboard Emulation Overview
(Continued)
111
The following sub-sections use the term “alternate device
interrupt”. This is an ASMI or IRQ as appropriate for the
device; for example the USB can generate either an ASMI
or IRQ. The KEL generates a separate ASMI or IRQ.
4.9.3
When data is received from the alternative device, the
emulation code is notified with an alternate device interrupt
and translates the keyboard/mouse data into an equivalent
PS/2-compatible sequence for presentation to the applica-
tion software. For each byte of PS/2-compatible data that is
to be presented to the applications software, the emulation
code writes to the HCE_Output register. The emulation
code then sets the appropriate bits in the HCE_Status reg-
ister (normally, OutputFull is set for keyboard data and Out-
putFull
keyboard/mouse interrupts are enabled, setting the
HCE_Status register bits causes the generation of an IRQ1
for keyboard data and IRQ12 for mouse data. The emula-
tion code then exits and waits for the next alternate device
interrupt.
When the host CPU exits from SMM, it can service the
pending IRQ1/IRQ12. This normally results in a read from
I/O Address 060h. When I/O Address 060h is read, the
KEL intercepts the access and returns the current contents
of HCE_Output. The KEL also clears the OutputFull bit in
HCE_Status and de-asserts IRQ1/IRQ12.
If the emulation software has multiple characters to send to
the application software, it sets the CharacterPending bit in
the HCE_Control register. This causes the KEL to generate
an ASMI at the beginning of the next frame a time after the
application read from I/O Address 060h (HCE_Output.).
4.9.4
Keyboard output is indicated by application software writing
data to either I/O Address 060h or 064h. Upon a write to
either address, the KEL captures the data in the
HCE_Input register and, except in the case of a FA20#
(Force processor Address bit 20 to zero when low)
sequence, updates the HCE_Status register’s InputFull
and CmdData bits. When the InputFull bit is set, a KEL
ASMI is generated at the beginning of the next frame. Upon
receipt of the KEL ASMI, the emulation software reads
HCE_Control and HCE_Status to determine the cause of
the emulation interrupt and performs the operation indi-
cated by the data. Generally, this means putting out data to
the alternate device.
4.9.5
Emulation Events (EEs) are caused by reads and writes of
the emulation registers. EEs generated by the emulation
hardware are steered by the KEL to either an ASMI or an
Emulation Interrupt. Steering is determined by the EE
Routing (EER) bit of the Keyboard Emulation Logic Control
Register (KELX_CTL) (MSR 5140001Fh[1]).
Historically, EEs for data coming from the keyboard/mouse
are generated on USB frame boundaries. The KEL is inde-
pendent of the USB logic, but uses USB frame boundaries
for backward compatibility. Alternately, an independent 1
Theory - Keyboard / Mouse Input
Theory - Keyboard Output
Emulation Events
plus
AuxOutputFull
for
mouse
www.national.com
data).
If

Related parts for cs5535