gem5  v21.1.0.2
Namespaces | Classes | Enumerations | Functions | Variables
gem5::ps2 Namespace Reference

Namespaces

 keyboard
 
 mouse
 

Classes

class  Device
 
class  PS2Keyboard
 
class  PS2Mouse
 
class  TouchKit
 

Enumerations

enum  {
  SelfTestPass = 0xAA, ReadID = 0xF2, Enable = 0xF4, Disable = 0xF5,
  DefaultsAndDisable = 0xF6, SelfTestFail = 0xFC, Ack = 0xFA, Resend = 0xFE,
  Reset = 0xFF
}
 

Functions

void keySymToPs2 (uint32_t key, bool down, bool &cur_shift, std::list< uint8_t > &keys)
 
 GEM5_DEPRECATED_NAMESPACE (Keyboard, keyboard)
 
 GEM5_DEPRECATED_NAMESPACE (Mouse, mouse)
 
 BitUnion8 (Ps2MouseMovement) Bitfield< 0 > leftButton
 A bitfield that represents the first byte of a mouse movement packet. More...
 
 EndBitUnion (Ps2MouseMovement) void keySymToPs2(uint32_t key
 Convert an x11 key symbol into a set of ps2 charecters. More...
 

Variables

static const uint16_t keySymToPs2Byte [128]
 Table to convert simple key symbols (0x00XX) into ps2 bytes. More...
 
const uint8_t ShiftKey = 0x12
 
const uint8_t BreakKey = 0xf0
 
const uint8_t ExtendedKey = 0xe0
 
const uint32_t UpperKeys = 0xff00
 
Bitfield< 1 > rightButton
 
Bitfield< 2 > middleButton
 
Bitfield< 3 > one
 
Bitfield< 4 > xSign
 
Bitfield< 5 > ySign
 
Bitfield< 6 > xOverflow
 
Bitfield< 7 > yOverflow
 
bool down
 
bool bool & cur_shift
 
bool bool std::list< uint8_t > & keys
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
SelfTestPass 
ReadID 
Enable 
Disable 
DefaultsAndDisable 
SelfTestFail 
Ack 
Resend 
Reset 

Definition at line 60 of file types.hh.

Function Documentation

◆ BitUnion8()

gem5::ps2::BitUnion8 ( Ps2MouseMovement  )

A bitfield that represents the first byte of a mouse movement packet.

◆ EndBitUnion()

gem5::ps2::EndBitUnion ( Ps2MouseMovement  )

Convert an x11 key symbol into a set of ps2 charecters.

Parameters
keyx11 key symbol
downif the key is being pressed or released
cur_shiftif device has already sent a shift
keyslist of keys command to send to emulate the x11 key symbol

◆ GEM5_DEPRECATED_NAMESPACE() [1/2]

gem5::ps2::GEM5_DEPRECATED_NAMESPACE ( Keyboard  ,
keyboard   
)

◆ GEM5_DEPRECATED_NAMESPACE() [2/2]

gem5::ps2::GEM5_DEPRECATED_NAMESPACE ( Mouse  ,
mouse   
)

◆ keySymToPs2()

void gem5::ps2::keySymToPs2 ( uint32_t  key,
bool  down,
bool &  cur_shift,
std::list< uint8_t > &  keys 
)

Variable Documentation

◆ BreakKey

const uint8_t gem5::ps2::BreakKey = 0xf0

Definition at line 83 of file types.cc.

Referenced by keySymToPs2().

◆ cur_shift

bool bool& gem5::ps2::cur_shift

Definition at line 136 of file types.hh.

Referenced by keySymToPs2().

◆ down

bool gem5::ps2::down

Definition at line 136 of file types.hh.

Referenced by gem5::ps2::PS2Keyboard::keyPress(), and keySymToPs2().

◆ ExtendedKey

const uint8_t gem5::ps2::ExtendedKey = 0xe0

Definition at line 84 of file types.cc.

Referenced by keySymToPs2().

◆ keys

bool bool std::list<uint8_t>& gem5::ps2::keys

Definition at line 137 of file types.hh.

Referenced by gem5::ps2::PS2Keyboard::keyPress(), and keySymToPs2().

◆ keySymToPs2Byte

const uint16_t gem5::ps2::keySymToPs2Byte[128]
static
Initial value:
= {
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0029, 0x0116, 0x0152, 0x0126, 0x0125, 0x012e, 0x013d, 0x0052,
0x0146, 0x0145, 0x013e, 0x0155, 0x0041, 0x004e, 0x0049, 0x004a,
0x0045, 0x0016, 0x001e, 0x0026, 0x0025, 0x002e, 0x0036, 0x003d,
0x003e, 0x0046, 0x014c, 0x004c, 0x0141, 0x0055, 0x0149, 0x014a,
0x011e, 0x011c, 0x0132, 0x0121, 0x0123, 0x0124, 0x012b, 0x0134,
0x0133, 0x0143, 0x013b, 0x0142, 0x014b, 0x013a, 0x0131, 0x0144,
0x014d, 0x0115, 0x012d, 0x011b, 0x012c, 0x013c, 0x012a, 0x011d,
0x0122, 0x0135, 0x011a, 0x0054, 0x005d, 0x005b, 0x0136, 0x014e,
0x000e, 0x001c, 0x0032, 0x0021, 0x0023, 0x0024, 0x002b, 0x0034,
0x0033, 0x0043, 0x003b, 0x0042, 0x004b, 0x003a, 0x0031, 0x0044,
0x004d, 0x0015, 0x002d, 0x001b, 0x002c, 0x003c, 0x002a, 0x001d,
0x0022, 0x0035, 0x001a, 0x0154, 0x015d, 0x015b, 0x010e, 0x0000
}

Table to convert simple key symbols (0x00XX) into ps2 bytes.

Lower byte is the scan code to send and upper byte is if a modifier is required to generate it. The table generates us keyboard codes, (e.g. the guest is supposed to recognize the keyboard as en_US). A new table would be required for another locale.

Definition at line 62 of file types.cc.

Referenced by keySymToPs2().

◆ middleButton

Bitfield<2> gem5::ps2::middleButton

Definition at line 122 of file types.hh.

◆ one

Bitfield<3> gem5::ps2::one

Definition at line 123 of file types.hh.

Referenced by gem5::ThreadContext::compare().

◆ rightButton

Bitfield<1> gem5::ps2::rightButton

Definition at line 121 of file types.hh.

◆ ShiftKey

const uint8_t gem5::ps2::ShiftKey = 0x12

Definition at line 82 of file types.cc.

Referenced by keySymToPs2().

◆ UpperKeys

const uint32_t gem5::ps2::UpperKeys = 0xff00

Definition at line 85 of file types.cc.

Referenced by keySymToPs2().

◆ xOverflow

Bitfield<6> gem5::ps2::xOverflow

Definition at line 126 of file types.hh.

◆ xSign

Bitfield<4> gem5::ps2::xSign

Definition at line 124 of file types.hh.

◆ yOverflow

Bitfield<7> gem5::ps2::yOverflow

Definition at line 127 of file types.hh.

◆ ySign

Bitfield<5> gem5::ps2::ySign

Definition at line 125 of file types.hh.


Generated on Tue Sep 21 2021 12:31:54 for gem5 by doxygen 1.8.17