iPXE
Data Structures | Macros | Enumerations | Functions | Variables
vesafb.h File Reference

VESA frame buffer console. More...

#include <stdint.h>
#include <realmode.h>

Go to the source code of this file.

Data Structures

struct  vbe_controller_info
 VBE controller information. More...
 
struct  vbe_mode_info
 VBE mode information. More...
 

Macros

#define VBE_CONTROLLER_INFO   0x4f00
 INT 10,4f00: return controller information. More...
 
#define VBE_CONTROLLER_SIGNATURE   ( ( 'V' << 0 ) | ( 'E' << 8 ) | ( 'S' << 16 ) | ( 'A' << 24 ) )
 VBE controller information signature. More...
 
#define VBE_MODE_END   0xffff
 VBE mode list end marker. More...
 
#define VBE_MODE_INFO   0x4f01
 INT 10,4f01: return VBE mode information. More...
 
#define VBE_SET_MODE   0x4f02
 INT 10,4f02: set VBE mode. More...
 
#define VBE_MODE_LINEAR   0x4000
 VBE linear frame buffer mode bit. More...
 
#define VBE_GET_FONT   0x1130
 INT 10,1130: get font information. More...
 
#define VBE_SET_VGA_MODE   0x0000
 INT 10,00: set VGA mode. More...
 
#define VBE_GET_VGA_MODE   0x0f00
 INT 10,0f: get VGA mode. More...
 

Enumerations

enum  vbe_mode_attributes {
  VBE_MODE_ATTR_SUPPORTED = 0x0001, VBE_MODE_ATTR_TTY = 0x0004, VBE_MODE_ATTR_COLOUR = 0x0008, VBE_MODE_ATTR_GRAPHICS = 0x0010,
  VBE_MODE_ATTR_NOT_VGA = 0x0020, VBE_MODE_ATTR_NOT_WINDOWED = 0x0040, VBE_MODE_ATTR_LINEAR = 0x0080, VBE_MODE_ATTR_DOUBLE = 0x0100,
  VBE_MODE_ATTR_INTERLACED = 0x0200, VBE_MODE_ATTR_TRIPLE_BUF = 0x0400, VBE_MODE_ATTR_STEREO = 0x0800, VBE_MODE_ATTR_DUAL = 0x1000
}
 VBE mode attributes. More...
 
enum  vbe_mode_memory_model {
  VBE_MODE_MODEL_TEXT = 0x00, VBE_MODE_MODEL_CGA = 0x01, VBE_MODE_MODEL_HERCULES = 0x02, VBE_MODE_MODEL_PLANAR = 0x03,
  VBE_MODE_MODEL_PACKED_PIXEL = 0x04, VBE_MODE_MODEL_NON_CHAIN_4 = 0x05, VBE_MODE_MODEL_DIRECT_COLOUR = 0x06, VBE_MODE_MODEL_YUV = 0x07
}
 VBE mode memory models. More...
 
enum  vbe_font_set {
  VBE_FONT_8x14 = 0x0200, VBE_FONT_8x8_DOUBLE = 0x0300, VBE_FONT_8x8_DOUBLE_HIGH = 0x0400, VBE_FONT_9x14_ALPHA_ALT = 0x0500,
  VBE_FONT_8x16 = 0x0600, VBE_FONT_9x16_ALT = 0x0700
}
 Font sets. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct vbe_controller_info __attribute__ ((packed))
 

Variables

uint32_t vbe_signature
 VBE signature. More...
 
uint8_t vbe_minor_version
 VBE minor version. More...
 
uint8_t vbe_major_version
 VBE major version. More...
 
struct segoff oem_string_ptr
 Pointer to OEM string. More...
 
uint32_t capabilities
 Capabilities of graphics controller. More...
 
struct segoff video_mode_ptr
 Pointer to video mode list. More...
 
uint16_t total_memory
 Number of 64kB memory blocks. More...
 
uint16_t oem_software_rev
 VBE implementation software revision. More...
 
struct segoff oem_vendor_name_ptr
 Pointer to vendor name string. More...
 
struct segoff oem_product_name_ptr
 Pointer to product name string. More...
 
struct segoff oem_product_rev_ptr
 Pointer to product revision string. More...
 
