iPXE
Data Structures | Macros | Functions
vga.h File Reference

Go to the source code of this file.

Data Structures

struct  vga_par
 
struct  fb_bitfield
 
struct  screeninfo
 

Macros

#define u8   unsigned char
 
#define u16   unsigned short
 
#define u32   unsigned int
 
#define __u32   u32
 
#define VERROR   -1
 
#define CHAR_HEIGHT   16
 
#define LINES   25
 
#define COLS   80
 
#define write_crtc(data, addr)   outb(addr,CRT_IC); outb(data,CRT_DC)
 
#define write_att(data, addr)   inb(IS1_RC); inb(0x80); outb(addr,ATT_IW); inb(0x80); outb(data,ATT_IW); inb(0x80)
 
#define write_seq(data, addr)   outb(addr,SEQ_I); outb(data,SEQ_D)
 
#define write_gra(data, addr)   outb(addr,GRA_I); outb(data,GRA_D)
 
#define vga_hardware_fixup()   do{} while(0)
 
#define SYNC_HOR_HIGH_ACT   1 /* horizontal sync high active */
 
#define SYNC_VERT_HIGH_ACT   2 /* vertical sync high active */
 
#define SYNC_EXT   4 /* external sync */
 
#define SYNC_COMP_HIGH_ACT   8 /* composite sync high active */
 
#define SYNC_BROADCAST   16 /* broadcast video timings */
 
#define SYNC_ON_GREEN   32 /* sync on green */
 
#define VMODE_NONINTERLACED   0 /* non interlaced */
 
#define VMODE_INTERLACED   1 /* interlaced */
 
#define VMODE_DOUBLE   2 /* double scan */
 
#define VMODE_MASK   255
 
#define VMODE_YWRAP   256 /* ywrap instead of panning */
 
#define VMODE_SMOOTH_XPAN   512 /* smooth xpan possible (internally used) */
 
#define VMODE_CONUPDATE   512 /* don't update x/yoffset */
 
#define CRT_DC   0x3D5 /* CRT Controller Data Register - color emulation */
 
#define CRT_DM   0x3B5 /* CRT Controller Data Register - mono emulation */
 
#define ATT_R   0x3C1 /* Attribute Controller Data Read Register */
 
#define GRA_D   0x3CF /* Graphics Controller Data Register */
 
#define SEQ_D   0x3C5 /* Sequencer Data Register */
 
#define MIS_R   0x3CC
 
#define MIS_W   0x3C2
 
#define IS1_RC   0x3DA /* Input Status Register 1 - color emulation */
 
#define IS1_RM   0x3BA /* Input Status Register 1 - mono emulation */
 
#define PEL_D   0x3C9 /* PEL Data Register */
 
#define PEL_MSK   0x3C6 /* PEL mask register */
 
#define GRA_E0   0x3CC /* Graphics enable processor 0 */
 
#define GRA_E1   0x3CA /* Graphics enable processor 1 */
 
#define CRT_IC   0x3D4 /* CRT Controller Index - color emulation */
 
#define CRT_IM   0x3B4 /* CRT Controller Index - mono emulation */
 
#define ATT_IW   0x3C0 /* Attribute Controller Index & Data Write Register */
 
#define GRA_I   0x3CE /* Graphics Controller Index */
 
#define SEQ_I   0x3C4 /* Sequencer Index */
 
#define PEL_IW   0x3C8 /* PEL Write Index */
 
#define PEL_IR   0x3C7 /* PEL Read Index */
 
#define CRTC_C   25 /* 25 CRT Controller Registers sequentially set*/
 
#define ATT_C   21 /* 21 Attribute Controller Registers */
 
#define GRA_C   9 /* 9 Graphics Controller Registers */
 
#define SEQ_C   5 /* 5 Sequencer Registers */
 
#define MIS_C   1 /* 1 Misc Output Register */
 
#define CRTC_H_TOTAL   0
 
#define CRTC_H_DISP   1
 
#define CRTC_H_BLANK_START   2
 
#define CRTC_H_BLANK_END   3
 
#define CRTC_H_SYNC_START   4
 
#define CRTC_H_SYNC_END   5
 
#define CRTC_V_TOTAL   6
 
#define CRTC_OVERFLOW   7
 
#define CRTC_PRESET_ROW   8
 
#define CRTC_MAX_SCAN   9
 
#define CRTC_CURSOR_START   0x0A
 
#define CRTC_CURSOR_END   0x0B
 
#define CRTC_START_HI   0x0C
 
#define CRTC_START_LO   0x0D
 
#define CRTC_CURSOR_HI   0x0E
 
#define CRTC_CURSOR_LO   0x0F
 
#define CRTC_V_SYNC_START   0x10
 
#define CRTC_V_SYNC_END   0x11
 
#define CRTC_V_DISP_END   0x12
 
#define CRTC_OFFSET   0x13
 
#define CRTC_UNDERLINE   0x14
 
#define CRTC_V_BLANK_START   0x15
 
#define CRTC_V_BLANK_END   0x16
 
#define CRTC_MODE   0x17
 
#define CRTC_LINE_COMPARE   0x18
 
#define ATC_MODE   0x10
 
#define ATC_OVERSCAN   0x11
 
#define ATC_PLANE_ENABLE   0x12
 
#define ATC_PEL   0x13
 
#define ATC_COLOR_PAGE   0x14
 
#define SEQ_CLOCK_MODE   0x01
 
#define SEQ_PLANE_WRITE   0x02
 
#define SEQ_CHARACTER_MAP   0x03
 
#define SEQ_MEMORY_MODE   0x04
 
#define GDC_SR_VALUE   0x00
 
#define GDC_SR_ENABLE   0x01
 
#define GDC_COMPARE_VALUE   0x02
 
#define GDC_DATA_ROTATE   0x03
 
#define GDC_PLANE_READ   0x04
 
#define GDC_MODE   0x05
 
#define GDC_MISC   0x06
 
#define GDC_COMPARE_MASK   0x07
 
#define GDC_BIT_MASK   0x08
 
#define VGA_ATTR_CLR_RED   0x4
 
#define VGA_ATTR_CLR_GRN   0x2
 
#define VGA_ATTR_CLR_BLU   0x1
 
#define VGA_ATTR_CLR_YEL   (VGA_ATTR_CLR_RED | VGA_ATTR_CLR_GRN)
 
#define VGA_ATTR_CLR_CYN   (VGA_ATTR_CLR_GRN | VGA_ATTR_CLR_BLU)
 
#define VGA_ATTR_CLR_MAG   (VGA_ATTR_CLR_BLU | VGA_ATTR_CLR_RED)
 
#define VGA_ATTR_CLR_BLK   0
 
#define VGA_ATTR_CLR_WHT   (VGA_ATTR_CLR_RED | VGA_ATTR_CLR_GRN | VGA_ATTR_CLR_BLU)
 
#define VGA_ATTR_BNK   0x80
 
#define VGA_ATTR_ITN   0x08
 

Functions

u8 read_seq_b (u16 addr)
 
u8 read_gra_b (u16 addr)
 
u8 read_crtc_b (u16 addr)
 
u8 read_att_b (u16 addr)
 

Macro Definition Documentation

◆ u8

#define u8   unsigned char

Definition at line 19 of file vga.h.

◆ u16

uint16_t u16   unsigned short

Definition at line 20 of file vga.h.

