NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KeyboardController Class Reference

A PS2 keyboard controller. More...

Inheritance diagram for KeyboardController:
StaticReceiver< KeyboardController > Device

Public Member Functions

bool receive (MessageIOIn &msg)
bool receive (MessageIOOut &msg)
bool receive (MessagePS2 &msg)
bool receive (MessageLegacy &msg)
 KeyboardController (DBus< MessageIrqLines > &bus_irqlines, DBus< MessagePS2 > &bus_ps2, DBus< MessageLegacy > &bus_legacy, unsigned short base, unsigned irqkbd, unsigned irqaux, unsigned ps2ports)
- Public Member Functions inherited from StaticReceiver< KeyboardController >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Types

enum  {
  STATUS_OBF = 1 << 0, STATUS_SYS = 1 << 2, STATUS_CMD = 1 << 3, STATUS_NO_INHB = 1 << 4,
  STATUS_AUX = 1 << 5, STATUS_AUXOBF = STATUS_AUX | STATUS_OBF, CMD_IRQKBD = 1 << 0, CMD_IRQAUX = 1 << 1,
  CMD_SYS = STATUS_SYS, CMD_DISKBD = 1 << 4, CMD_DISAUX = 1 << 5, CMD_TRANSLATE = 1 << 6,
  OUTPORT_RESET = 1 << 0, OUTPORT_A20 = 1 << 1, OUTPORT_IRQKBD = 1 << 4, OUTPORT_IRQAUX = 1 << 5,
  RAM_CMDBYTE = 0x00, RAM_STATUS = 0x01, RAM_OBF = 0x02, RAM_LASTCMD = 0x03,
  RAM_GOT_RELEASE = 0x04, RAM_OUTPORT = 0x05, RAM_PWD_COUNT = 0x06, RAM_PWD_CMP = 0x07,
  RAM_PWD_FIRST = 0x08, RAM_PWD_LAST = 0x0e, RAM_SECON = 0x13, RAM_SECOFF = 0x14,
  RAM_MAKE1 = 0x16, RAM_MAKE2 = 0x17, RAM_LOCK = 0x18
}

Private Member Functions

unsigned char translate_keycodes (unsigned char value)
void read_from_device (unsigned char port)
void read_all_devices ()
bool check_pwd (unsigned char &value, bool from_aux)
void got_data (unsigned char value, bool from_aux)
void legacy_write (MessageLegacy::Type type, unsigned value)

Private Attributes

DBus< MessageIrqLines > & _bus_irqlines
DBus< MessagePS2 > & _bus_ps2
DBus< MessageLegacy > & _bus_legacy
unsigned short _base
unsigned _irqkbd
unsigned _irqaux
unsigned _ps2ports
unsigned char _ram [32]

Additional Inherited Members

- Static Public Member Functions inherited from StaticReceiver< KeyboardController >
static bool receive_static (Device *o, M &msg)

Detailed Description

A PS2 keyboard controller.

State: stable Features: scancode transfer, translation, cmdbytes, A20, reset, pwd Open: transfer NUM-lock state changes upstream Documentation: PS2 hitrc chapter 7

Member Enumeration Documentation

anonymous enum
private
Enumerator:
STATUS_OBF 
STATUS_SYS 
STATUS_CMD 
STATUS_NO_INHB 
STATUS_AUX 
STATUS_AUXOBF 
CMD_IRQKBD 
CMD_IRQAUX 
CMD_SYS 
CMD_DISKBD 
CMD_DISAUX 
CMD_TRANSLATE 
OUTPORT_RESET 
OUTPORT_A20 
OUTPORT_IRQKBD 
OUTPORT_IRQAUX 
RAM_CMDBYTE 
RAM_STATUS 
RAM_OBF 
RAM_LASTCMD 
RAM_GOT_RELEASE 
RAM_OUTPORT 
RAM_PWD_COUNT 
RAM_PWD_CMP 
RAM_PWD_FIRST 
RAM_PWD_LAST 
RAM_SECON 
RAM_SECOFF 
RAM_MAKE1 
RAM_MAKE2 
RAM_LOCK 

Constructor & Destructor Documentation

KeyboardController::KeyboardController ( DBus< MessageIrqLines > &  bus_irqlines,
DBus< MessagePS2 > &  bus_ps2,
DBus< MessageLegacy > &  bus_legacy,
unsigned short  base,
unsigned  irqkbd,
unsigned  irqaux,
unsigned  ps2ports 
)
inline

Member Function Documentation

bool KeyboardController::check_pwd ( unsigned char &  value,
bool  from_aux 
)
inlineprivate
void KeyboardController::got_data ( unsigned char  value,
bool  from_aux 
)
inlineprivate
void KeyboardController::legacy_write ( MessageLegacy::Type  type,
unsigned  value 
)
inlineprivate
void KeyboardController::read_all_devices ( )
inlineprivate
void KeyboardController::read_from_device ( unsigned char  port)
inlineprivate
bool KeyboardController::receive ( MessageIOIn msg)
inline
bool KeyboardController::receive ( MessageIOOut msg)
inline
bool KeyboardController::receive ( MessagePS2 msg)
inline
bool KeyboardController::receive ( MessageLegacy msg)
inline
unsigned char KeyboardController::translate_keycodes ( unsigned char  value)
inlineprivate

Member Data Documentation

unsigned short KeyboardController::_base
private
DBus<MessageIrqLines>& KeyboardController::_bus_irqlines
private
DBus<MessageLegacy>& KeyboardController::_bus_legacy
private
DBus<MessagePS2>& KeyboardController::_bus_ps2
private
unsigned KeyboardController::_irqaux
private
unsigned KeyboardController::_irqkbd
private
unsigned KeyboardController::_ps2ports
private
unsigned char KeyboardController::_ram[32]
private

The documentation for this class was generated from the following file: