coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vga_io.c File Reference
#include <pc80/vga_io.h>
#include <arch/io.h>
Include dependency graph for vga_io.c:

Go to the source code of this file.

Macros

#define VGA_CR_INDEX   0x3D4
 
#define VGA_CR_VALUE   0x3D5
 
#define VGA_SR_INDEX   0x3C4
 
#define VGA_SR_VALUE   0x3C5
 
#define VGA_GR_INDEX   0x3CE
 
#define VGA_GR_VALUE   0x3CF
 
#define VGA_AR_INDEX   0x3C0
 
#define VGA_AR_VALUE_READ   0x3C1
 
#define VGA_AR_VALUE_WRITE   VGA_AR_INDEX
 
#define VGA_MISC_WRITE   0x3C2
 
#define VGA_MISC_READ   0x3CC
 
#define VGA_ENABLE   0x3C3
 
#define VGA_STAT1   0x3DA
 
#define VGA_DAC_MASK   0x3C6
 
#define VGA_DAC_READ_ADDRESS   0x3C7
 
#define VGA_DAC_WRITE_ADDRESS   0x3C8
 
#define VGA_DAC_DATA   0x3C9
 

Functions

unsigned char vga_enable_read (void)
 
void vga_enable_write (unsigned char value)
 
void vga_enable_mask (unsigned char value, unsigned char mask)
 
unsigned char vga_misc_read (void)
 
void vga_misc_write (unsigned char value)
 
void vga_misc_mask (unsigned char value, unsigned char mask)
 
unsigned char vga_sr_read (unsigned char index)
 
void vga_sr_write (unsigned char index, unsigned char value)
 
void vga_sr_mask (unsigned char index, unsigned char value, unsigned char mask)
 
unsigned char vga_cr_read (unsigned char index)
 
void vga_cr_write (unsigned char index, unsigned char value)
 
void vga_cr_mask (unsigned char index, unsigned char value, unsigned char mask)
 
unsigned char vga_ar_read (unsigned char index)
 
void vga_ar_write (unsigned char index, unsigned char value)
 
void vga_ar_mask (unsigned char index, unsigned char value, unsigned char mask)
 
unsigned char vga_gr_read (unsigned char index)
 
void vga_gr_write (unsigned char index, unsigned char value)
 
void vga_gr_mask (unsigned char index, unsigned char value, unsigned char mask)
 
void vga_palette_enable (void)
 
void vga_palette_disable (void)
 
unsigned char vga_dac_mask_read (void)
 
void vga_dac_mask_write (unsigned char mask)
 
void vga_dac_read_address (unsigned char address)
 
void vga_dac_write_address (unsigned char address)
 
unsigned char vga_dac_data_read (void)
 
void vga_dac_data_write (unsigned char data)
 

Macro Definition Documentation

◆ VGA_AR_INDEX

#define VGA_AR_INDEX   0x3C0

Definition at line 19 of file vga_io.c.

◆ VGA_AR_VALUE_READ

#define VGA_AR_VALUE_READ   0x3C1

Definition at line 20 of file vga_io.c.

◆ VGA_AR_VALUE_WRITE

#define VGA_AR_VALUE_WRITE   VGA_AR_INDEX

Definition at line 21 of file vga_io.c.

◆ VGA_CR_INDEX

#define VGA_CR_INDEX   0x3D4

Definition at line 10 of file vga_io.c.

◆ VGA_CR_VALUE

#define VGA_CR_VALUE   0x3D5

Definition at line 11 of file vga_io.c.

◆ VGA_DAC_DATA

#define VGA_DAC_DATA   0x3C9

Definition at line 32 of file vga_io.c.

◆ VGA_DAC_MASK

#define VGA_DAC_MASK   0x3C6

Definition at line 29 of file vga_io.c.

◆ VGA_DAC_READ_ADDRESS

#define VGA_DAC_READ_ADDRESS   0x3C7

Definition at line 30 of file vga_io.c.

◆ VGA_DAC_WRITE_ADDRESS

#define VGA_DAC_WRITE_ADDRESS   0x3C8

Definition at line 31 of file vga_io.c.

◆ VGA_ENABLE

