iPXE
Data Structures | Defines | 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...

Defines

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


Define Documentation

#define VBE_CONTROLLER_INFO   0x4f00

INT 10,4f00: return controller information.

Definition at line 16 of file vesafb.h.

Referenced by vesafb_mode_list().

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

VBE controller information signature.

Definition at line 52 of file vesafb.h.

Referenced by vesafb_mode_list().

#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().

#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().

#define VBE_SET_MODE   0x4f02

INT 10,4f02: set VBE mode.

Definition at line 180 of file vesafb.h.

Referenced by vesafb_set_mode().

#define VBE_MODE_LINEAR   0x4000

VBE linear frame buffer mode bit.

Definition at line 183 of file vesafb.h.

Referenced by vesafb_select_mode().

#define VBE_GET_FONT   0x1130

INT 10,1130: get font information.

Definition at line 186 of file vesafb.h.

Referenced by vesafb_font().

#define VBE_SET_VGA_MODE   0x0000

INT 10,00: set VGA mode.

Definition at line 205 of file vesafb.h.

Referenced by vesafb_restore().

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

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.

                         {
        /** Mode supported in hardware */
        VBE_MODE_ATTR_SUPPORTED = 0x0001,
        /** TTY output functions supported by BIOS */
        VBE_MODE_ATTR_TTY = 0x0004,
        /** Colour mode */
        VBE_MODE_ATTR_COLOUR = 0x0008,
        /** Graphics mode */
        VBE_MODE_ATTR_GRAPHICS = 0x0010,
        /** Not a VGA compatible mode */
        VBE_MODE_ATTR_NOT_VGA = 0x0020,
        /** VGA compatible windowed memory mode is not available */
        VBE_MODE_ATTR_NOT_WINDOWED = 0x0040,
        /** Linear frame buffer mode is available */
        VBE_MODE_ATTR_LINEAR = 0x0080,
        /** Double scan mode is available */
        VBE_MODE_ATTR_DOUBLE = 0x0100,
        /** Interlaced mode is available */
        VBE_MODE_ATTR_INTERLACED = 0x0200,
        /** Hardware triple buffering support */
        VBE_MODE_ATTR_TRIPLE_BUF = 0x0400,
        /** Hardware stereoscopic display support */
        VBE_MODE_ATTR_STEREO = 0x0800,
        /** Dual display start address support */
        VBE_MODE_ATTR_DUAL = 0x1000,
};

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.

                           {
        /** Text mode */
        VBE_MODE_MODEL_TEXT = 0x00,
        /** CGA graphics mode */
        VBE_MODE_MODEL_CGA = 0x01,
        /** Hercules graphics mode */
        VBE_MODE_MODEL_HERCULES = 0x02,
        /** Planar mode */
        VBE_MODE_MODEL_PLANAR = 0x03,
        /** Packed pixel mode */
        VBE_MODE_MODEL_PACKED_PIXEL = 0x04,
        /** Non-chain 4, 256 colour mode */
        VBE_MODE_MODEL_NON_CHAIN_4 = 0x05,
        /** Direct colour mode */
        VBE_MODE_MODEL_DIRECT_COLOUR = 0x06,
        /** YUV mode */
        VBE_MODE_MODEL_YUV = 0x07,
};

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.

                  {
        /** 8x14 character font */
        VBE_FONT_8x14 = 0x0200,
        /** 8x8 double dot font */
        VBE_FONT_8x8_DOUBLE = 0x0300,
        /** 8x8 double dot font (high 128 characters) */
        VBE_FONT_8x8_DOUBLE_HIGH = 0x0400,
        /** 9x14 alpha alternate font */
        VBE_FONT_9x14_ALPHA_ALT = 0x0500,
        /** 8x16 font */
        VBE_FONT_8x16 = 0x0600,
        /** 9x16 alternate font */
        VBE_FONT_9x16_ALT = 0x0700,
};

Function Documentation

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

Variable Documentation

VBE signature.

Definition at line 51 of file vesafb.h.

VBE minor version.

Definition at line 53 of file vesafb.h.

VBE major version.

Definition at line 55 of file vesafb.h.

Pointer to OEM string.

Definition at line 57 of file vesafb.h.

Capabilities of graphics controller.

Definition at line 59 of file vesafb.h.

Pointer to video mode list.

Definition at line 61 of file vesafb.h.

Referenced by vesafb_mode_list().

Number of 64kB memory blocks.

Definition at line 63 of file vesafb.h.

VBE implementation software revision.

Definition at line 65 of file vesafb.h.

Pointer to vendor name string.

Definition at line 67 of file vesafb.h.

Pointer to product name string.

Definition at line 69 of file vesafb.h.

Pointer to product revision string.

Definition at line 71 of file vesafb.h.

Reserved for VBE implementation scratch area.

Definition at line 73 of file vesafb.h.

Mode attributes.

Definition at line 131 of file vesafb.h.

Window A attributes.

Definition at line 133 of file vesafb.h.

Window B attributes.

Definition at line 135 of file vesafb.h.

Window granularity.

Definition at line 137 of file vesafb.h.

Window size.

Definition at line 139 of file vesafb.h.

Window A start segment.

Definition at line 141 of file vesafb.h.

Window B start segment.

Definition at line 143 of file vesafb.h.

Pointer to window function.

Definition at line 145 of file vesafb.h.

Bytes per scan line.

Definition at line 147 of file vesafb.h.

Horizontal resolution in pixels or characters.

Definition at line 149 of file vesafb.h.

Vertical resolution in pixels or characters.

Definition at line 151 of file vesafb.h.

Character cell width in pixels.

Definition at line 153 of file vesafb.h.

Character cell height in pixels.

Definition at line 155 of file vesafb.h.

Number of memory planes.

Definition at line 157 of file vesafb.h.

Bits per pixel.

Definition at line 159 of file vesafb.h.

Number of banks.

Definition at line 161 of file vesafb.h.

Memory model type.

Definition at line 163 of file vesafb.h.

Bank size in kB.

Definition at line 165 of file vesafb.h.

Number of images.

Definition at line 167 of file vesafb.h.

Reserved for page function.

Definition at line 169 of file vesafb.h.

Size of direct colour red mask in bits.

Definition at line 171 of file vesafb.h.

Bit position of LSB of red mask.

Definition at line 173 of file vesafb.h.

Size of direct colour green mask in bits.

Definition at line 175 of file vesafb.h.

Bit position of LSB of green mask.

Definition at line 177 of file vesafb.h.

Size of direct colour blue mask in bits.

Definition at line 179 of file vesafb.h.

Bit position of LSB of blue mask.

Definition at line 181 of file vesafb.h.

Size of direct colour reserved mask in bits.

Definition at line 183 of file vesafb.h.

Bit position of LSB of reserved mask.

Definition at line 185 of file vesafb.h.

Direct colour mode attributes.

Definition at line 187 of file vesafb.h.

Physical address for flat memory frame buffer.

Definition at line 189 of file vesafb.h.

Pointer to start of off-screen memory.

Definition at line 191 of file vesafb.h.

Amount of off-screen memory in 1kB units.

Definition at line 193 of file vesafb.h.

Reserved.

Definition at line 195 of file vesafb.h.