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

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

Referenced by vesafb_mode_list().

◆ 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.

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

Referenced by vesafb_mode_list().

◆ VBE_MODE_END

#define VBE_MODE_END   0xffff

VBE mode list end marker.

Definition at line 56 of file vesafb.h.

Referenced by vesafb_mode_list(), and vesafb_select_mode().

◆ VBE_MODE_INFO

#define VBE_MODE_INFO   0x4f01

INT 10,4f01: return VBE mode information.

Definition at line 59 of file vesafb.h.

Referenced by vesafb_mode_info().

◆ VBE_SET_MODE

#define VBE_SET_MODE   0x4f02

INT 10,4f02: set VBE mode.

Definition at line 180 of file vesafb.h.

Referenced by vesafb_set_mode().

◆ VBE_MODE_LINEAR

#define VBE_MODE_LINEAR   0x4000

VBE linear frame buffer mode bit.

Definition at line 183 of file vesafb.h.

Referenced by vesafb_select_mode().

◆ VBE_GET_FONT

#define VBE_GET_FONT   0x1130

INT 10,1130: get font information.

Definition at line 186 of file vesafb.h.

Referenced by vesafb_font().

◆ VBE_SET_VGA_MODE

#define VBE_SET_VGA_MODE   0x0000

INT 10,00: set VGA mode.

Definition at line 205 of file vesafb.h.

Referenced by vesafb_restore().

◆ VBE_GET_VGA_MODE

#define VBE_GET_VGA_MODE   0x0f00

INT 10,0f: get VGA mode.

Definition at line 208 of file vesafb.h.

Referenced by vesafb_init().

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 */
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 */
151 /** Hardware triple buffering support */
153 /** Hardware stereoscopic display support */
154 VBE_MODE_ATTR_STEREO = 0x0800,
155 /** Dual display start address support */
156 VBE_MODE_ATTR_DUAL = 0x1000,
157};
@ VBE_MODE_ATTR_COLOUR
Colour mode.
Definition vesafb.h:138
@ VBE_MODE_ATTR_TTY
TTY output functions supported by BIOS.
Definition vesafb.h:136
@ VBE_MODE_ATTR_STEREO
Hardware stereoscopic display support.
Definition vesafb.h:154
@ VBE_MODE_ATTR_GRAPHICS
Graphics mode.
Definition vesafb.h:140
@ VBE_MODE_ATTR_NOT_WINDOWED
VGA compatible windowed memory mode is not available.
Definition vesafb.h:144
@ VBE_MODE_ATTR_DUAL
Dual display start address support.
Definition vesafb.h:156
@ VBE_MODE_ATTR_LINEAR
Linear frame buffer mode is available.
Definition vesafb.h:146
@ VBE_MODE_ATTR_NOT_VGA
Not a VGA compatible mode.
Definition vesafb.h:142
@ VBE_MODE_ATTR_DOUBLE
Double scan mode is available.
Definition vesafb.h:148
@ VBE_MODE_ATTR_INTERLACED
Interlaced mode is available.
Definition vesafb.h:150
@ VBE_MODE_ATTR_TRIPLE_BUF
Hardware triple buffering support.
Definition vesafb.h:152
@ VBE_MODE_ATTR_SUPPORTED
Mode supported in hardware.
Definition vesafb.h:134

◆ 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 */
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};
@ VBE_MODE_MODEL_CGA
CGA graphics mode.
Definition vesafb.h:164
@ VBE_MODE_MODEL_DIRECT_COLOUR
Direct colour mode.
Definition vesafb.h:174
@ VBE_MODE_MODEL_NON_CHAIN_4
Non-chain 4, 256 colour mode.
Definition vesafb.h:172
@ VBE_MODE_MODEL_YUV
YUV mode.
Definition vesafb.h:176
@ VBE_MODE_MODEL_PLANAR
Planar mode.
Definition vesafb.h:168
@ VBE_MODE_MODEL_HERCULES
Hercules graphics mode.
Definition vesafb.h:166
@ VBE_MODE_MODEL_TEXT
Text mode.
Definition vesafb.h:162
@ VBE_MODE_MODEL_PACKED_PIXEL
Packed pixel mode.
Definition vesafb.h:170

◆ 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) */
196 /** 9x14 alpha alternate font */
198 /** 8x16 font */
199 VBE_FONT_8x16 = 0x0600,
200 /** 9x16 alternate font */
201 VBE_FONT_9x16_ALT = 0x0700,
202};
@ VBE_FONT_8x14
8x14 character font
Definition vesafb.h:191
@ VBE_FONT_9x16_ALT
9x16 alternate font
Definition vesafb.h:201
@ VBE_FONT_8x16
8x16 font
Definition vesafb.h:199
@ VBE_FONT_8x8_DOUBLE_HIGH
8x8 double dot font (high 128 characters)
Definition vesafb.h:195
@ VBE_FONT_8x8_DOUBLE
8x8 double dot font
Definition vesafb.h:193
@ VBE_FONT_9x14_ALPHA_ALT
9x14 alpha alternate font
Definition vesafb.h:197

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

Variable Documentation

◆ vbe_signature

uint32_t vbe_signature

VBE signature.

Definition at line 1 of file vesafb.h.

◆ vbe_minor_version

uint8_t vbe_minor_version

VBE minor version.

Definition at line 3 of file vesafb.h.

◆ vbe_major_version

uint8_t vbe_major_version

VBE major version.

Definition at line 5 of file vesafb.h.

