VIRTUTECH CONFIDENTIAL    Previous - Up - Next

i8042

Provided by
8042
Class Hierarchy
conf-objectlog-objecti8042
Interfaces Implemented
log_object, event_poster, mouse, keyboard, io_memory
Description
The 8042 device implements the functionality of the 8042 keyboard controller together with a 104/105 key Windows 95 type keyboard, and a two button mouse. They keyboard is a MF II, similar to an AT keyboard but with a few extensions. A 105 key keyboard is a 101 keyboard with the extra key found on European 102 keyboards, and the three Windows keys.

Attributes

Attributes inherited from class conf-object
attributes, classname, component, iface, name, object_id, queue
Attributes inherited from class log-object
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
Attribute List
allow_keyboard_buffer_overflow
Optional attribute; read/write access; type: b.

By default this attribute is FALSE, which implies that the i8042 will not allow the keyboard buffer to overflow. Instead it will force the console to buffer the input until there is room for it in the keyboard buffer. This makes the console generally easier to work with, since you are guaranteed that it won't drop characters. If you for some reason want to allow keyboard buffer overflows, set this attribute to TRUE.

alt_l_down
Optional attribute; read/write access; type: unknown type.

Status of the left alt key.

alt_r_down
Optional attribute; read/write access; type: unknown type.

Status of the right alt key.

button_event
Pseudo attribute; read/write access; type: unknown type; integer indexed; indexed type: unknown type.

Write-only. Forces mouse button events. Writing value to index 0 (1, 2, 3, or 4) causes the left (right, middle, fourth, or fifth) button to be pressed if value is 0, or released if value is 1.

check_pending
Optional attribute; read/write access; type: unknown type.

Flag whether there is a check data for 8042 event pending.

cmd_buttons
Optional attribute; read/write access; type: unknown type.

The state of the mouse buttons as set by the button-event pseudo attribute. Bit 0 = left button pressed, bit 1 = right button pressed, and 2 = middle button pressed.

command_last
Optional attribute; read/write access; type: unknown type.

Flag saying whether the last write to the keyboard was a command.

console
Optional attribute; read/write access; type: Object.

Console device implementing the 'gfx-console' or 'keyboard-console' interface.

ctrl_l_down
Optional attribute; read/write access; type: unknown type.

Status of the left ctrl key.

ctrl_r_down
Optional attribute; read/write access; type: unknown type.

Status of the right ctrl key.

fast_a20
Optional attribute; read/write access; type: unknown type.

The fast A20 bit (port 92h).

fast_init
Optional attribute; read/write access; type: unknown type.

The fast init bit (port 92h).

ifull
Optional attribute; read/write access; type: unknown type.

Input buffer full flag. Always 0 in the current implementation.

irq_dev
Required attribute; read/write access; type: unknown type.

Interrupt device implementing the simple-interrupt interface.

irq_freq
Optional attribute; read/write access; type: Integer.

The maximum frequency in Hz at which the i8042 will generate interrupts. The default is 2000 Hz, which simulates the timing of a real device. However, some operating systems and X servers may have problems keeping up with that interrupt frequency when run with low processor clock frequencies and may start to loose input. If that happens you can lower the interrupt frequency. 20 Hz seems to work well with X servers on Linux in the configurations distributed by Virtutech.

irq_sent
Optional attribute; read/write access; type: unknown type.

Set to 1 if the keyboard interrupt line is raised, 2 if the mouse interrupt is raised, or 0 otherwise.

kbd_disabled
Optional attribute; read/write access; type: unknown type.

Keyboard disabled flag.

kbd_irq_en
Optional attribute; read/write access; type: unknown type.

Keyboard interrupt enabled flag.

kbd_irq_level
Required attribute; read/write access; type: unknown type.

Interrupt level of the keyboard.

key_buf_num
Optional attribute; read/write access; type: unknown type.

Number of entries used after key_first in the key_buffer.

key_buffer
Optional attribute; read/write access; type: unknown type.

(b0, b1, ..., b15) Controller keyboard output data.

key_caps_lock
Optional attribute; read/write access; type: unknown type.