Referenced by ath5k_create_power_curve(), ath5k_hw_eeprom_read(), ath5k_hw_radio_revision(), ath5k_setup_channel_powertable(), ath9k_adjust_pdadc_values(), ath9k_change_gain_boundary_setting(), ath9k_hw_4k_check_eeprom(), ath9k_hw_ar9287_check_eeprom(), ath9k_hw_def_check_eeprom(), ath9k_hw_fill_vpd_table(), ath9k_hw_get_gain_boundaries_pdadcs(), ath9k_hw_get_lower_upper_index(), ath9k_hw_set_4k_power_cal_table(), ath9k_hw_set_ar9287_power_cal_table(), ath9k_hw_set_def_power_cal_table(), atl1e_read_phy_reg(), bnx2_alloc_bad_rbuf(), bnxt_hwrm_backing_store_cfg(), bnxt_hwrm_backing_store_qcfg(), bnxt_hwrm_cfa_l2_filter_alloc(), bnxt_hwrm_cfa_l2_filter_free(), bnxt_hwrm_func_cfg_req(), bnxt_hwrm_func_drv_rgtr(), bnxt_hwrm_func_drv_unrgtr(), bnxt_hwrm_func_qcaps_req(), bnxt_hwrm_func_qcfg_req(), bnxt_hwrm_func_reset_req(), bnxt_hwrm_func_resource_qcaps(), bnxt_hwrm_nvm_get_variable_req(), bnxt_hwrm_port_mac_cfg(), bnxt_hwrm_port_phy_cfg(), bnxt_hwrm_port_phy_qcaps_req(), bnxt_hwrm_port_phy_qcfg(), bnxt_hwrm_queue_qportcfg(), bnxt_hwrm_ring_alloc(), bnxt_hwrm_ring_alloc_grp(), bnxt_hwrm_ring_free(), bnxt_hwrm_ring_free_grp(), bnxt_hwrm_set_async_event(), bnxt_hwrm_set_rx_mask(), bnxt_hwrm_stat_ctx_alloc(), bnxt_hwrm_stat_ctx_free(), bnxt_hwrm_ver_get(), bnxt_hwrm_vnic_alloc(), bnxt_hwrm_vnic_cfg(), bnxt_hwrm_vnic_free(), dm9132_id_table(), hwrm_init(), igbvf_hash_mc_addr_vf(), memsetw(), short_hwrm_cmd_req(), sis190_get_mac_addr_from_eeprom(), sis900_get_mac_addr(), tlan_transmit(), and w89c840_transmit().

◆ u32

uint32_t u32   unsigned int

◆ __u32

#define __u32   u32

Definition at line 22 of file vga.h.

◆ VERROR

#define VERROR   -1

Definition at line 24 of file vga.h.

◆ CHAR_HEIGHT

#define CHAR_HEIGHT   16

Definition at line 25 of file vga.h.

◆ LINES

#define LINES   25

Definition at line 26 of file vga.h.

◆ COLS

#define COLS   80

Definition at line 27 of file vga.h.

◆ write_crtc

#define write_crtc (   data,
  addr 
)    outb(addr,CRT_IC); outb(data,CRT_DC)

Definition at line 30 of file vga.h.

◆ write_att

#define write_att (   data,
  addr 
)    inb(IS1_RC); inb(0x80); outb(addr,ATT_IW); inb(0x80); outb(data,ATT_IW); inb(0x80)

Definition at line 31 of file vga.h.

◆ write_seq

#define write_seq (   data,
  addr 
)    outb(addr,SEQ_I); outb(data,SEQ_D)

Definition at line 32 of file vga.h.

◆ write_gra

#define write_gra (   data,
  addr 
)    outb(addr,GRA_I); outb(data,GRA_D)

Definition at line 33 of file vga.h.

◆ vga_hardware_fixup

#define vga_hardware_fixup ( )    do{} while(0)

Definition at line 43 of file vga.h.

◆ SYNC_HOR_HIGH_ACT

#define SYNC_HOR_HIGH_ACT   1 /* horizontal sync high active */

Definition at line 46 of file vga.h.

◆ SYNC_VERT_HIGH_ACT

#define SYNC_VERT_HIGH_ACT   2 /* vertical sync high active */

Definition at line 47 of file vga.h.

◆ SYNC_EXT

#define SYNC_EXT   4 /* external sync */

Definition at line 48 of file vga.h.

◆ SYNC_COMP_HIGH_ACT

#define SYNC_COMP_HIGH_ACT   8 /* composite sync high active */

Definition at line 49 of file vga.h.

◆ SYNC_BROADCAST

#define SYNC_BROADCAST   16 /* broadcast video timings */