#define VGA_ENABLE   0x3C3

Definition at line 26 of file vga_io.c.

◆ VGA_GR_INDEX

#define VGA_GR_INDEX   0x3CE

Definition at line 16 of file vga_io.c.

◆ VGA_GR_VALUE

#define VGA_GR_VALUE   0x3CF

Definition at line 17 of file vga_io.c.

◆ VGA_MISC_READ

#define VGA_MISC_READ   0x3CC

Definition at line 24 of file vga_io.c.

◆ VGA_MISC_WRITE

#define VGA_MISC_WRITE   0x3C2

Definition at line 23 of file vga_io.c.

◆ VGA_SR_INDEX

#define VGA_SR_INDEX   0x3C4

Definition at line 13 of file vga_io.c.

◆ VGA_SR_VALUE

#define VGA_SR_VALUE   0x3C5

Definition at line 14 of file vga_io.c.

◆ VGA_STAT1

#define VGA_STAT1   0x3DA

Definition at line 27 of file vga_io.c.

Function Documentation

◆ vga_ar_mask()

void vga_ar_mask ( unsigned char  index,
unsigned char  value,
unsigned char  mask 
)

Definition at line 168 of file vga_io.c.

References mask, value, vga_ar_read(), and vga_ar_write().

Here is the call graph for this function:

◆ vga_ar_read()

unsigned char vga_ar_read ( unsigned char  index)

Definition at line 146 of file vga_io.c.

References inb(), outb(), VGA_AR_INDEX, VGA_AR_VALUE_READ, VGA_STAT1, and void().

Referenced by vga_ar_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_ar_write()

void vga_ar_write ( unsigned char  index,
unsigned char  value 
)

Definition at line 159 of file vga_io.c.

References inb(), outb(), value, VGA_AR_INDEX, VGA_AR_VALUE_WRITE, VGA_STAT1, and void().

Referenced by vga_ar_mask(), and vga_palette_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_cr_mask()

void vga_cr_mask ( unsigned char  index,
unsigned char  value,
unsigned char  mask 
)

Definition at line 132 of file vga_io.c.

References mask, value, vga_cr_read(), and vga_cr_write().

Referenced by vga_cursor_enable(), vga_font_8x16_load(), vga_io_init(), vga_mode_set(), and vga_textmode_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_cr_read()

unsigned char vga_cr_read ( unsigned char  index)

Definition at line 118 of file vga_io.c.

References inb(), outb(), VGA_CR_INDEX, and VGA_CR_VALUE.

Referenced by cirrus_init_linear_fb(), and vga_cr_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_cr_write()

void vga_cr_write ( unsigned char  index,
unsigned char  value 
)

Definition at line 125 of file vga_io.c.

References outb(), value, VGA_CR_INDEX, and VGA_CR_VALUE.

Referenced by cirrus_init_linear_fb(), intel_gma_init(), intel_gma_init_vga(), vga_cr_mask(), vga_cursor_reset(), vga_cursor_set(), vga_frame_set(), vga_mode_set(), and vga_textmode_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_dac_data_read()

unsigned char vga_dac_data_read ( void  )

Definition at line 250 of file vga_io.c.

References inb(), and VGA_DAC_DATA.

Here is the call graph for this function:

◆ vga_dac_data_write()

void vga_dac_data_write ( unsigned char  data)

Definition at line 256 of file vga_io.c.

References outb(), and VGA_DAC_DATA.

Referenced by vga_palette_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_dac_mask_read()

unsigned char vga_dac_mask_read ( void  )

Definition at line 226 of file vga_io.c.

References inb(), and VGA_DAC_MASK.

Here is the call graph for this function:

◆ vga_dac_mask_write()

void vga_dac_mask_write ( unsigned char  mask)

Definition at line 232 of file vga_io.c.

References mask, outb(), and VGA_DAC_MASK.

Referenced by vga_palette_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_dac_read_address()

void vga_dac_read_address ( unsigned char  address)

Definition at line 238 of file vga_io.c.

References address, outb(), and VGA_DAC_READ_ADDRESS.

Here is the call graph for this function:

◆ vga_dac_write_address()

void vga_dac_write_address ( unsigned char  address)