uint8_t reserved [222]
 Reserved for VBE implementation scratch area. More...
 
uint16_t mode_attributes
 Mode attributes. More...
 
uint8_t win_a_attributes
 Window A attributes. More...
 
uint8_t win_b_attributes
 Window B attributes. More...
 
uint16_t win_granularity
 Window granularity. More...
 
uint16_t win_size
 Window size. More...
 
uint16_t win_a_segment
 Window A start segment. More...
 
uint16_t win_b_segment
 Window B start segment. More...
 
struct segoff win_func_ptr
 Pointer to window function. More...
 
uint16_t bytes_per_scan_line
 Bytes per scan line. More...
 
uint16_t x_resolution
 Horizontal resolution in pixels or characters. More...
 
uint16_t y_resolution
 Vertical resolution in pixels or characters. More...
 
uint8_t x_char_size
 Character cell width in pixels. More...
 
uint8_t y_char_size
 Character cell height in pixels. More...
 
uint8_t number_of_planes
 Number of memory planes. More...
 
uint8_t bits_per_pixel
 Bits per pixel. More...
 
uint8_t number_of_banks
 Number of banks. More...
 
uint8_t memory_model
 Memory model type. More...
 
uint8_t bank_size
 Bank size in kB. More...
 
uint8_t number_of_image_pages
 Number of images. More...
 
uint8_t reserved_1
 Reserved for page function. More...
 
uint8_t red_mask_size
 Size of direct colour red mask in bits. More...
 
uint8_t red_field_position
 Bit position of LSB of red mask. More...
 
uint8_t green_mask_size
 Size of direct colour green mask in bits. More...
 
uint8_t green_field_position
 Bit position of LSB of green mask. More...
 
uint8_t blue_mask_size
 Size of direct colour blue mask in bits. More...
 
uint8_t blue_field_position
 Bit position of LSB of blue mask. More...
 
uint8_t rsvd_mask_size
 Size of direct colour reserved mask in bits. More...
 
uint8_t rsvd_field_position
 Bit position of LSB of reserved mask. More...
 
uint8_t direct_colour_mode_info
 Direct colour mode attributes. More...
 
uint32_t phys_base_ptr
 Physical address for flat memory frame buffer. More...
 
uint32_t off_screen_mem_offset
 Pointer to start of off-screen memory. More...
 
uint16_t off_screen_mem_size
 Amount of off-screen memory in 1kB units. More...
 
uint8_t reserved_2 [206]
 Reserved. More...
 
enum vbe_mode_attributes __attribute__
 

Detailed Description

VESA frame buffer console.

Definition in file vesafb.h.

Macro Definition Documentation

◆ VBE_CONTROLLER_INFO

#define VBE_CONTROLLER_INFO   0x4f00

INT 10,4f00: return controller information.

Definition at line 16 of file vesafb.h.

◆ VBE_CONTROLLER_SIGNATURE

#define VBE_CONTROLLER_SIGNATURE   ( ( 'V' << 0 ) | ( 'E' << 8 ) | ( 'S' << 16 ) | ( 'A' << 24 ) )

VBE controller information signature.

Definition at line 52 of file vesafb.h.

◆ VBE_MODE_END

#define VBE_MODE_END   0xffff

VBE mode list end marker.

Definition at line 56 of file vesafb.h.

◆ VBE_MODE_INFO

#define VBE_MODE_INFO   0x4f01

INT 10,4f01: return VBE mode information.

Definition at line 59 of file vesafb.h.

◆ VBE_SET_MODE

#define VBE_SET_MODE   0x4f02

INT 10,4f02: set VBE mode.

Definition at line 180 of file vesafb.h.

◆ VBE_MODE_LINEAR

#define VBE_MODE_LINEAR   0x4000

VBE linear frame buffer mode bit.

Definition at line 183 of file vesafb.h.

◆ VBE_GET_FONT

#define VBE_GET_FONT   0x1130

INT 10,1130: get font information.

Definition at line 186 of file vesafb.h.

◆ VBE_SET_VGA_MODE

#define VBE_SET_VGA_MODE   0x0000

INT 10,00: set VGA mode.

Definition at line 205 of file vesafb.h.

◆ VBE_GET_VGA_MODE

#define VBE_GET_VGA_MODE   0x0f00