Definition at line 50 of file vga.h.

◆ SYNC_ON_GREEN

#define SYNC_ON_GREEN   32 /* sync on green */

Definition at line 54 of file vga.h.

◆ VMODE_NONINTERLACED

#define VMODE_NONINTERLACED   0 /* non interlaced */

Definition at line 56 of file vga.h.

◆ VMODE_INTERLACED

#define VMODE_INTERLACED   1 /* interlaced */

Definition at line 57 of file vga.h.

◆ VMODE_DOUBLE

#define VMODE_DOUBLE   2 /* double scan */

Definition at line 58 of file vga.h.

◆ VMODE_MASK

#define VMODE_MASK   255

Definition at line 59 of file vga.h.

◆ VMODE_YWRAP

#define VMODE_YWRAP   256 /* ywrap instead of panning */

Definition at line 61 of file vga.h.

◆ VMODE_SMOOTH_XPAN

#define VMODE_SMOOTH_XPAN   512 /* smooth xpan possible (internally used) */

Definition at line 62 of file vga.h.

◆ VMODE_CONUPDATE

#define VMODE_CONUPDATE   512 /* don't update x/yoffset */

Definition at line 63 of file vga.h.

◆ CRT_DC

#define CRT_DC   0x3D5 /* CRT Controller Data Register - color emulation */

Definition at line 66 of file vga.h.

◆ CRT_DM

#define CRT_DM   0x3B5 /* CRT Controller Data Register - mono emulation */

Definition at line 67 of file vga.h.

◆ ATT_R

#define ATT_R   0x3C1 /* Attribute Controller Data Read Register */

Definition at line 68 of file vga.h.

◆ GRA_D

#define GRA_D   0x3CF /* Graphics Controller Data Register */

Definition at line 69 of file vga.h.

◆ SEQ_D

#define SEQ_D   0x3C5 /* Sequencer Data Register */

Definition at line 70 of file vga.h.

◆ MIS_R

#define MIS_R   0x3CC

Definition at line 72 of file vga.h.

◆ MIS_W

#define MIS_W   0x3C2

Definition at line 73 of file vga.h.

◆ IS1_RC

#define IS1_RC   0x3DA /* Input Status Register 1 - color emulation */

Definition at line 75 of file vga.h.

◆ IS1_RM

#define IS1_RM   0x3BA /* Input Status Register 1 - mono emulation */

Definition at line 76 of file vga.h.

◆ PEL_D

#define PEL_D   0x3C9 /* PEL Data Register */

Definition at line 77 of file vga.h.

◆ PEL_MSK

#define PEL_MSK   0x3C6 /* PEL mask register */

Definition at line 78 of file vga.h.

◆ GRA_E0

#define GRA_E0   0x3CC /* Graphics enable processor 0 */

Definition at line 81 of file vga.h.

◆ GRA_E1

#define GRA_E1   0x3CA /* Graphics enable processor 1 */

Definition at line 82 of file vga.h.

◆ CRT_IC

#define CRT_IC   0x3D4 /* CRT Controller Index - color emulation */

Definition at line 86 of file vga.h.

◆ CRT_IM

#define CRT_IM   0x3B4 /* CRT Controller Index - mono emulation */

Definition at line 87 of file vga.h.

◆ ATT_IW

#define ATT_IW   0x3C0 /* Attribute Controller Index & Data Write Register */

Definition at line 88 of file vga.h.

◆ GRA_I

#define GRA_I   0x3CE /* Graphics Controller Index */

Definition at line 89 of file vga.h.

◆ SEQ_I

#define SEQ_I   0x3C4 /* Sequencer Index */

Definition at line 90 of file vga.h.

◆ PEL_IW

#define PEL_IW   0x3C8 /* PEL Write Index */

Definition at line 91 of file vga.h.

◆ PEL_IR

#define PEL_IR   0x3C7 /* PEL Read Index */

Definition at line 92 of file vga.h.

◆ CRTC_C

#define CRTC_C   25 /* 25 CRT Controller Registers sequentially set*/

Definition at line 95 of file vga.h.

