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

A VGA compatible device. More...

Inheritance diagram for Vga:
StaticReceiver< Vga > BiosCommon Device DiscoveryHelper< BiosCommon >

Public Member Functions

bool receive (MessageBios &msg)
bool receive (MessageIOOut &msg)
bool receive (MessageIOIn &msg)
bool receive (MessageMem &msg)
bool receive (MessageMemRegion &msg)
bool receive (MessageDiscovery &msg)
 Vga (Motherboard &mb, unsigned short iobase, char *framebuffer_ptr, unsigned long framebuffer_phys, unsigned long framebuffer_size)
- Public Member Functions inherited from StaticReceiver< Vga >
 StaticReceiver ()
- Public Member Functions inherited from Device
void debug_dump ()
 Device (const char *debug_name)

Private Types

enum  { LOW_BASE = 0xa0000, LOW_SIZE = 1<<17, TEXT_OFFSET = 0x18000 >> 1, EBDA_FONT_OFFSET = 0x1000 }

Private Member Functions

void puts_guest (const char *msg)
void update_cursor (unsigned page, unsigned pos)
 Update the cursor of a page and sync the hardware cursor with the one of the active page.
unsigned get_page (unsigned page)
 Get the page offset.
unsigned get_pos (unsigned page)
 Return the text mode cursor position in characters for a given page.
bool handle_reset (bool show)
unsigned get_vesa_mode (unsigned vesa_mode, ConsoleModeInfo *info)
bool handle_vesa (CpuState *cpu)
bool handle_int10 (MessageBios &msg)
 Graphic INT.

Static Private Member Functions

static unsigned vesa_farptr (CpuState *cpu, void *p, void *base)

Private Attributes

unsigned short _view
unsigned short _iobase
char * _framebuffer_ptr
unsigned long _framebuffer_phys
unsigned long _framebuffer_size
VgaRegs _regs
unsigned char _crt_index
unsigned _ebda_segment
unsigned _vbe_mode

Additional Inherited Members

- Public Types inherited from BiosCommon
enum  { RESET_VECTOR = 0x100, MAX_VECTOR }
- Static Public Member Functions inherited from StaticReceiver< Vga >
static bool receive_static (Device *o, M &msg)
- Static Public Member Functions inherited from DiscoveryHelper< BiosCommon >
static bool discover (Device *o, MessageDiscovery &msg)
- Public Attributes inherited from BiosCommon
Motherboard_mb
- Protected Member Functions inherited from BiosCommon
void write_bda (unsigned short offset, unsigned value, unsigned len)
 Write bios data helper.
unsigned read_bda (unsigned offset)
 Read bios data helper.
bool jmp_int (MessageBios &msg, unsigned char number)
 Jump to another realmode INT handler.
bool jmp_hlt (MessageBios &msg)
void error (MessageBios &msg, unsigned char errorcode)
 Set the usual error indication.
void outb (unsigned short port, unsigned value)
 Out to IO-port.
 BiosCommon (Motherboard &mb)

Detailed Description

A VGA compatible device.

State: unstable Features: textmode 80x25 supported, cursor, VESA framebuffer Missing: plenty, e.g: PCI, IRQ, many BIOS functions, 8-bit graphic modes Documentation: FreeVGA chipset reference - vga.htm, Browns IRQ List

Member Enumeration Documentation

anonymous enum
private
Enumerator:
LOW_BASE 
LOW_SIZE 
TEXT_OFFSET 
EBDA_FONT_OFFSET 

Constructor & Destructor Documentation

Vga::Vga ( Motherboard mb,
unsigned short  iobase,
char *  framebuffer_ptr,
unsigned long  framebuffer_phys,
unsigned long  framebuffer_size 
)
inline

Member Function Documentation

unsigned Vga::get_page ( unsigned  page)
inlineprivate

Get the page offset.

unsigned Vga::get_pos ( unsigned  page)
inlineprivate

Return the text mode cursor position in characters for a given page.

unsigned Vga::get_vesa_mode ( unsigned  vesa_mode,
ConsoleModeInfo info 
)
inlineprivate
bool Vga::handle_int10 ( MessageBios msg)
inlineprivate

Graphic INT.

bool Vga::handle_reset ( bool  show)
inlineprivate
bool Vga::handle_vesa ( CpuState cpu)
inlineprivate
void Vga::puts_guest ( const char *  msg)
inlineprivate
bool Vga::receive ( MessageBios msg)
inline
bool Vga::receive ( MessageIOOut msg)
inline
bool Vga::receive ( MessageIOIn msg)
inline
bool Vga::receive ( MessageMem msg)
inline
bool Vga::receive ( MessageMemRegion msg)
inline
bool Vga::receive ( MessageDiscovery msg)
inline
void Vga::update_cursor ( unsigned  page,
unsigned  pos 
)
inlineprivate

Update the cursor of a page and sync the hardware cursor with the one of the active page.

static unsigned Vga::vesa_farptr ( CpuState cpu,
void *  p,
void *  base 
)
inlinestaticprivate

Member Data Documentation

unsigned char Vga::_crt_index
private
unsigned Vga::_ebda_segment
private
unsigned long Vga::_framebuffer_phys
private
char* Vga::_framebuffer_ptr
private
unsigned long Vga::_framebuffer_size
private
unsigned short Vga::_iobase
private
VgaRegs Vga::_regs
private
unsigned Vga::_vbe_mode
private
unsigned short Vga::_view
private

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