Definition at line 244 of file vga_io.c.

References address, outb(), and VGA_DAC_WRITE_ADDRESS.

Referenced by vga_palette_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_enable_mask()

void vga_enable_mask ( unsigned char  value,
unsigned char  mask 
)

Definition at line 50 of file vga_io.c.

References mask, value, vga_enable_read(), and vga_enable_write().

Referenced by vga_io_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_enable_read()

unsigned char vga_enable_read ( void  )

Definition at line 38 of file vga_io.c.

References inb(), and VGA_ENABLE.

Referenced by vga_enable_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_enable_write()

void vga_enable_write ( unsigned char  value)

Definition at line 44 of file vga_io.c.

References outb(), value, and VGA_ENABLE.

Referenced by vga_enable_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_gr_mask()

void vga_gr_mask ( unsigned char  index,
unsigned char  value,
unsigned char  mask 
)

Definition at line 196 of file vga_io.c.

References mask, value, vga_gr_read(), and vga_gr_write().

Referenced by vga_font_8x16_load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_gr_read()

unsigned char vga_gr_read ( unsigned char  index)

Definition at line 182 of file vga_io.c.

References inb(), outb(), VGA_GR_INDEX, and VGA_GR_VALUE.

Referenced by vga_font_8x16_load(), and vga_gr_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_gr_write()

void vga_gr_write ( unsigned char  index,
unsigned char  value 
)

Definition at line 189 of file vga_io.c.

References outb(), value, VGA_GR_INDEX, and VGA_GR_VALUE.

Referenced by cirrus_init_linear_fb(), intel_gma_init(), intel_gma_init_vga(), vga_fb_init(), vga_font_8x16_load(), and vga_gr_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_misc_mask()

void vga_misc_mask ( unsigned char  value,
unsigned char  mask 
)

Definition at line 76 of file vga_io.c.

References mask, value, vga_misc_read(), and vga_misc_write().

Referenced by vga_fb_init(), vga_io_init(), and vga_mode_set().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_misc_read()

unsigned char vga_misc_read ( void  )

Definition at line 64 of file vga_io.c.

References inb(), and VGA_MISC_READ.

Referenced by vga_misc_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_misc_write()

void vga_misc_write ( unsigned char  value)

Definition at line 70 of file vga_io.c.

References outb(), value, and VGA_MISC_WRITE.

Referenced by bochs_init_text_mode(), cirrus_init_linear_fb(), cirrus_init_text_mode(), intel_gma_init(), intel_gma_init_lvds(), intel_gma_init_vga(), and vga_misc_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_palette_disable()

void vga_palette_disable ( void  )

Definition at line 218 of file vga_io.c.

References inb(), outb(), VGA_AR_INDEX, VGA_STAT1, and void().

Referenced by cirrus_init_linear_fb(), and vga_palette_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_palette_enable()

void vga_palette_enable ( void  )

Definition at line 210 of file vga_io.c.

References inb(), outb(), VGA_AR_INDEX, VGA_STAT1, and void().

Here is the call graph for this function:

◆ vga_sr_mask()

void vga_sr_mask ( unsigned char  index,
unsigned char  value,
unsigned char  mask 
)

Definition at line 104 of file vga_io.c.

References mask, value, vga_sr_read(), and vga_sr_write().

Referenced by vga_font_8x16_load(), and vga_textmode_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_sr_read()

unsigned char vga_sr_read ( unsigned char  index)

Definition at line 90 of file vga_io.c.

References inb(), outb(), VGA_SR_INDEX, and VGA_SR_VALUE.

Referenced by intel_gma_init(), intel_gma_init_vga(), vga_font_8x16_load(), and vga_sr_mask().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ vga_sr_write()

void vga_sr_write ( unsigned char  index,
unsigned char  value 
)

Definition at line 97 of file vga_io.c.

References outb(), value, VGA_SR_INDEX, and VGA_SR_VALUE.

Referenced by cirrus_init_linear_fb(), intel_gma_init(), intel_gma_init_vga(), vga_fb_init(), vga_font_8x16_load(), vga_sr_mask(), and vga_textmode_init().

Here is the call graph for this function:
Here is the caller graph for this function: