iPXE
vesafb.h
Go to the documentation of this file.
1#ifndef _IPXE_VESAFB_H
2#define _IPXE_VESAFB_H
4/** @file
5 *
6 * VESA frame buffer console
7 *
8 */
10FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12#include <stdint.h>
13#include <realmode.h>
14
15/** INT 10,4f00: return controller information */
16#define VBE_CONTROLLER_INFO 0x4f00
18/** VBE controller information */
20 /** VBE signature */
22 /** VBE minor version */
24 /** VBE major version */
26 /** Pointer to OEM string */
28 /** Capabilities of graphics controller */
30 /** Pointer to video mode list */
32 /** Number of 64kB memory blocks */
34 /** VBE implementation software revision */
36 /** Pointer to vendor name string */
38 /** Pointer to product name string */
40 /** Pointer to product revision string */
42 /** Reserved for VBE implementation scratch area */
44 /* VBE2.0 defines an additional 256-byte data area for
45 * including the OEM strings inline within the VBE information
46 * block; we omit this to reduce the amount of base memory
47 * required for VBE calls.
48 */
49} __attribute__ (( packed ));
50
51/** VBE controller information signature */
52#define VBE_CONTROLLER_SIGNATURE \
53 ( ( 'V' << 0 ) | ( 'E' << 8 ) | ( 'S' << 16 ) | ( 'A' << 24 ) )
54
55/** VBE mode list end marker */
56#define VBE_MODE_END 0xffff
58/** INT 10,4f01: return VBE mode information */
59#define VBE_MODE_INFO 0x4f01
60
61/** VBE mode information */
63 /** Mode attributes */
65 /** Window A attributes */
67 /** Window B attributes */
69 /** Window granularity */
71 /** Window size */
73 /** Window A start segment */
75 /** Window B start segment */
77 /** Pointer to window function */
79 /** Bytes per scan line */
81 /** Horizontal resolution in pixels or characters */
83 /** Vertical resolution in pixels or characters */
85 /** Character cell width in pixels */
87 /** Character cell height in pixels */
89 /** Number of memory planes */
91 /** Bits per pixel */
93 /** Number of banks */
95 /** Memory model type */
97 /** Bank size in kB */
99 /** Number of images */
101 /** Reserved for page function */
103 /** Size of direct colour red mask in bits */
105 /** Bit position of LSB of red mask */
107 /** Size of direct colour green mask in bits */
109 /** Bit position of LSB of green mask */
111 /** Size of direct colour blue mask in bits */
113 /** Bit position of LSB of blue mask */
115 /** Size of direct colour reserved mask in bits */
117 /** Bit position of LSB of reserved mask */
119 /** Direct colour mode attributes */
121 /** Physical address for flat memory frame buffer */
123 /** Pointer to start of off-screen memory */
125 /** Amount of off-screen memory in 1kB units */
127 /** Reserved */
129} __attribute__ (( packed ));
130
131/** VBE mode attributes */
133 /** Mode supported in hardware */
135 /** TTY output functions supported by BIOS */
137 /** Colour mode */
139 /** Graphics mode */
141 /** Not a VGA compatible mode */
143 /** VGA compatible windowed memory mode is not available */
145 /** Linear frame buffer mode is available */
147 /** Double scan mode is available */
149 /** Interlaced mode is available */
151 /** Hardware triple buffering support */
153 /** Hardware stereoscopic display support */
155 /** Dual display start address support */
158
159/** VBE mode memory models */
161 /** Text mode */
163 /** CGA graphics mode */
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 */
177};
178
179/** INT 10,4f02: set VBE mode */
180#define VBE_SET_MODE 0x4f02
181
182/** VBE linear frame buffer mode bit */
183#define VBE_MODE_LINEAR 0x4000
184
185/** INT 10,1130: get font information */
186#define VBE_GET_FONT 0x1130
187
188/** Font sets */
190 /** 8x14 character font */
192 /** 8x8 double dot font */
194 /** 8x8 double dot font (high 128 characters) */
196 /** 9x14 alpha alternate font */
198 /** 8x16 font */
200 /** 9x16 alternate font */
202};
203
204/** INT 10,00: set VGA mode */
205#define VBE_SET_VGA_MODE 0x0000
206
207/** INT 10,0f: get VGA mode */
208#define VBE_GET_VGA_MODE 0x0f00
209
210#endif /* _IPXE_VESAFB_H */
unsigned short uint16_t
Definition stdint.h:11
unsigned int uint32_t
Definition stdint.h:12
unsigned char uint8_t
Definition stdint.h:10
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
enum vbe_mode_attributes __attribute__
VBE controller information.
Definition vesafb.h:19
struct segoff oem_product_name_ptr
Pointer to product name string.
Definition vesafb.h:39
struct segoff oem_string_ptr
Pointer to OEM string.
Definition vesafb.h:27
uint16_t total_memory
Number of 64kB memory blocks.
Definition vesafb.h:33
uint16_t oem_software_rev
VBE implementation software revision.
Definition vesafb.h:35
uint32_t capabilities
Capabilities of graphics controller.
Definition vesafb.h:29
struct segoff oem_product_rev_ptr
Pointer to product revision string.
Definition vesafb.h:41
uint8_t reserved[222]
Reserved for VBE implementation scratch area.
Definition vesafb.h:43
uint32_t vbe_signature
VBE signature.
Definition vesafb.h:21
struct segoff video_mode_ptr
Pointer to video mode list.
Definition vesafb.h:31
struct segoff oem_vendor_name_ptr
Pointer to vendor name string.
Definition vesafb.h:37
uint8_t vbe_major_version
VBE major version.
Definition vesafb.h:25
uint8_t vbe_minor_version
VBE minor version.
Definition vesafb.h:23
VBE mode information.
Definition vesafb.h:62
uint8_t rsvd_mask_size
Size of direct colour reserved mask in bits.
Definition vesafb.h:116
uint8_t reserved_1
Reserved for page function.
Definition vesafb.h:102
uint8_t bits_per_pixel
Bits per pixel.
Definition vesafb.h:92
uint8_t number_of_planes
Number of memory planes.
Definition vesafb.h:90
uint8_t number_of_banks
Number of banks.
Definition vesafb.h:94
uint8_t green_mask_size
Size of direct colour green mask in bits.
Definition vesafb.h:108
uint8_t red_field_position
Bit position of LSB of red mask.
Definition vesafb.h:106
uint32_t phys_base_ptr
Physical address for flat memory frame buffer.
Definition vesafb.h:122
uint8_t direct_colour_mode_info
Direct colour mode attributes.
Definition vesafb.h:120
uint8_t win_b_attributes
Window B attributes.
Definition vesafb.h:68
uint8_t win_a_attributes
Window A attributes.
Definition vesafb.h:66
uint16_t bytes_per_scan_line
Bytes per scan line.
Definition vesafb.h:80
uint16_t x_resolution
Horizontal resolution in pixels or characters.
Definition vesafb.h:82
uint16_t win_granularity
Window granularity.
Definition vesafb.h:70
uint8_t red_mask_size
Size of direct colour red mask in bits.
Definition vesafb.h:104
uint32_t off_screen_mem_offset
Pointer to start of off-screen memory.
Definition vesafb.h:124
uint8_t blue_field_position
Bit position of LSB of blue mask.
Definition vesafb.h:114
uint8_t number_of_image_pages
Number of images.
Definition vesafb.h:100
uint16_t win_b_segment
Window B start segment.
Definition vesafb.h:76
uint16_t y_resolution
Vertical resolution in pixels or characters.
Definition vesafb.h:84
uint16_t win_size
Window size.
Definition vesafb.h:72
uint16_t mode_attributes
Mode attributes.
Definition vesafb.h:64
uint8_t rsvd_field_position
Bit position of LSB of reserved mask.
Definition vesafb.h:118
uint8_t y_char_size
Character cell height in pixels.
Definition vesafb.h:88
uint8_t memory_model
Memory model type.
Definition vesafb.h:96
uint8_t bank_size
Bank size in kB.
Definition vesafb.h:98
uint16_t off_screen_mem_size
Amount of off-screen memory in 1kB units.
Definition vesafb.h:126
uint8_t green_field_position
Bit position of LSB of green mask.
Definition vesafb.h:110
uint8_t blue_mask_size
Size of direct colour blue mask in bits.
Definition vesafb.h:112
uint16_t win_a_segment
Window A start segment.
Definition vesafb.h:74
struct segoff win_func_ptr
Pointer to window function.
Definition vesafb.h:78
uint8_t reserved_2[206]
Reserved.
Definition vesafb.h:128
uint8_t x_char_size
Character cell width in pixels.
Definition vesafb.h:86
vbe_mode_attributes
VBE mode attributes.
Definition vesafb.h:132
@ 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_font_set
Font sets.
Definition vesafb.h:189
@ 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
vbe_mode_memory_model
VBE mode memory models.
Definition vesafb.h:160
@ 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