CS5535-UDCF AMD (ADVANCED MICRO DEVICES), CS5535-UDCF Datasheet - Page 123

no-image

CS5535-UDCF

Manufacturer Part Number
CS5535-UDCF
Description
Manufacturer
AMD (ADVANCED MICRO DEVICES)
Datasheet

Specifications of CS5535-UDCF

Operating Temperature (min)
0C
Operating Temperature (max)
85C
Operating Temperature Classification
Commercial
Mounting
Surface Mount
Lead Free Status / RoHS Status
Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
CS5535-UDCF
Manufacturer:
AMD
Quantity:
20 000
Keyboard Emulation Logic
5.10.2
The purpose of the KEL is to model the legacy 8042 key-
board/mouse
Addresses 060h and 064h (also known as Ports 60 and
64). This hardware and supporting processor System Man-
agement 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
alternative device is a keyboard or mouse off a USB (Uni-
versal Serial Bus) port, but it need not be. Due to the ori-
gins of the hardware to be explained shortly, this
discussion generally assumes a USB alternative device,
but this is not a requirement 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 companion device specific implementa-
tion.
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
AMD Geode™ CS5535 Companion Device Data Book
Keyboard Emulation Overview
controller
interfaced
via
legacy
I/O
alternative device and the other device is attached to a
standard PS/2 interface.
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.
5.10.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
OutputFull plus AuxOutputFull for mouse data). If key-
board/mouse
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.).
5.10.4
Keyboard output is indicated by application software writ-
ing 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 opera-
tion indicated by the data. Generally, this means putting
out data to the alternate device.
5.10.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]).
Theory - Keyboard / Mouse Input
Theory - Keyboard Output
Emulation Events
interrupts
31506B
are
enabled,
setting
123
the

Related parts for CS5535-UDCF