◆ ATT_C

#define ATT_C   21 /* 21 Attribute Controller Registers */

Definition at line 97 of file vga.h.

◆ GRA_C

#define GRA_C   9 /* 9 Graphics Controller Registers */

Definition at line 98 of file vga.h.

◆ SEQ_C

#define SEQ_C   5 /* 5 Sequencer Registers */

Definition at line 99 of file vga.h.

◆ MIS_C

#define MIS_C   1 /* 1 Misc Output Register */

Definition at line 100 of file vga.h.

◆ CRTC_H_TOTAL

#define CRTC_H_TOTAL   0

Definition at line 102 of file vga.h.

◆ CRTC_H_DISP

#define CRTC_H_DISP   1

Definition at line 103 of file vga.h.

◆ CRTC_H_BLANK_START

#define CRTC_H_BLANK_START   2

Definition at line 104 of file vga.h.

◆ CRTC_H_BLANK_END

#define CRTC_H_BLANK_END   3

Definition at line 105 of file vga.h.

◆ CRTC_H_SYNC_START

#define CRTC_H_SYNC_START   4

Definition at line 106 of file vga.h.

◆ CRTC_H_SYNC_END

#define CRTC_H_SYNC_END   5

Definition at line 107 of file vga.h.

◆ CRTC_V_TOTAL

#define CRTC_V_TOTAL   6

Definition at line 108 of file vga.h.

◆ CRTC_OVERFLOW

#define CRTC_OVERFLOW   7

Definition at line 109 of file vga.h.

◆ CRTC_PRESET_ROW

#define CRTC_PRESET_ROW   8

Definition at line 110 of file vga.h.

◆ CRTC_MAX_SCAN

#define CRTC_MAX_SCAN   9

Definition at line 111 of file vga.h.

◆ CRTC_CURSOR_START

#define CRTC_CURSOR_START   0x0A

Definition at line 112 of file vga.h.

◆ CRTC_CURSOR_END

#define CRTC_CURSOR_END   0x0B

Definition at line 113 of file vga.h.

◆ CRTC_START_HI

#define CRTC_START_HI   0x0C

Definition at line 114 of file vga.h.

◆ CRTC_START_LO

#define CRTC_START_LO   0x0D

Definition at line 115 of file vga.h.

◆ CRTC_CURSOR_HI

#define CRTC_CURSOR_HI   0x0E

Definition at line 116 of file vga.h.

◆ CRTC_CURSOR_LO

#define CRTC_CURSOR_LO   0x0F

Definition at line 117 of file vga.h.

◆ CRTC_V_SYNC_START

#define CRTC_V_SYNC_START   0x10

Definition at line 118 of file vga.h.

◆ CRTC_V_SYNC_END

#define CRTC_V_SYNC_END   0x11

Definition at line 119 of file vga.h.

◆ CRTC_V_DISP_END

#define CRTC_V_DISP_END   0x12

Definition at line 120 of file vga.h.

◆ CRTC_OFFSET

#define CRTC_OFFSET   0x13

Definition at line 121 of file vga.h.

◆ CRTC_UNDERLINE

#define CRTC_UNDERLINE   0x14

Definition at line 122 of file vga.h.

◆ CRTC_V_BLANK_START

#define CRTC_V_BLANK_START   0x15

Definition at line 123 of file vga.h.

◆ CRTC_V_BLANK_END

#define CRTC_V_BLANK_END   0x16

Definition at line 124 of file vga.h.

◆ CRTC_MODE

#define CRTC_MODE   0x17

Definition at line 125 of file vga.h.

◆ CRTC_LINE_COMPARE

#define CRTC_LINE_COMPARE   0x18

Definition at line 126 of file vga.h.

◆ ATC_MODE

#define ATC_MODE   0x10

Definition at line 128 of file vga.h.

◆ ATC_OVERSCAN

#define ATC_OVERSCAN   0x11

Definition at line 129 of file vga.h.

◆ ATC_PLANE_ENABLE

#define ATC_PLANE_ENABLE   0x12