INT 10,0f: get VGA mode.

Definition at line 208 of file vesafb.h.

Enumeration Type Documentation

◆ vbe_mode_attributes

VBE mode attributes.

Enumerator
VBE_MODE_ATTR_SUPPORTED 

Mode supported in hardware.

VBE_MODE_ATTR_TTY 

TTY output functions supported by BIOS.

VBE_MODE_ATTR_COLOUR 

Colour mode.

VBE_MODE_ATTR_GRAPHICS 

Graphics mode.

VBE_MODE_ATTR_NOT_VGA 

Not a VGA compatible mode.

VBE_MODE_ATTR_NOT_WINDOWED 

VGA compatible windowed memory mode is not available.

VBE_MODE_ATTR_LINEAR 

Linear frame buffer mode is available.

VBE_MODE_ATTR_DOUBLE 

Double scan mode is available.

VBE_MODE_ATTR_INTERLACED 

Interlaced mode is available.

VBE_MODE_ATTR_TRIPLE_BUF 

Hardware triple buffering support.

VBE_MODE_ATTR_STEREO 

Hardware stereoscopic display support.

VBE_MODE_ATTR_DUAL 

Dual display start address support.

Definition at line 132 of file vesafb.h.

132  {
133  /** Mode supported in hardware */
134  VBE_MODE_ATTR_SUPPORTED = 0x0001,
135  /** TTY output functions supported by BIOS */
136  VBE_MODE_ATTR_TTY = 0x0004,
137  /** Colour mode */
138  VBE_MODE_ATTR_COLOUR = 0x0008,
139  /** Graphics mode */
140  VBE_MODE_ATTR_GRAPHICS = 0x0010,
141  /** Not a VGA compatible mode */
142  VBE_MODE_ATTR_NOT_VGA = 0x0020,
143  /** VGA compatible windowed memory mode is not available */
145  /** Linear frame buffer mode is available */
146  VBE_MODE_ATTR_LINEAR = 0x0080,
147  /** Double scan mode is available */
148  VBE_MODE_ATTR_DOUBLE = 0x0100,
149  /** Interlaced mode is available */
150  VBE_MODE_ATTR_INTERLACED = 0x0200,
151  /** Hardware triple buffering support */
152  VBE_MODE_ATTR_TRIPLE_BUF = 0x0400,
153  /** Hardware stereoscopic display support */
154  VBE_MODE_ATTR_STEREO = 0x0800,
155  /** Dual display start address support */
156  VBE_MODE_ATTR_DUAL = 0x1000,
157 };
Dual display start address support.
Definition: vesafb.h:156
Linear frame buffer mode is available.
Definition: vesafb.h:146
Double scan mode is available.
Definition: vesafb.h:148
Hardware stereoscopic display support.
Definition: vesafb.h:154
Not a VGA compatible mode.
Definition: vesafb.h:142
Interlaced mode is available.
Definition: vesafb.h:150
TTY output functions supported by BIOS.
Definition: vesafb.h:136
Colour mode.
Definition: vesafb.h:138
VGA compatible windowed memory mode is not available.
Definition: vesafb.h:144
Hardware triple buffering support.
Definition: vesafb.h:152
Mode supported in hardware.
Definition: vesafb.h:134
Graphics mode.
Definition: vesafb.h:140

◆ vbe_mode_memory_model

VBE mode memory models.

Enumerator
VBE_MODE_MODEL_TEXT 

Text mode.

VBE_MODE_MODEL_CGA 

CGA graphics mode.

VBE_MODE_MODEL_HERCULES 

Hercules graphics mode.

VBE_MODE_MODEL_PLANAR 

Planar mode.

VBE_MODE_MODEL_PACKED_PIXEL 

Packed pixel mode.

VBE_MODE_MODEL_NON_CHAIN_4 

Non-chain 4, 256 colour mode.

VBE_MODE_MODEL_DIRECT_COLOUR 

Direct colour mode.

VBE_MODE_MODEL_YUV 

YUV mode.

Definition at line 160 of file vesafb.h.

