1 | /** |
---|
2 | * @file vbe3.h |
---|
3 | * |
---|
4 | * @ingroup i386_pc386 |
---|
5 | * |
---|
6 | * @brief VESA Bios Extension definitions. |
---|
7 | * |
---|
8 | * This file contains definitions for constants related to VBE. |
---|
9 | * More information can be found at |
---|
10 | * <http://www.vesa.org/vesa-standards/free-standards/>. |
---|
11 | * VESA public standards may be found at |
---|
12 | * <http://www.vesa.org/wp-content/uploads/2010/12/thankspublic.htm>. |
---|
13 | */ |
---|
14 | |
---|
15 | /* |
---|
16 | * Copyright (C) 2014 Jan DoleÅŸal (dolezj21@fel.cvut.cz) |
---|
17 | * CTU in Prague. |
---|
18 | * |
---|
19 | * The license and distribution terms for this file may be |
---|
20 | * found in the file LICENSE in this distribution or at |
---|
21 | * http://www.rtems.org/license/LICENSE. |
---|
22 | */ |
---|
23 | |
---|
24 | #ifndef _VBE_H |
---|
25 | #define _VBE_H |
---|
26 | |
---|
27 | #ifndef ASM /* ASM */ |
---|
28 | |
---|
29 | #include <stdint.h> |
---|
30 | |
---|
31 | #ifdef __cplusplus |
---|
32 | extern "C" { |
---|
33 | #endif /* __cplusplus */ |
---|
34 | |
---|
35 | #include <rtems/score/basedefs.h> |
---|
36 | |
---|
37 | /* VESA BIOS EXTENSION (VBE) Core functions Standard |
---|
38 | Version: 3.0 Date: September 16, 1998 */ |
---|
39 | |
---|
40 | /** AL == 4Fh: Function is supported \n |
---|
41 | * AL != 4Fh: Function is not supported */ |
---|
42 | #define VBE_functionSupported 0x4F |
---|
43 | /** AH == 00h: Function call successful */ |
---|
44 | #define VBE_callSuccessful 0x00 |
---|
45 | /** AH == 01h: Function call failed */ |
---|
46 | #define VBE_callFailed 0x01 |
---|
47 | /** AH == 02h: Function is not supported in the current hardware configuration*/ |
---|
48 | #define VBE_notSupportedInCurHWConf 0x02 |
---|
49 | /** AH == 03h: Function call invalid in current video mode */ |
---|
50 | #define VBE_callInvalid 0x03 |
---|
51 | |
---|
52 | /* VBE Mode Numbers */ |
---|
53 | /** D0-D8 = Mode number */ |
---|
54 | #define VBE_modeNumberMask 0x01FF |
---|
55 | #define VBE_modeNumberShift 0x00 |
---|
56 | /** If D8 == 0, this is not a VESA defined VBE mode \n |
---|
57 | If D8 == 1, this is a VESA defined VBE mode */ |
---|
58 | #define VBE_VESAmodeMask 0x0100 |
---|
59 | #define VBE_VESAmodeShift 0x08 |
---|
60 | /* D9-D10 = Reserved by VESA for future expansion (= 0) */ |
---|
61 | /** If D11 == 0, Use current BIOS default refresh rate \n |
---|
62 | If D11 == 1, Use user specified CRTC values for refresh rate */ |
---|
63 | #define VBE_refreshRateCtrlMask 0x0800 |
---|
64 | #define VBE_refreshRateCtrlShift 0x0B |
---|
65 | /* D12-13 = Reserved for VBE/AF (must be 0) */ |
---|
66 | /** If D14 == 0, Use Banked/Windowed Frame Buffer \n |
---|
67 | If D14 == 1, Use Linear/Flat Frame Buffer */ |
---|
68 | #define VBE_linearFlatFrameBufMask 0x4000 |
---|
69 | #define VBE_linearFlatFrameBufShift 0x0E |
---|
70 | /** If D15 == 0, Clear display memory \n |
---|
71 | If D15 == 1, Preserve display memory */ |
---|
72 | #define VBE_preserveDispMemMask 0x8000 |
---|
73 | #define VBE_preserveDispMemShift 0x0F |
---|
74 | |
---|
75 | /* Graphics modes */ |
---|
76 | /** 15-bit mode, Resolution: 640x400, Colors: 256 */ |
---|
77 | #define VBE_R640x400C256 0x100 |
---|
78 | /** 15-bit mode, Resolution: 640x480, Colors: 256 */ |
---|
79 | #define VBE_R640x480C256 0x101 |
---|
80 | /** 15-bit mode, Resolution: 800x600, Colors: 16 */ |
---|
81 | #define VBE_R800x600C16 0x102 |
---|
82 | /** 7-bit mode, Resolution: 800x600, Colors: 16 */ |
---|
83 | #define VBE_b7R800x600C16 0x6A |
---|
84 | /** 15-bit mode, Resolution: 800x600, Colors: 256 */ |
---|
85 | #define VBE_R800x600C256 0x103 |
---|
86 | /** 15-bit mode, Resolution: 1024x768, Colors: 16 */ |
---|
87 | #define VBE_R1024x768C16 0x104 |
---|
88 | /** 15-bit mode, Resolution: 1024x768, Colors: 256 */ |
---|
89 | #define VBE_R1024x768C256 0x105 |
---|
90 | /** 15-bit mode, Resolution: 1280x1024, Colors: 16 */ |
---|
91 | #define VBE_R1280x1024C16 0x106 |
---|
92 | /** 15-bit mode, Resolution: 1280x1024, Colors: 256 */ |
---|
93 | #define VBE_R1280x1024C256 0x107 |
---|
94 | /** 15-bit mode, Resolution: 320x200, Colors: 32K (1:5:5:5) */ |
---|
95 | #define VBE_R320x200C32K 0x10D |
---|
96 | /** 15-bit mode, Resolution: 320x200, Colors: 64K (5:6:5) */ |
---|
97 | #define VBE_R320x200C64K 0x10E |
---|
98 | /** 15-bit mode, Resolution: 320x200, Colors: 16.8M (8:8:8) */ |
---|
99 | #define VBE_R320x200C17M 0x10F |
---|
100 | /** 15-bit mode, Resolution: 640x480, Colors: 32K (1:5:5:5) */ |
---|
101 | #define VBE_R640x480C32K 0x110 |
---|
102 | /** 15-bit mode, Resolution: 640x480, Colors: 64K (5:6:5) */ |
---|
103 | #define VBE_R640x480C64K 0x111 |
---|
104 | /** 15-bit mode, Resolution: 640x480, Colors: 16.8M (8:8:8) */ |
---|
105 | #define VBE_R640x480C17M 0x112 |
---|
106 | /** 15-bit mode, Resolution: 800x600, Colors: 32K (1:5:5:5) */ |
---|
107 | #define VBE_R800x600C32K 0x113 |
---|
108 | /** 15-bit mode, Resolution: 800x600, Colors: 64K (5:6:5) */ |
---|
109 | #define VBE_R800x600C64K 0x114 |
---|
110 | /** 15-bit mode, Resolution: 800x600, Colors: 16.8M (8:8:8) */ |
---|
111 | #define VBE_R800x600C17M 0x115 |
---|
112 | /** 15-bit mode, Resolution: 1024x768, Colors: 32K (1:5:5:5) */ |
---|
113 | #define VBE_R1024x768C32K 0x116 |
---|
114 | /** 15-bit mode, Resolution: 1024x768, Colors: 64K (5:6:5) */ |
---|
115 | #define VBE_R1024x768C64K 0x117 |
---|
116 | /** 15-bit mode, Resolution: 1024x768, Colors: 16.8M (8:8:8) */ |
---|
117 | #define VBE_R1024x768C17M 0x118 |
---|
118 | /** 15-bit mode, Resolution: 1280x1024, Colors: 32K (1:5:5:5) */ |
---|
119 | #define VBE_R1280x1024C32K 0x119 |
---|
120 | /** 15-bit mode, Resolution: 1280x1024, Colors: 64K (5:6:5) */ |
---|
121 | #define VBE_R1280x1024C64K 0x11A |
---|
122 | /** 15-bit mode, Resolution: 1280x1024, Colors: 16.8M (8:8:8) */ |
---|
123 | #define VBE_R1280x1024C17M 0x11B |
---|
124 | #define VBE_SpecialMode 0x81FF |
---|
125 | |
---|
126 | /* Text modes */ |
---|
127 | #define VBE_C80R60 0x108 /**< 15-bit mode, Columns: 80, Rows: 60 */ |
---|
128 | #define VBE_C132R25 0x109 /**< 15-bit mode, Columns: 132, Rows: 25 */ |
---|
129 | #define VBE_C132R43 0x10A /**< 15-bit mode, Columns: 132, Rows: 43 */ |
---|
130 | #define VBE_C132R50 0x10B /**< 15-bit mode, Columns: 132, Rows: 50 */ |
---|
131 | #define VBE_C132R60 0x10C /**< 15-bit mode, Columns: 132, Rows: 60 */ |
---|
132 | |
---|
133 | /* VBE function numbers - passed in AX register */ |
---|
134 | /** VBE function - Return VBE Controller Information */ |
---|
135 | #define VBE_RetVBEConInf 0x4F00 |
---|
136 | /** VBE function - Return VBE Mode Information */ |
---|
137 | #define VBE_RetVBEModInf 0x4F01 |
---|
138 | /** VBE function - Set VBE Mode */ |
---|
139 | #define VBE_SetVBEMod 0x4F02 |
---|
140 | /** VBE function - Return Current VBE Mode */ |
---|
141 | #define VBE_RetCurVBEMod 0x4F03 |
---|
142 | /** VBE function - Save/Restore State */ |
---|
143 | #define VBE_SavResSta 0x4F04 |
---|
144 | /** VBE function - Display Window Control */ |
---|
145 | #define VBE_DisWinCon 0x4F05 |
---|
146 | /** VBE function - Set/Get Logical Scan Line Length */ |
---|
147 | #define VBE_SetGetLogScaLinLen 0x4F06 |
---|
148 | /** VBE function - Set/Get Display Start */ |
---|
149 | #define VBE_SetGetDisSta 0x4F07 |
---|
150 | /** VBE function - Set/Get DAC Palette Format */ |
---|
151 | #define VBE_SetGetDACPalFor 0x4F08 |
---|
152 | /** VBE function - Set/Get Palette Data */ |
---|
153 | #define VBE_SetGetPalDat 0x4F09 |
---|
154 | /** VBE function - Return VBE Protected Mode Interface */ |
---|
155 | #define VBE_RetVBEProModInt 0x4F0A |
---|
156 | /** VBE function - Get/Set pixel clock */ |
---|
157 | #define VBE_GetSetpixclo 0x4F0B |
---|
158 | /** VBE function - Power Management Extensions (PM) */ |
---|
159 | #define VBE_PowManExt 0x4F10 |
---|
160 | /** VBE function - Flat Panel Interface Extensions (FP) */ |
---|
161 | #define VBE_FlaPanIntExt 0x4F11 |
---|
162 | /** VBE function - Audio Interface Extensions (AI) */ |
---|
163 | #define VBE_AudIntExt 0x4F13 |
---|
164 | /** VBE function - OEM Extensions */ |
---|
165 | #define VBE_OEMExt 0x4F14 |
---|
166 | /** VBE function - Display Data Channel (DDC), Serial Control Interface (SCI) */ |
---|
167 | #define VBE_DisDatCha 0x4F15 |
---|
168 | |
---|
169 | /* VBE subfunction numbers - passed in BL register */ |
---|
170 | #define VBE_RetVBESupSpeInf 0x00 /**< Return VBE Supplemental |
---|
171 | * Specification Information */ |
---|
172 | /* *** Structures *** */ |
---|
173 | /** |
---|
174 | * @brief Far pointer as defined by VBE standard. |
---|
175 | */ |
---|
176 | typedef struct { |
---|
177 | /** @brief Offset to segment described by \a selector. */ |
---|
178 | uint16_t offset; |
---|
179 | /** @brief Selector or Segment depending on whether this is used from 16bit |
---|
180 | protected mode or from real mode. */ |
---|
181 | uint16_t selector; |
---|
182 | } RTEMS_PACKED VBE_far_pointer; |
---|
183 | |
---|
184 | /** |
---|
185 | * @brief Protected mode info block as defined by VBE standard. |
---|
186 | */ |
---|
187 | typedef struct { |
---|
188 | /** PM Info Block Signature */ |
---|
189 | uint8_t Signature[4]; |
---|
190 | /** Offset of PM entry point within BIOS */ |
---|
191 | uint16_t EntryPoint; |
---|
192 | /** Offset of PM initialization entry point */ |
---|
193 | uint16_t PMInitialize; |
---|
194 | /** Selector to BIOS data area emulation block */ |
---|
195 | uint16_t BIOSDataSel; |
---|
196 | /** Selector to access A0000h physical memmory */ |
---|
197 | uint16_t A0000Sel; |
---|
198 | /** Selector to access B0000h physical memmory */ |
---|
199 | uint16_t B0000Sel; |
---|
200 | /** Selector to access B8000h physical memmory */ |
---|
201 | uint16_t B8000Sel; |
---|
202 | /** Selector to access code segment as data */ |
---|
203 | uint16_t CodeSegSel; |
---|
204 | /** Set to 1 when in protected mode */ |
---|
205 | uint8_t InProtectMode; |
---|
206 | /** Checksum byte for structure. Sum over all structure bytes gives 0. */ |
---|
207 | uint8_t Checksum; |
---|
208 | } RTEMS_PACKED VBE_protected_mode_info_block; |
---|
209 | |
---|
210 | /** General VBE signature */ |
---|
211 | #define VBE_SIGNATURE "VESA" |
---|
212 | /** Signature for VBE 2.0 and higher */ |
---|
213 | #define VBE20plus_SIGNATURE "VBE2" |
---|
214 | /** for STUB see VBE CORE FUNCTIONS VERSION 3.0 - Appendix 1 */ |
---|
215 | #define VBE_STUB_VideoModeList 0xFFFF |
---|
216 | #define VBE_END_OF_VideoModeList 0xFFFF |
---|
217 | /** |
---|
218 | * @brief Information about VBE implementation. |
---|
219 | */ |
---|
220 | typedef struct { |
---|
221 | /** VBE Signature */ |
---|
222 | uint8_t VbeSignature[4]; |
---|
223 | /** VBE Version */ |
---|
224 | uint16_t VbeVersion; |
---|
225 | /** VBE_far_pointer to OEM String */ |
---|
226 | uint8_t *OemStringPtr; |
---|
227 | /** Capabilities of graphics controller */ |
---|
228 | uint8_t Capabilities[4]; |
---|
229 | /** VBE_far_pointer to VideoModeList */ |
---|
230 | uint32_t *VideoModePtr; |
---|
231 | /** Number of 64kb memory blocks */ |
---|
232 | uint16_t TotalMemory; |
---|
233 | /* Added for VBE 2.0+ */ |
---|
234 | /** VBE implementation Software revision */ |
---|
235 | uint16_t OemSoftwareRev; |
---|
236 | /** VBE_far_pointer to Vendor Name String */ |
---|
237 | uint8_t *OemVendorNamePtr; |
---|
238 | /** VBE_far_pointer to Product Name String */ |
---|
239 | uint8_t *OemProductNamePtr; |
---|
240 | /** VBE_far_pointer to Product Revision String */ |
---|
241 | uint8_t *OemProductRevPtr; |
---|
242 | /** Reserved for VBE implementation scratch */ |
---|
243 | uint8_t Reserved[222]; |
---|
244 | /** Data Area for OEM Strings */ |
---|
245 | uint8_t OemData[256]; |
---|
246 | } RTEMS_PACKED VBE_vbe_info_block; |
---|
247 | |
---|
248 | /** |
---|
249 | * @brief Describes graphic's mode parameter. |
---|
250 | */ |
---|
251 | typedef struct { |
---|
252 | /* Mandatory information for all VBE revisions */ |
---|
253 | /** mode attributes */ |
---|
254 | uint16_t ModeAttributes; |
---|
255 | /** window A attributes */ |
---|
256 | uint8_t WinAAttributes; |
---|
257 | /** window B attributes */ |
---|
258 | uint8_t WinBAttributes; |
---|
259 | /** window granularity */ |
---|
260 | uint16_t WinGranularity; |
---|
261 | /** window size */ |
---|
262 | uint16_t WinSize; |
---|
263 | /** window A start segment */ |
---|
264 | uint16_t WinASegment; |
---|
265 | /** window B start segment */ |
---|
266 | uint16_t WinBSegment; |
---|
267 | /** real mode pointer to window function */ |
---|
268 | uint32_t *WinFuncPtr; |
---|
269 | /** bytes per scan line */ |
---|
270 | uint16_t BytesPerScanLine; |
---|
271 | /* Mandatory information for VBE 1.2 and above */ |
---|
272 | /** horizontal resolution in px or chars */ |
---|
273 | uint16_t XResolution; |
---|
274 | /** vertical resolution in px or chars */ |
---|
275 | uint16_t YResolution; |
---|
276 | /** character cell width in pixels */ |
---|
277 | uint8_t XCharSize; |
---|
278 | /** character cell height in pixels */ |
---|
279 | uint8_t YCharSize; |
---|
280 | /** number of memory planes */ |
---|
281 | uint8_t NumberOfPlanes; |
---|
282 | /** bits per pixel */ |
---|
283 | uint8_t BitsPerPixel; |
---|
284 | /** number of banks */ |
---|
285 | uint8_t NumberOfBanks; |
---|
286 | /** memory model type */ |
---|
287 | uint8_t MemoryModel; |
---|
288 | /** bank size in KB */ |
---|
289 | uint8_t BankSize; |
---|
290 | /** number of images */ |
---|
291 | uint8_t NumberOfImagePages; |
---|
292 | /** reserved for page function */ |
---|
293 | uint8_t Reserved0; |
---|
294 | /* Direct Color fields (required for direct/6 and YUV/7 memory models) */ |
---|
295 | /** size of direct color red mask in bits */ |
---|
296 | uint8_t RedMaskSize; |
---|
297 | /** bit position of lsb of red mask */ |
---|
298 | uint8_t RedFieldPosition; |
---|
299 | /** size of direct color green mask in b */ |
---|
300 | uint8_t GreenMaskSize; |
---|
301 | /** bit position of lsb of green mask */ |
---|
302 | uint8_t GreenFieldPosition; |
---|
303 | /** size of direct color blue mask in b */ |
---|
304 | uint8_t BlueMaskSize; |
---|
305 | /** bit position of lsb of blue mask */ |
---|
306 | uint8_t BlueFieldPosition; |
---|
307 | /** size of direct color reserved mask */ |
---|
308 | uint8_t RsvdMaskSize; |
---|
309 | /** bit position of lsb of reserved mask */ |
---|
310 | uint8_t RsvdFieldPosition; |
---|
311 | /** direct color mode attributes */ |
---|
312 | uint8_t DirectColorModeInfo; |
---|
313 | /* Mandatory information for VBE 2.0 and above */ |
---|
314 | /** physical address for flat memory frame buffer */ |
---|
315 | uint32_t *PhysBasePtr; |
---|
316 | /** Reserved - always set to 0 */ |
---|
317 | uint32_t Reserved1; |
---|
318 | /** Reserved - always set to 0 */ |
---|
319 | uint16_t Reserved2; |
---|
320 | /* Mandatory information for VBE 3.0 and above */ |
---|
321 | /** bytes per scan line for linear modes */ |
---|
322 | uint16_t LinBytesPerScanLine; |
---|
323 | /** number of images for banked modes */ |
---|
324 | uint8_t BnkNumberOfImagePages; |
---|
325 | /** number of images for linear modes */ |
---|
326 | uint8_t LinNumberOfImagePages; |
---|
327 | /* linear modes */ |
---|
328 | /** size of direct color red mask */ |
---|
329 | uint8_t LinRedMaskSize; |
---|
330 | /** bit position of lsb of red mask */ |
---|
331 | uint8_t LinRedFieldPosition; |
---|
332 | /** size of direct color green mask */ |
---|
333 | uint8_t LinGreenMaskSize; |
---|
334 | /** bit position of lsb of green mask */ |
---|
335 | uint8_t LinGreenFieldPosition; |
---|
336 | /** size of direct color blue mask */ |
---|
337 | uint8_t LinBlueMaskSize; |
---|
338 | /** bit position of lsb of blue mask */ |
---|
339 | uint8_t LinBlueFieldPosition; |
---|
340 | /** size of direct color reserved mask */ |
---|
341 | uint8_t LinRsvdMaskSize; |
---|
342 | /** bit position of lsb of reserved mask */ |
---|
343 | uint8_t LinRsvdFieldPosition; |
---|
344 | /** maximum pixel clock (in Hz) for graphics mode */ |
---|
345 | uint32_t MaxPixelClock; |
---|
346 | /** remainder of VBE_mode_info_block */ |
---|
347 | uint8_t Reserved3[189]; |
---|
348 | } RTEMS_PACKED VBE_mode_info_block; |
---|
349 | |
---|
350 | /** |
---|
351 | * @brief Describes monitor synchronization. |
---|
352 | */ |
---|
353 | typedef struct { |
---|
354 | /** Horizontal total in pixels */ |
---|
355 | uint16_t HorizontalTotal; |
---|
356 | /** Horizontal sync start in pixels */ |
---|
357 | uint16_t HorizontalSyncStart; |
---|
358 | /** Horizontal sync end in pixels */ |
---|
359 | uint16_t HorizontalSyncEnd; |
---|
360 | /** Vertical total in lines */ |
---|
361 | uint16_t VerticalTotal; |
---|
362 | /** Vertical sync start in lines */ |
---|
363 | uint16_t VerticalSyncStart; |
---|
364 | /** Vertical sync end in lines */ |
---|
365 | uint16_t VerticalSyncEnd; |
---|
366 | /** Flags (Interlaced, Double Scan etc) */ |
---|
367 | uint8_t Flags; |
---|
368 | /** Pixel clock in units of Hz */ |
---|
369 | uint32_t PixelClock; |
---|
370 | /** Refresh rate in units of 0.01 Hz */ |
---|
371 | uint16_t RefreshRate; |
---|
372 | /** remainder of VBE_mode_info_block */ |
---|
373 | uint8_t Reserved[40]; |
---|
374 | } RTEMS_PACKED VBE_CRTC_info_block; |
---|
375 | |
---|
376 | /** |
---|
377 | * @brief Describes palette entry. |
---|
378 | */ |
---|
379 | typedef struct { |
---|
380 | /** Blue channel value (6 or 8 bits) */ |
---|
381 | uint8_t Blue; |
---|
382 | /** Green channel value (6 or 8 bits) */ |
---|
383 | uint8_t Green; |
---|
384 | /** Red channel value(6 or 8 bits) */ |
---|
385 | uint8_t Red; |
---|
386 | /** DWORD alignment byte (unused) */ |
---|
387 | uint8_t Alignment; |
---|
388 | } RTEMS_PACKED VBE_palette_entry; |
---|
389 | |
---|
390 | /** |
---|
391 | * @brief Supplemental VBE info block. |
---|
392 | */ |
---|
393 | typedef struct { |
---|
394 | /** Supplemental VBE Signature */ |
---|
395 | uint8_t SupVbeSignature[7]; |
---|
396 | /** Supplemental VBE Version */ |
---|
397 | uint16_t SupVbeVersion; |
---|
398 | /** Bitfield of supported subfunctions */ |
---|
399 | uint8_t SupVbeSubFunc[8]; |
---|
400 | /** OEM Software revision */ |
---|
401 | uint16_t OemSoftwareRev; |
---|
402 | /** VBE_far_pointer to Vendor Name String */ |
---|
403 | uint8_t *OemVendorNamePtr; |
---|
404 | /** VBE_far_pointer to Product Name String */ |
---|
405 | uint8_t *OemProductNamePtr; |
---|
406 | /** VBE_far_pointer to Product Revision String */ |
---|
407 | uint8_t *OemProductRevPtr; |
---|
408 | /** VBE_far_pointer to OEM String */ |
---|
409 | uint8_t *OemStringPtr; |
---|
410 | /** Reserved for description strings and future expansion */ |
---|
411 | uint8_t Reserved[221]; |
---|
412 | } RTEMS_PACKED VBE_supplemental_vbe_info_block; |
---|
413 | |
---|
414 | /* VBE_vbe_info_block Capabilities */ |
---|
415 | /** VBE Info Block - Capabilities\n |
---|
416 | D0 = 0 DAC is fixed width, with 6 bits per primary color \n |
---|
417 | D0 = 1 DAC width is switchable to 8 bits per primary color */ |
---|
418 | #define VBE_DACswitchableMask 0x0001 |
---|
419 | /** VBE Info Block - Capabilities\n |
---|
420 | D1 = 0 Controller is VGA compatible \n |
---|
421 | D1 = 1 Controller is not VGA compatible */ |
---|
422 | #define VBE_notVGAcompatibleMask 0x0002 |
---|
423 | /** VBE Info Block - Capabilities\n |
---|
424 | D2 = 0 Normal RAMDAC operation \n |
---|
425 | D2 = 1 When programming large blocks of information to the RAMDAC, |
---|
426 | use the blank bit in Function 09h. */ |
---|
427 | #define VBE_specialRAMDACopMask 0x0004 |
---|
428 | /** VBE Info Block - Capabilities\n |
---|
429 | D3 = 0 No hardware stereoscopic signaling support \n |
---|
430 | D3 = 1 Hardware stereoscopic signaling supported by controller */ |
---|
431 | #define VBE_hwStereoscopicMask 0x0008 |
---|
432 | /** VBE Info Block - Capabilities\n |
---|
433 | D4 = 0 Stereo signaling supported via external VESA stereo connector \n |
---|
434 | D4 = 1 Stereo signaling supported via VESA EVC connector */ |
---|
435 | #define VBE_supportEVCconnMask 0x0010 |
---|
436 | /* D5-31 = Reserved */ |
---|
437 | |
---|
438 | /* VBE_mode_info_block ModeAttributes */ |
---|
439 | /** Mode Info Block - Mode Attributes\n |
---|
440 | D0 = Mode supported by hardware configuration. |
---|
441 | 0 = Mode not supported in hardware\n |
---|
442 | 1 = Mode supported in hardware */ |
---|
443 | #define VBE_modSupInHWMask 0x0001 |
---|
444 | /* D1 = 1 (Reserved) */ |
---|
445 | /** Mode Info Block - Mode Attributes\n |
---|
446 | D2 = TTY Output functions supported by BIOS. |
---|
447 | 0 = TTY Output functions not supported by BIOS\n |
---|
448 | 1 = TTY Output functions supported by BIOS */ |
---|
449 | #define VBE_TTYOutSupByBIOSMask 0x0004 |
---|
450 | /** Mode Info Block - Mode Attributes\n |
---|
451 | D3 = Monochrome/color mode (see note below). |
---|
452 | 0 = Monochrome mode\n |
---|
453 | 1 = Color mode */ |
---|
454 | #define VBE_ColorModeMask 0x0008 |
---|
455 | /** Mode Info Block - Mode Attributes\n |
---|
456 | D4 = Mode type. |
---|
457 | 0 = Text mode\n |
---|
458 | 1 = Graphics mode */ |
---|
459 | #define VBE_GraphicsModeMask 0x0010 |
---|
460 | /** Mode Info Block - Mode Attributes\n |
---|
461 | D5 = VGA compatible mode. |
---|
462 | 0 = Yes\n |
---|
463 | 1 = No */ |
---|
464 | #define VBE_VGACompModeMask 0x0020 |
---|
465 | /** Mode Info Block - Mode Attributes\n |
---|
466 | D6 = VGA compatible windowed memory mode is available. |
---|
467 | 0 = Yes\n |
---|
468 | 1 = No */ |
---|
469 | #define VBE_VGACompWinMemModeMask 0x0040 |
---|
470 | /** Mode Info Block - Mode Attributes\n |
---|
471 | D7 = Linear frame buffer mode is available. |
---|
472 | 0 = No\n |
---|
473 | 1 = Yes */ |
---|
474 | #define VBE_LinFraBufModeAvaiMask 0x0080 |
---|
475 | /** Mode Info Block - Mode Attributes\n |
---|
476 | D8 = Double scan mode is available. |
---|
477 | 0 = No\n |
---|
478 | 1 = Yes */ |
---|
479 | #define VBE_DblScnModeAvaiMask 0x0100 |
---|
480 | /** Mode Info Block - Mode Attributes\n |
---|
481 | D9 = Interlaced mode is available. |
---|
482 | 0 = No\n |
---|
483 | 1 = Yes */ |
---|
484 | #define VBE_InterlModeAvaiMask 0x0200 |
---|
485 | /** Mode Info Block - Mode Attributes\n |
---|
486 | D10 = Hardware triple buffering support. |
---|
487 | 0 = No\n |
---|
488 | 1 = Yes */ |
---|
489 | #define VBE_HWTripBufSupMask 0x0400 |
---|
490 | /** Mode Info Block - Mode Attributes\n |
---|
491 | D11 = Hardware stereoscopic display support. |
---|
492 | 0 = No\n |
---|
493 | 1 = Yes */ |
---|
494 | #define VBE_HWSterDispSupMask 0x0800 |
---|
495 | /** Mode Info Block - Mode Attributes\n |
---|
496 | D12 = Dual display start address support. |
---|
497 | 0 = No\n |
---|
498 | 1 = Yes */ |
---|
499 | #define VBE_DualDispStAdrSupMask 0x1000 |
---|
500 | /* D13-D15 = Reserved */ |
---|
501 | |
---|
502 | /* VBE_mode_info_block WinXAttributes */ |
---|
503 | /** D0 = Relocatable window(s) supported. |
---|
504 | 0 = Single non-relocatable window only\n |
---|
505 | 1 = Relocatable window(s) are supported */ |
---|
506 | #define VBE_RelocWinSupMask 0x01 |
---|
507 | /** D1 = Window readable. |
---|
508 | 0 = Window is not readable\n |
---|
509 | 1 = Window is readable */ |
---|
510 | #define VBE_WinReadableMask 0x02 |
---|
511 | /** D2 = Window writeable. |
---|
512 | 0 = Window is not writeable\n |
---|
513 | 1 = Window is writeable */ |
---|
514 | #define VBE_WinWritableMask 0x04 |
---|
515 | /* D3-D7 = Reserved */ |
---|
516 | |
---|
517 | /* VBE_mode_info_block MemoryModel */ |
---|
518 | #define VBE_TextMode 0x00 |
---|
519 | #define VBE_CGAGraphics 0x01 |
---|
520 | #define VBE_HerculesGraphics 0x02 |
---|
521 | #define VBE_Planar 0x03 |
---|
522 | #define VBE_PackedPixel 0x04 |
---|
523 | #define VBE_NonChain4Color256 0x05 |
---|
524 | #define VBE_DirectColor 0x06 |
---|
525 | #define VBE_YUV 0x07 |
---|
526 | /* 0x08-0x0F Reserved, to be defined by VESA */ |
---|
527 | /* 0x10-0xFF To be defined by OEM */ |
---|
528 | |
---|
529 | /* VBE_mode_info_block DirectColorModeInfo */ |
---|
530 | /** D0 = Color ramp is fixed/programmable. |
---|
531 | 0 = Color ramp is fixed\n |
---|
532 | 1 = Color ramp is programmable */ |
---|
533 | #define VBE_ColRampProgMask 0x01 |
---|
534 | /** D1 = Bits in Rsvd field are usable/reserved. |
---|
535 | 0 = Bits in Rsvd field are reserved\n |
---|
536 | 1 = Bits in Rsvd field are usable by the application */ |
---|
537 | #define VBE_RsvdBitsUsableMask 0x02 |
---|
538 | |
---|
539 | /* VBE_CRTC_info_block Flags */ |
---|
540 | /** CRTC Info Block - Flags\n |
---|
541 | D0 = Double Scan Mode Enable. |
---|
542 | 0 = Graphics mode is not double scanned\n |
---|
543 | 1 = Graphics mode is double scanned */ |
---|
544 | #define VBE_GrModeDblScanMask 0x01 |
---|
545 | /** CRTC Info Block - Flags\n |
---|
546 | D1 = Interlaced Mode Enable. |
---|
547 | 0 = Graphics mode is non-interlaced\n |
---|
548 | 1 = Graphics mode is interlaced */ |
---|
549 | #define VBE_GrModeInterlMask 0x02 |
---|
550 | /** CRTC Info Block - Flags\n |
---|
551 | D2 = Horizontal sync polarity. |
---|
552 | 0 = Horizontal sync polarity is positive (+)\n |
---|
553 | 1 = Horizontal sync polarity is negative (-) */ |
---|
554 | #define VBE_HorSncPolNegMask 0x04 |
---|
555 | /** CRTC Info Block - Flags\n |
---|
556 | D3 = Vertical sync polarity. |
---|
557 | 0 = Vertical sync polarity is positive (+)\n |
---|
558 | 1 = Vertical sync polarity is negative (-) */ |
---|
559 | #define VBE_VerSncPolNegMask 0x08 |
---|
560 | |
---|
561 | |
---|
562 | /* VESA BIOS Extensions/Display Data Channel Standard |
---|
563 | Version: 1.1 November 18, 1999 */ |
---|
564 | |
---|
565 | /* VBE/DDC subfunction numbers - passed in BL register */ |
---|
566 | /** VBE/DDC subfunction - Report VBE/DDC Capabilities */ |
---|
567 | #define VBEDDC_Capabilities 0x0 |
---|
568 | /** VBE/DDC subfunction - Read EDID */ |
---|
569 | #define VBEDDC_ReadEDID 0x1 |
---|
570 | |
---|
571 | /* DDC Capabilities */ |
---|
572 | /* DDC level supported - returned in BL register */ |
---|
573 | /** 0 - DDC1 not supported; 1 - DDC1 supported */ |
---|
574 | #define VBEDDC_1SupportedMask 0x1 |
---|
575 | /** 0 - DDC2 not supported; 1 - DDC2 supported */ |
---|
576 | #define VBEDDC_2SupportedMask 0x2 |
---|
577 | /** 0 - Screen not blanked during data transfer\n |
---|
578 | 1 - Screen blanked during data transfer */ |
---|
579 | #define VBEDDC_scrBlnkDatTrMs 0x4 |
---|
580 | |
---|
581 | |
---|
582 | /* VESA BIOS Extensions/Serial Control Interface Standard |
---|
583 | Version: 1.0 Revision: 2 Date: July 2, 1997 */ |
---|
584 | |
---|
585 | /* VBE/SCI subfunction numbers - passed in BL register */ |
---|
586 | /** VBE/SCI subfunction - Report VBE/SCI Capabilities */ |
---|
587 | #define VBESCI_ReportCapabil 0x10 |
---|
588 | /** VBE/SCI subfunction - Begin SCL/SDA control */ |
---|
589 | #define VBESCI_BegSCLSDACtrl 0x11 |
---|
590 | /** VBE/SCI subfunction - End SCL/SDA control */ |
---|
591 | #define VBESCI_EndSCLSDACtrl 0x12 |
---|
592 | /** VBE/SCI subfunction - Write SCL clock line */ |
---|
593 | #define VBESCI_WrtSCLClkLine 0x13 |
---|
594 | /** VBE/SCI subfunction - Write SDA data line */ |
---|
595 | #define VBESCI_WrtSDADatLine 0x14 |
---|
596 | /** VBE/SCI subfunction - Read SCL clock line */ |
---|
597 | #define VBESCI_RdySCLClkLine 0x15 |
---|
598 | /** VBE/SCI subfunction - Read SDA data line */ |
---|
599 | #define VBESCI_RdySDADatLine 0x16 |
---|
600 | |
---|
601 | /* SCI Capabilities */ |
---|
602 | /* I2C level supported - returned in BL register */ |
---|
603 | /** Can write to SCL clock line */ |
---|
604 | #define VBESCI_capSCLwrtMask 0x1 |
---|
605 | /** Can write to SDA data line */ |
---|
606 | #define VBESCI_capSDAwrtMask 0x2 |
---|
607 | /** Can read from SCL clock line */ |
---|
608 | #define VBESCI_capSCLrdyMask 0x4 |
---|
609 | /** Can read from SDA data line */ |
---|
610 | #define VBESCI_capSDArdyMask 0x8 |
---|
611 | |
---|
612 | |
---|
613 | #ifdef __cplusplus |
---|
614 | } |
---|
615 | #endif /* __cplusplus */ |
---|
616 | |
---|
617 | #endif /* ASM */ |
---|
618 | |
---|
619 | #endif /* _VBE_H */ |
---|