◆ oem_string_ptr

struct segoff oem_string_ptr

Pointer to OEM string.

Definition at line 7 of file vesafb.h.

◆ capabilities

uint32_t capabilities

Capabilities of graphics controller.

Definition at line 9 of file vesafb.h.

◆ video_mode_ptr

struct segoff video_mode_ptr

Pointer to video mode list.

Definition at line 11 of file vesafb.h.

Referenced by vesafb_mode_list().

◆ total_memory

uint16_t total_memory

Number of 64kB memory blocks.

Definition at line 13 of file vesafb.h.

◆ oem_software_rev

uint16_t oem_software_rev

VBE implementation software revision.

Definition at line 15 of file vesafb.h.

◆ oem_vendor_name_ptr

struct segoff oem_vendor_name_ptr

Pointer to vendor name string.

Definition at line 17 of file vesafb.h.

◆ oem_product_name_ptr

struct segoff oem_product_name_ptr

Pointer to product name string.

Definition at line 19 of file vesafb.h.

◆ oem_product_rev_ptr

struct segoff oem_product_rev_ptr

Pointer to product revision string.

Definition at line 21 of file vesafb.h.

◆ reserved

uint8_t reserved[222]

Reserved for VBE implementation scratch area.

Definition at line 23 of file vesafb.h.

◆ mode_attributes

uint16_t mode_attributes

Mode attributes.

Definition at line 1 of file vesafb.h.

◆ win_a_attributes

uint8_t win_a_attributes

Window A attributes.

Definition at line 3 of file vesafb.h.

◆ win_b_attributes

uint8_t win_b_attributes

Window B attributes.

Definition at line 5 of file vesafb.h.

◆ win_granularity

uint16_t win_granularity

Window granularity.

Definition at line 7 of file vesafb.h.

◆ win_size

uint16_t win_size

Window size.

Definition at line 9 of file vesafb.h.

◆ win_a_segment

uint16_t win_a_segment

Window A start segment.

Definition at line 11 of file vesafb.h.

◆ win_b_segment

uint16_t win_b_segment

Window B start segment.

Definition at line 13 of file vesafb.h.

◆ win_func_ptr

struct segoff win_func_ptr

Pointer to window function.

Definition at line 15 of file vesafb.h.

◆ bytes_per_scan_line

uint16_t bytes_per_scan_line

Bytes per scan line.

Definition at line 17 of file vesafb.h.

◆ x_resolution

uint16_t x_resolution

Horizontal resolution in pixels or characters.

Definition at line 19 of file vesafb.h.

◆ y_resolution

uint16_t y_resolution

Vertical resolution in pixels or characters.

Definition at line 21 of file vesafb.h.

◆ x_char_size

uint8_t x_char_size

Character cell width in pixels.

Definition at line 23 of file vesafb.h.

◆ y_char_size

uint8_t y_char_size

Character cell height in pixels.

Definition at line 25 of file vesafb.h.

◆ number_of_planes

uint8_t number_of_planes

Number of memory planes.

Definition at line 27 of file vesafb.h.

◆ bits_per_pixel

uint8_t bits_per_pixel

Bits per pixel.

Definition at line 29 of file vesafb.h.

◆ number_of_banks

uint8_t number_of_banks

Number of banks.

Definition at line 31 of file vesafb.h.

◆ memory_model

uint8_t memory_model

Memory model type.

Definition at line 33 of file vesafb.h.

◆ bank_size

uint8_t bank_size

Bank size in kB.

Definition at line 35 of file vesafb.h.

◆ number_of_image_pages

uint8_t number_of_image_pages

Number of images.

Definition at line 37 of file vesafb.h.

◆ reserved_1

uint8_t reserved_1

Reserved for page function.

Definition at line 39 of file vesafb.h.

◆ red_mask_size

uint8_t red_mask_size

Size of direct colour red mask in bits.

Definition at line 41 of file vesafb.h.

◆ red_field_position

uint8_t red_field_position

Bit position of LSB of red mask.

Definition at line 43 of file vesafb.h.

◆ green_mask_size

uint8_t green_mask_size

Size of direct colour green mask in bits.

Definition at line 45 of file vesafb.h.

◆ green_field_position

uint8_t green_field_position

Bit position of LSB of green mask.

Definition at line 47 of file vesafb.h.

◆ blue_mask_size

uint8_t blue_mask_size

Size of direct colour blue mask in bits.

Definition at line 49 of file vesafb.h.

◆ blue_field_position

uint8_t blue_field_position

Bit position of LSB of blue mask.

Definition at line 51 of file vesafb.h.

◆ rsvd_mask_size

uint8_t rsvd_mask_size

Size of direct colour reserved mask in bits.

Definition at line 53 of file vesafb.h.

◆ rsvd_field_position

uint8_t rsvd_field_position

Bit position of LSB of reserved mask.

Definition at line 55 of file vesafb.h.

◆ direct_colour_mode_info

uint8_t direct_colour_mode_info

Direct colour mode attributes.

Definition at line 57 of file vesafb.h.

◆ phys_base_ptr

uint32_t phys_base_ptr

Physical address for flat memory frame buffer.

Definition at line 59 of file vesafb.h.

◆ off_screen_mem_offset

uint32_t off_screen_mem_offset

Pointer to start of off-screen memory.

Definition at line 61 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 63 of file vesafb.h.

◆ reserved_2

uint8_t reserved_2[206]

Reserved.

Definition at line 65 of file vesafb.h.