160  {
161  /** Text mode */
162  VBE_MODE_MODEL_TEXT = 0x00,
163  /** CGA graphics mode */
164  VBE_MODE_MODEL_CGA = 0x01,
165  /** Hercules graphics mode */
167  /** Planar mode */
168  VBE_MODE_MODEL_PLANAR = 0x03,
169  /** Packed pixel mode */
171  /** Non-chain 4, 256 colour mode */
173  /** Direct colour mode */
175  /** YUV mode */
176  VBE_MODE_MODEL_YUV = 0x07,
177 };
Direct colour mode.
Definition: vesafb.h:174
Text mode.
Definition: vesafb.h:162
Hercules graphics mode.
Definition: vesafb.h:166
Non-chain 4, 256 colour mode.
Definition: vesafb.h:172
Packed pixel mode.
Definition: vesafb.h:170
Planar mode.
Definition: vesafb.h:168
CGA graphics mode.
Definition: vesafb.h:164
YUV mode.
Definition: vesafb.h:176

◆ vbe_font_set

Font sets.

Enumerator
VBE_FONT_8x14 

8x14 character font

VBE_FONT_8x8_DOUBLE 

8x8 double dot font

VBE_FONT_8x8_DOUBLE_HIGH 

8x8 double dot font (high 128 characters)

VBE_FONT_9x14_ALPHA_ALT 

9x14 alpha alternate font

VBE_FONT_8x16 

8x16 font

VBE_FONT_9x16_ALT 

9x16 alternate font

Definition at line 189 of file vesafb.h.

189  {
190  /** 8x14 character font */
191  VBE_FONT_8x14 = 0x0200,
192  /** 8x8 double dot font */
193  VBE_FONT_8x8_DOUBLE = 0x0300,
194  /** 8x8 double dot font (high 128 characters) */
195  VBE_FONT_8x8_DOUBLE_HIGH = 0x0400,
196  /** 9x14 alpha alternate font */
197  VBE_FONT_9x14_ALPHA_ALT = 0x0500,
198  /** 8x16 font */
199  VBE_FONT_8x16 = 0x0600,
200  /** 9x16 alternate font */
201  VBE_FONT_9x16_ALT = 0x0700,
202 };
8x8 double dot font
Definition: vesafb.h:193
8x16 font
Definition: vesafb.h:199
9x14 alpha alternate font
Definition: vesafb.h:197
8x14 character font
Definition: vesafb.h:191
8x8 double dot font (high 128 characters)
Definition: vesafb.h:195
9x16 alternate font
Definition: vesafb.h:201

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

struct vbe_controller_info __attribute__ ( (packed)  )

Variable Documentation

◆ vbe_signature

uint32_t vbe_signature

VBE signature.

Definition at line 12 of file vesafb.h.

◆ vbe_minor_version

uint8_t vbe_minor_version

VBE minor version.

Definition at line 14 of file vesafb.h.

◆ vbe_major_version

uint8_t vbe_major_version

VBE major version.

Definition at line 16 of file vesafb.h.

◆ oem_string_ptr

struct segoff oem_string_ptr

Pointer to OEM string.

Definition at line 18 of file vesafb.h.

◆ capabilities

uint32_t capabilities

Capabilities of graphics controller.

Definition at line 20 of file vesafb.h.

◆ video_mode_ptr

struct segoff video_mode_ptr

Pointer to video mode list.

Definition at line 22 of file vesafb.h.

Referenced by vesafb_mode_list().

◆ total_memory

uint16_t total_memory

Number of 64kB memory blocks.

Definition at line 24 of file vesafb.h.

◆ oem_software_rev

uint16_t oem_software_rev

VBE implementation software revision.

Definition at line 26 of file vesafb.h.

◆ oem_vendor_name_ptr

struct segoff oem_vendor_name_ptr

Pointer to vendor name string.

Definition at line 28 of file vesafb.h.

◆ oem_product_name_ptr

struct segoff oem_product_name_ptr

Pointer to product name string.

Definition at line 30 of file vesafb.h.

◆ oem_product_rev_ptr

struct segoff oem_product_rev_ptr

Pointer to product revision string.

Definition at line 32 of file vesafb.h.

◆ reserved

uint8_t reserved[222]

Reserved for VBE implementation scratch area.

Definition at line 34 of file vesafb.h.

◆ mode_attributes

uint16_t mode_attributes

Mode attributes.

Definition at line 12 of file vesafb.h.

