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