Caps lock led flag.

key_enabled
Optional attribute; read/write access; type: unknown type.

Flag saying if the keyboard is enabled.

key_event
Pseudo attribute; read/write access; type: unknown type; integer indexed; indexed type: unknown type.

Write-only. Forces keyboard events. Writing value (an integer) to index i forces key number i to be pressed if value is 0, or released if value is 1.

key_first
Optional attribute; read/write access; type: unknown type.

Index of the next data that will be read from the key_buffer.

key_next_write
Optional attribute; read/write access; type: unknown type.

Command expected for the next write to the keyboard controller. 0 = Undefined, 1 = Led, 2 = Typematic, and 3 = Scan.

key_num_lock
Optional attribute; read/write access; type: unknown type.

Num lock led flag.

key_present
Optional attribute; read/write access; type: unknown type.

Flag saying if the keyboard is actually connected to the controller.

key_scan_codes
Optional attribute; read/write access; type: unknown type.

Selected scan codes.

key_scroll_lock
Optional attribute; read/write access; type: unknown type.

Scroll lock led flag.

mfull
Optional attribute; read/write access; type: unknown type.

Flag saying whether the obuffer contains mouse data.

mode_select_state
Optional attribute; read/write access; type: unknown type.

Mode selection state. 0 = knocking not in progress, 1 = having set sample rate to 200 Hz once, 2 = having set sample rate to 200 Hz twice, and 3 = having set sample rate to 100 Hz.

mou_buf_num
Optional attribute; read/write access; type: unknown type.

Number of entries used from mou_first in mou_buffer.

mou_buffer
Optional attribute; read/write access; type: unknown type.

(b0, b1, ..., b47) Controller output mouse data.

mou_enabled
Optional attribute; read/write access; type: unknown type.

Mouse enabled flag.

mou_first
Optional attribute; read/write access; type: unknown type.

Index of next data in mou_buffer.

mou_left_button
Optional attribute; read/write access; type: unknown type.

Mouse left button pressed flag.

mou_middle_button
Optional attribute; read/write access; type: unknown type.

Mouse middle button pressed flag.

mou_next_write
Optional attribute; read/write access; type: unknown type.

Command expected for the next write to the mouse controller. 0 = Undefined, 1 = Resolution, and 3 = SampleRate.

mou_resolution
Optional attribute; read/write access; type: unknown type.

Mouse resolution. The resolution is 1 << value counts / mm.

mou_right_button
Optional attribute; read/write access; type: unknown type.

Mouse right button pressed flag.

mou_sample_rate
Optional attribute; read/write access; type: unknown type.

Sample rate in Hz.

mou_two_to_one
Optional attribute; read/write access; type: unknown type.

Scaling is 2:1 flag.

mouse_disabled
Optional attribute; read/write access; type: unknown type.

Mouse disabled flag.

mouse_event
Pseudo attribute; read/write access; type: unknown type; integer indexed; indexed type: unknown type.

Write-only. Forces mouse events. Writes to indices 0 through 5 result in movement in directions up, down, left, right, wheel up, or wheel down by value mm.

mouse_irq_en
Optional attribute; read/write access; type: unknown type.

Mouse interrupt enabled flag.

mouse_irq_level
Required attribute; read/write access; type: unknown type.

Interrupt level of the mouse.

mouse_mode
Optional attribute; read/write access; type: unknown type.

Mode operating mode. 0 = 3-button mode, 1 = 3-button wheel mode, and 2 = 5-button wheel mode.

mouse_type
Optional attribute; read/write access; type: unknown type.

Modeled mouse type. 0 = 3-button mouse (default), 1 = 3-button wheel mouse, and 2 = 5-button wheel mouse.

next_write
Optional attribute; read/write access; type: unknown type.

The next write expected on the command port. 0 = Undefined, 1 = Command, 2 = Output, 3 = Mouse, and 4 = MouseBuffer.

obuffer
Optional attribute; read/write access; type: unknown type.

The next data that will be read from the keyboard.

ofull
Optional attribute; read/write access; type: unknown type.

Flag saying whether the obuffer contains data.