◆ win_a_attributes

uint8_t win_a_attributes

Window A attributes.

Definition at line 14 of file vesafb.h.

◆ win_b_attributes

uint8_t win_b_attributes

Window B attributes.

Definition at line 16 of file vesafb.h.

◆ win_granularity

uint16_t win_granularity

Window granularity.

Definition at line 18 of file vesafb.h.

◆ win_size

uint16_t win_size

Window size.

Definition at line 20 of file vesafb.h.

◆ win_a_segment

uint16_t win_a_segment

Window A start segment.

Definition at line 22 of file vesafb.h.

◆ win_b_segment

uint16_t win_b_segment

Window B start segment.

Definition at line 24 of file vesafb.h.

◆ win_func_ptr

struct segoff win_func_ptr

Pointer to window function.

Definition at line 26 of file vesafb.h.

◆ bytes_per_scan_line

uint16_t bytes_per_scan_line

Bytes per scan line.

Definition at line 28 of file vesafb.h.

◆ x_resolution

uint16_t x_resolution

Horizontal resolution in pixels or characters.

Definition at line 30 of file vesafb.h.

◆ y_resolution

uint16_t y_resolution

Vertical resolution in pixels or characters.

Definition at line 32 of file vesafb.h.

◆ x_char_size

uint8_t x_char_size

Character cell width in pixels.

Definition at line 34 of file vesafb.h.

◆ y_char_size

uint8_t y_char_size

Character cell height in pixels.

Definition at line 36 of file vesafb.h.

◆ number_of_planes

uint8_t number_of_planes

Number of memory planes.

Definition at line 38 of file vesafb.h.

◆ bits_per_pixel

uint8_t bits_per_pixel

Bits per pixel.

Definition at line 40 of file vesafb.h.

◆ number_of_banks

uint8_t number_of_banks

Number of banks.

Definition at line 42 of file vesafb.h.

◆ memory_model

uint8_t memory_model

Memory model type.

Definition at line 44 of file vesafb.h.

◆ bank_size

uint8_t bank_size

Bank size in kB.

Definition at line 46 of file vesafb.h.

◆ number_of_image_pages

uint8_t number_of_image_pages

Number of images.

Definition at line 48 of file vesafb.h.

◆ reserved_1

uint8_t reserved_1

Reserved for page function.

Definition at line 50 of file vesafb.h.

◆ red_mask_size

uint8_t red_mask_size

Size of direct colour red mask in bits.

Definition at line 52 of file vesafb.h.

◆ red_field_position

uint8_t red_field_position

Bit position of LSB of red mask.

Definition at line 54 of file vesafb.h.

◆ green_mask_size

uint8_t green_mask_size

Size of direct colour green mask in bits.

Definition at line 56 of file vesafb.h.

◆ green_field_position

uint8_t green_field_position

Bit position of LSB of green mask.

Definition at line 58 of file vesafb.h.

◆ blue_mask_size

uint8_t blue_mask_size

Size of direct colour blue mask in bits.

Definition at line 60 of file vesafb.h.

◆ blue_field_position

uint8_t blue_field_position

Bit position of LSB of blue mask.

Definition at line 62 of file vesafb.h.

◆ rsvd_mask_size

uint8_t rsvd_mask_size

Size of direct colour reserved mask in bits.

Definition at line 64 of file vesafb.h.

◆ rsvd_field_position

uint8_t rsvd_field_position

Bit position of LSB of reserved mask.

Definition at line 66 of file vesafb.h.

◆ direct_colour_mode_info

uint8_t direct_colour_mode_info

Direct colour mode attributes.

Definition at line 68 of file vesafb.h.

◆ phys_base_ptr

uint32_t phys_base_ptr

Physical address for flat memory frame buffer.

Definition at line 70 of file vesafb.h.

◆ off_screen_mem_offset

uint32_t off_screen_mem_offset

Pointer to start of off-screen memory.

Definition at line 72 of file vesafb.h.

◆ off_screen_mem_size

uint16_t off_screen_mem_size

Amount of off-screen memory in 1kB units.

Definition at line 74 of file vesafb.h.

◆ reserved_2

uint8_t reserved_2[206]

Reserved.

Definition at line 76 of file vesafb.h.

◆ __attribute__