Definition at line 130 of file vga.h.

◆ ATC_PEL

#define ATC_PEL   0x13

Definition at line 131 of file vga.h.

◆ ATC_COLOR_PAGE

#define ATC_COLOR_PAGE   0x14

Definition at line 132 of file vga.h.

◆ SEQ_CLOCK_MODE

#define SEQ_CLOCK_MODE   0x01

Definition at line 134 of file vga.h.

◆ SEQ_PLANE_WRITE

#define SEQ_PLANE_WRITE   0x02

Definition at line 135 of file vga.h.

◆ SEQ_CHARACTER_MAP

#define SEQ_CHARACTER_MAP   0x03

Definition at line 136 of file vga.h.

◆ SEQ_MEMORY_MODE

#define SEQ_MEMORY_MODE   0x04

Definition at line 137 of file vga.h.

◆ GDC_SR_VALUE

#define GDC_SR_VALUE   0x00

Definition at line 139 of file vga.h.

◆ GDC_SR_ENABLE

#define GDC_SR_ENABLE   0x01

Definition at line 140 of file vga.h.

◆ GDC_COMPARE_VALUE

#define GDC_COMPARE_VALUE   0x02

Definition at line 141 of file vga.h.

◆ GDC_DATA_ROTATE

#define GDC_DATA_ROTATE   0x03

Definition at line 142 of file vga.h.

◆ GDC_PLANE_READ

#define GDC_PLANE_READ   0x04

Definition at line 143 of file vga.h.

◆ GDC_MODE

#define GDC_MODE   0x05

Definition at line 144 of file vga.h.

◆ GDC_MISC

#define GDC_MISC   0x06

Definition at line 145 of file vga.h.

◆ GDC_COMPARE_MASK

#define GDC_COMPARE_MASK   0x07

Definition at line 146 of file vga.h.

◆ GDC_BIT_MASK

#define GDC_BIT_MASK   0x08

Definition at line 147 of file vga.h.

◆ VGA_ATTR_CLR_RED

#define VGA_ATTR_CLR_RED   0x4

Definition at line 150 of file vga.h.

◆ VGA_ATTR_CLR_GRN

#define VGA_ATTR_CLR_GRN   0x2

Definition at line 151 of file vga.h.

◆ VGA_ATTR_CLR_BLU

#define VGA_ATTR_CLR_BLU   0x1

Definition at line 152 of file vga.h.

◆ VGA_ATTR_CLR_YEL

#define VGA_ATTR_CLR_YEL   (VGA_ATTR_CLR_RED | VGA_ATTR_CLR_GRN)

Definition at line 153 of file vga.h.

◆ VGA_ATTR_CLR_CYN

#define VGA_ATTR_CLR_CYN   (VGA_ATTR_CLR_GRN | VGA_ATTR_CLR_BLU)

Definition at line 154 of file vga.h.

◆ VGA_ATTR_CLR_MAG

#define VGA_ATTR_CLR_MAG   (VGA_ATTR_CLR_BLU | VGA_ATTR_CLR_RED)

Definition at line 155 of file vga.h.

◆ VGA_ATTR_CLR_BLK

#define VGA_ATTR_CLR_BLK   0

Definition at line 156 of file vga.h.

◆ VGA_ATTR_CLR_WHT

#define VGA_ATTR_CLR_WHT   (VGA_ATTR_CLR_RED | VGA_ATTR_CLR_GRN | VGA_ATTR_CLR_BLU)

Definition at line 157 of file vga.h.

◆ VGA_ATTR_BNK

#define VGA_ATTR_BNK   0x80

Definition at line 158 of file vga.h.

◆ VGA_ATTR_ITN

#define VGA_ATTR_ITN   0x08

Definition at line 159 of file vga.h.

Function Documentation

◆ read_seq_b()

u8 read_seq_b ( u16  addr)

◆ read_gra_b()

u8 read_gra_b ( u16  addr)

◆ read_crtc_b()

u8 read_crtc_b ( u16  addr)

◆ read_att_b()

u8 read_att_b ( u16  addr)