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

A VGA console. More...

Inheritance diagram for HostVga:
StaticReceiver< HostVga > Device

Classes

struct  putcdata
struct  View

Public Types

enum  {
  MAXVIEWS = 16, MAXCLIENTS = 64, TIME_TAG = 3, TEXTMODE = 0,
  BACKEND_OFFSET = 0x3000, BACKEND_SIZE = 8*0x1000
}

Public Member Functions

bool receive (MessageConsole &msg)
bool receive (MessageInput &msg)
 HostVga (Motherboard &mb, char *backend, unsigned modifier_switch, unsigned modifier_system, unsigned refresh_freq)
- Public Member Functions inherited from StaticReceiver< HostVga >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Static Public Member Functions

static void do_work (void *t) REGPARM(0) NORETURN
- Static Public Member Functions inherited from StaticReceiver< HostVga >
static bool receive_static (Device *o, M &msg)

Private Member Functions

void set_vga_reg (unsigned short offset, unsigned char index, unsigned char value)
void update_timer (Utcb &utcb)
bool switch_client ()
unsigned draw_console_tag ()
 Draw a tag for the console for a given time.
bool handle_console_switching (MessageInput &msg)
 Switches the console with the _modifier_switch.
bool handle_system_keys (MessageInput &msg)
 System keys handling.
bool refresh_textmode (struct View *view, Utcb &utcb)
void work () __attribute__((noreturn))

Static Private Member Functions

static void console_putc (void *data, int value)
 The putc on a console, removes multiple whitespaces.

Private Attributes

Motherboard_mb
char * _backend
char _saved [BACKEND_SIZE]
char _font [256 *16]
unsigned _modifier_switch
unsigned _modifier_system
unsigned _refresh_freq
unsigned _count
unsigned _active_client
unsigned _active_mode
unsigned short _last_cursor_pos
unsigned short _last_cursor_style
Vbe::ModeInfoBlock _modeinfo
KernelSemaphore _worker
timevalue _lastswitchtime
char * _graphic_ptr
bool _measure
TimerProtocol_timer_service
struct {
   const char *   clientname
   unsigned short   num_views
   unsigned short   active_view
   unsigned short   module
   View   views [MAXVIEWS]
_clients [MAXCLIENTS]

Detailed Description

A VGA console.

State: unstable Features: console switching, cursor, refresh, different views per client Missing: direct map to the client

Member Enumeration Documentation

anonymous enum
Enumerator:
MAXVIEWS 
MAXCLIENTS 
TIME_TAG 
TEXTMODE 
BACKEND_OFFSET 
BACKEND_SIZE 

Constructor & Destructor Documentation

HostVga::HostVga ( Motherboard mb,
char *  backend,
unsigned  modifier_switch,
unsigned  modifier_system,
unsigned  refresh_freq 
)
inline

Member Function Documentation

static void HostVga::console_putc ( void *  data,
int  value 
)
inlinestaticprivate

The putc on a console, removes multiple whitespaces.

static void HostVga::do_work ( void *  t)
inlinestatic
unsigned HostVga::draw_console_tag ( )
inlineprivate

Draw a tag for the console for a given time.

bool HostVga::handle_console_switching ( MessageInput msg)
inlineprivate

Switches the console with the _modifier_switch.

bool HostVga::handle_system_keys ( MessageInput msg)
inlineprivate

System keys handling.

bool HostVga::receive ( MessageConsole msg)
inline
bool HostVga::receive ( MessageInput msg)
inline
bool HostVga::refresh_textmode ( struct View view,
Utcb utcb 
)
inlineprivate
void HostVga::set_vga_reg ( unsigned short  offset,
unsigned char  index,
unsigned char  value 
)
inlineprivate
bool HostVga::switch_client ( )
inlineprivate
void HostVga::update_timer ( Utcb utcb)
inlineprivate
void HostVga::work ( )
inlineprivate

Member Data Documentation

unsigned HostVga::_active_client
private
unsigned HostVga::_active_mode
private
char* HostVga::_backend
private
struct { ... } HostVga::_clients[MAXCLIENTS]
unsigned HostVga::_count
private
char HostVga::_font[256 *16]
private
char* HostVga::_graphic_ptr
private
unsigned short HostVga::_last_cursor_pos
private
unsigned short HostVga::_last_cursor_style
private
timevalue HostVga::_lastswitchtime
private
Motherboard& HostVga::_mb
private
bool HostVga::_measure
private
Vbe::ModeInfoBlock HostVga::_modeinfo
private
unsigned HostVga::_modifier_switch
private
unsigned HostVga::_modifier_system
private
unsigned HostVga::_refresh_freq
private
char HostVga::_saved[BACKEND_SIZE]
private
TimerProtocol* HostVga::_timer_service
private
KernelSemaphore HostVga::_worker
private
unsigned short HostVga::active_view
const char* HostVga::clientname
unsigned short HostVga::module
unsigned short HostVga::num_views
View HostVga::views[MAXVIEWS]

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