output_port
Optional attribute; read/write access; type: unknown type.

The 8042 controller's output port P2. Only bits 2 and 3 are in this attribute. Use other attributes for the remaining bits.

output_port_mask
Optional attribute; read/write access; type: unknown type.

One bit set for each locked bit in output port P2.

recorder
Required attribute; read/write access; type: Object.

Recorder object defining the recorder interface.

reset_target
Optional attribute; read/write access; type: Object.

Object implementing the x86_reset_bus interface.

scan_convert
Optional attribute; read/write access; type: unknown type.

Flag whether we do scan code conversion.

selftest_ok
Optional attribute; read/write access; type: unknown type.

The selftest ok flag.

sent_time
Optional attribute; read/write access; type: unknown type.

The last time we sent an interrupt.

shift_l_down
Optional attribute; read/write access; type: unknown type.

Status of the left shift key.

shift_r_down
Optional attribute; read/write access; type: unknown type.

Status of the right shift key.

Command List

Commands defined by interface log_object
log, log-group, log-level, log-size, log-type
Commands
ctrl-alt-delsend ctrl-alt-del to console
infoprint information about the device
key-downsend key event
key-upsend key event
left-buttonset button state
middle-buttonset button state
mouse-downmove mouse
mouse-leftmove mouse
mouse-rightmove mouse
mouse-upmove mouse
right-buttonset button state
statusprint status of the device

Command Descriptions

<i8042>.ctrl-alt-del
Synopsis
<i8042>.ctrl-alt-del
Description
Sends a Ctrl-Alt-Del command to the console. This is useful primarily on a Windows-hosted Simics to avoid having Ctrl-Alt-Del catched by the host OS.
<i8042>.info
Synopsis
<i8042>.info
Description
Print detailed information about the configuration of the device.
<i8042>.key-down
Synopsis
<i8042>.key-down key-code
<i8042>.key-up key-code
Description
Send a key press to the keyboard controller. The argument is the internal Simics keycode.
<i8042>.key-up
Synopsis
<i8042>.key-up key-code
<i8042>.key-down key-code
Description
Send a key press to the keyboard controller. The argument is the internal Simics keycode.
<i8042>.left-button
Synopsis
<i8042>.left-button "direction"
<i8042>.middle-button "direction"
<i8042>.right-button "direction"
Description
Set the state of the left or right mouse button. Valid arguments are "up" and "down".
<i8042>.middle-button
Synopsis
<i8042>.middle-button "direction"
<i8042>.left-button "direction"
<i8042>.right-button "direction"
Description
Set the state of the left or right mouse button. Valid arguments are "up" and "down".
<i8042>.mouse-down
Synopsis
<i8042>.mouse-down millimeters
<i8042>.mouse-left millimeters
<i8042>.mouse-right millimeters
<i8042>.mouse-up millimeters
Description
Move the mouse up/down/left/right a specified number of millimeters.
<i8042>.mouse-left
Synopsis
<i8042>.mouse-left millimeters
<i8042>.mouse-down millimeters
<i8042>.mouse-right millimeters
<i8042>.mouse-up millimeters
Description
Move the mouse up/down/left/right a specified number of millimeters.
<i8042>.mouse-right
Synopsis
<i8042>.mouse-right millimeters
<i8042>.mouse-down millimeters
<i8042>.mouse-left millimeters
<i8042>.mouse-up millimeters
Description
Move the mouse up/down/left/right a specified number of millimeters.
<i8042>.mouse-up
Synopsis
<i8042>.mouse-up millimeters
<i8042>.mouse-down millimeters
<i8042>.mouse-left millimeters
<i8042>.mouse-right millimeters
Description
Move the mouse up/down/left/right a specified number of millimeters.
<i8042>.right-button
Synopsis
<i8042>.right-button "direction"
<i8042>.left-button "direction"
<i8042>.middle-button "direction"
Description
Set the state of the left or right mouse button. Valid arguments are "up" and "down".
<i8042>.status
Synopsis
<i8042>.status
Description
Print detailed information about the current status of the device.

VIRTUTECH CONFIDENTIAL    Previous - Up - Next