source: rtems/c/src/lib/libbsp/i386/pc386/include/vbe3.h @ 038e1dba

4.115
Last change on this file since 038e1dba was 038e1dba, checked in by Jan Dolezal <dolezj21@…>, on 12/03/14 at 23:56:39

i386: doxygen and comments related to VESA real mode framebuffer

  • Property mode set to 100644
File size: 22.2 KB
RevLine 
[c5a74946]1/**
2 * @file vbe3.h
3 *
4 * @ingroup i386_pc386
5 *
6 * @brief VESA Bios Extension definitions.
[038e1dba]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>.
[c5a74946]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
32extern "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
[038e1dba]40/** AL == 4Fh: Function is supported \n
41 *  AL != 4Fh: Function is not supported */
[c5a74946]42#define VBE_functionSupported        0x4F
[038e1dba]43/** AH == 00h: Function call successful */
[c5a74946]44#define VBE_callSuccessful           0x00
[038e1dba]45/** AH == 01h: Function call failed */
[c5a74946]46#define VBE_callFailed               0x01
[038e1dba]47/** AH == 02h: Function is not supported in the current hardware configuration*/
[c5a74946]48#define VBE_notSupportedInCurHWConf  0x02
[038e1dba]49/** AH == 03h: Function call invalid in current video mode */
[c5a74946]50#define VBE_callInvalid              0x03
51
52/* VBE Mode Numbers */
[038e1dba]53/** D0-D8 =  Mode number */
[c5a74946]54#define VBE_modeNumberMask         0x01FF
55#define VBE_modeNumberShift          0x00
[038e1dba]56/** If D8 == 0, this is not a VESA defined VBE mode \n
57    If D8 == 1, this is a VESA defined VBE mode */
[c5a74946]58#define VBE_VESAmodeMask           0x0100
59#define VBE_VESAmodeShift            0x08
[038e1dba]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 */
[c5a74946]63#define VBE_refreshRateCtrlMask    0x0800
64#define VBE_refreshRateCtrlShift     0x0B
[038e1dba]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 */
[c5a74946]68#define VBE_linearFlatFrameBufMask 0x4000
69#define VBE_linearFlatFrameBufShift  0x0E
[038e1dba]70/** If D15 == 0, Clear display memory \n
71    If D15 == 1, Preserve display memory */
[c5a74946]72#define VBE_preserveDispMemMask    0x8000
73#define VBE_preserveDispMemShift     0x0F
74
75/* Graphics modes */
[038e1dba]76/** 15-bit mode, Resolution: 640x400,   Colors: 256  */
[c5a74946]77#define VBE_R640x400C256      0x100
[038e1dba]78/** 15-bit mode, Resolution: 640x480,   Colors: 256  */
[c5a74946]79#define VBE_R640x480C256      0x101
[038e1dba]80/** 15-bit mode, Resolution: 800x600,   Colors: 16   */
[c5a74946]81#define VBE_R800x600C16       0x102
[038e1dba]82/** 7-bit mode,  Resolution: 800x600,   Colors: 16   */
[c5a74946]83#define VBE_b7R800x600C16     0x6A
[038e1dba]84/** 15-bit mode, Resolution: 800x600,   Colors: 256  */
[c5a74946]85#define VBE_R800x600C256      0x103
[038e1dba]86/** 15-bit mode, Resolution: 1024x768,  Colors: 16   */
[c5a74946]87#define VBE_R1024x768C16      0x104
[038e1dba]88/** 15-bit mode, Resolution: 1024x768,  Colors: 256  */
[c5a74946]89#define VBE_R1024x768C256     0x105
[038e1dba]90/** 15-bit mode, Resolution: 1280x1024, Colors: 16   */
[c5a74946]91#define VBE_R1280x1024C16     0x106
[038e1dba]92/** 15-bit mode, Resolution: 1280x1024, Colors: 256  */
[c5a74946]93#define VBE_R1280x1024C256    0x107
[038e1dba]94/** 15-bit mode, Resolution: 320x200,   Colors: 32K   (1:5:5:5) */
[c5a74946]95#define VBE_R320x200C32K      0x10D
[038e1dba]96/** 15-bit mode, Resolution: 320x200,   Colors: 64K   (5:6:5)   */
[c5a74946]97#define VBE_R320x200C64K      0x10E
[038e1dba]98/** 15-bit mode, Resolution: 320x200,   Colors: 16.8M (8:8:8)   */
[c5a74946]99#define VBE_R320x200C17M      0x10F
[038e1dba]100/** 15-bit mode, Resolution: 640x480,   Colors: 32K   (1:5:5:5) */
[c5a74946]101#define VBE_R640x480C32K      0x110
[038e1dba]102/** 15-bit mode, Resolution: 640x480,   Colors: 64K   (5:6:5)   */
[c5a74946]103#define VBE_R640x480C64K      0x111
[038e1dba]104/** 15-bit mode, Resolution: 640x480,   Colors: 16.8M (8:8:8)   */
[c5a74946]105#define VBE_R640x480C17M      0x112
[038e1dba]106/** 15-bit mode, Resolution: 800x600,   Colors: 32K   (1:5:5:5) */
[c5a74946]107#define VBE_R800x600C32K      0x113
[038e1dba]108/** 15-bit mode, Resolution: 800x600,   Colors: 64K   (5:6:5)   */
[c5a74946]109#define VBE_R800x600C64K      0x114
[038e1dba]110/** 15-bit mode, Resolution: 800x600,   Colors: 16.8M (8:8:8)   */
[c5a74946]111#define VBE_R800x600C17M      0x115
[038e1dba]112/** 15-bit mode, Resolution: 1024x768,  Colors: 32K   (1:5:5:5) */
[c5a74946]113#define VBE_R1024x768C32K     0x116
[038e1dba]114/** 15-bit mode, Resolution: 1024x768,  Colors: 64K   (5:6:5)   */
[c5a74946]115#define VBE_R1024x768C64K     0x117
[038e1dba]116/** 15-bit mode, Resolution: 1024x768,  Colors: 16.8M (8:8:8)   */
[c5a74946]117#define VBE_R1024x768C17M     0x118
[038e1dba]118/** 15-bit mode, Resolution: 1280x1024, Colors: 32K   (1:5:5:5) */
[c5a74946]119#define VBE_R1280x1024C32K    0x119
[038e1dba]120/** 15-bit mode, Resolution: 1280x1024, Colors: 64K   (5:6:5)   */
[c5a74946]121#define VBE_R1280x1024C64K    0x11A
[038e1dba]122/** 15-bit mode, Resolution: 1280x1024, Colors: 16.8M (8:8:8)   */
[c5a74946]123#define VBE_R1280x1024C17M    0x11B
124#define VBE_SpecialMode       0x81FF
125
126/* Text modes */
[038e1dba]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 */
[c5a74946]132
133/* VBE function numbers - passed in AX register */
[038e1dba]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
[c5a74946]168
169/* VBE subfunction numbers - passed in BL register */
[038e1dba]170#define VBE_RetVBESupSpeInf    0x00  /**< Return VBE Supplemental
171                                      * Specification Information */
[c5a74946]172/* *** Structures *** */
[038e1dba]173/**
174 * @brief Far pointer as defined by VBE standard.
175 */
[d78eac6]176typedef struct {
[038e1dba]177    /** @brief Offset to segment described by \a selector. */
[c5a74946]178    uint16_t offset;
[038e1dba]179    /** @brief Selector or Segment depending on whether this is used from 16bit
180        protected mode or from real mode. */
[c5a74946]181    uint16_t selector;
[d78eac6]182} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_far_pointer;
[c5a74946]183
[038e1dba]184/**
185 * @brief Protected mode info block as defined by VBE standard.
186 */
[d78eac6]187typedef struct {
[038e1dba]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;
[d78eac6]208} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_protected_mode_info_block;
[c5a74946]209
[038e1dba]210/** General VBE signature */
[c5a74946]211#define VBE_SIGNATURE "VESA"
[038e1dba]212/** Signature for VBE 2.0 and higher */
[c5a74946]213#define VBE20plus_SIGNATURE "VBE2"
[038e1dba]214/** for STUB see VBE CORE FUNCTIONS VERSION 3.0 - Appendix 1 */
[c5a74946]215#define VBE_STUB_VideoModeList 0xFFFF
[038e1dba]216#define VBE_END_OF_VideoModeList 0xFFFF
217/**
218 * @brief Information about VBE implementation.
219 */
[d78eac6]220typedef struct {
[038e1dba]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;
[c5a74946]233    /*  Added for VBE 2.0+ */
[038e1dba]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];
[d78eac6]246} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_vbe_info_block;
[c5a74946]247
[038e1dba]248/**
249 * @brief Describes graphic's mode parameter.
250 */
[d78eac6]251typedef struct {
[c5a74946]252    /*  Mandatory information for all VBE revisions */
[038e1dba]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;
[c5a74946]271    /*  Mandatory information for VBE 1.2 and above */
[038e1dba]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;
[c5a74946]294    /*  Direct Color fields (required for direct/6 and YUV/7 memory models) */
[038e1dba]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;
[c5a74946]313    /*  Mandatory information for VBE 2.0 and above */
[038e1dba]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;
[c5a74946]320    /*  Mandatory information for VBE 3.0 and above */
[038e1dba]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;
[c5a74946]327        /* linear modes */
[038e1dba]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];
[d78eac6]348} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_mode_info_block;
[c5a74946]349
[038e1dba]350/**
351 * @brief Describes monitor synchronization.
352 */
[d78eac6]353typedef struct {
[038e1dba]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];
[d78eac6]374} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_CRTC_info_block;
[c5a74946]375
[038e1dba]376/**
377 * @brief Describes palette entry.
378 */
[d78eac6]379typedef struct {
[038e1dba]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;
[d78eac6]388} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_palette_entry;
[c5a74946]389
[038e1dba]390/**
391 * @brief Supplemental VBE info block.
392 */
[d78eac6]393typedef struct {
[038e1dba]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];
[d78eac6]412} RTEMS_COMPILER_PACKED_ATTRIBUTE VBE_supplemental_vbe_info_block;
[c5a74946]413
[038e1dba]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 */
[c5a74946]418#define VBE_DACswitchableMask     0x0001
[038e1dba]419/** VBE Info Block - Capabilities\n
420    D1 = 0 Controller is VGA compatible \n
421    D1 = 1 Controller is not VGA compatible */
[c5a74946]422#define VBE_notVGAcompatibleMask  0x0002
[038e1dba]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,
[c5a74946]426            use the blank bit in Function 09h. */
427#define VBE_specialRAMDACopMask   0x0004
[038e1dba]428/** VBE Info Block - Capabilities\n
429    D3 = 0 No hardware stereoscopic signaling support \n
430    D3 = 1 Hardware stereoscopic signaling supported by controller */
[c5a74946]431#define VBE_hwStereoscopicMask    0x0008
[038e1dba]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 */
[c5a74946]435#define VBE_supportEVCconnMask    0x0010
436/*  D5-31 = Reserved */
437
[038e1dba]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 */
[c5a74946]443#define VBE_modSupInHWMask        0x0001
444/*  D1 =  1 (Reserved) */
[038e1dba]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 */
[c5a74946]449#define VBE_TTYOutSupByBIOSMask   0x0004
[038e1dba]450/** Mode Info Block - Mode Attributes\n
451    D3 =  Monochrome/color mode (see note below).
452     0 =  Monochrome mode\n
453     1 =  Color mode */
[c5a74946]454#define VBE_ColorModeMask         0x0008
[038e1dba]455/** Mode Info Block - Mode Attributes\n
456    D4 =  Mode type.
457     0 =  Text mode\n
458     1 =  Graphics mode */
[c5a74946]459#define VBE_GraphicsModeMask      0x0010
[038e1dba]460/** Mode Info Block - Mode Attributes\n
461    D5 =  VGA compatible mode.
462     0 =  Yes\n
463     1 =  No */
[c5a74946]464#define VBE_VGACompModeMask       0x0020
[038e1dba]465/** Mode Info Block - Mode Attributes\n
466    D6 =  VGA compatible windowed memory mode is available.
467     0 =  Yes\n
468     1 =  No */
[c5a74946]469#define VBE_VGACompWinMemModeMask 0x0040
[038e1dba]470/** Mode Info Block - Mode Attributes\n
471    D7 =  Linear frame buffer mode is available.
472     0 =  No\n
473     1 =  Yes */
[c5a74946]474#define VBE_LinFraBufModeAvaiMask 0x0080
[038e1dba]475/** Mode Info Block - Mode Attributes\n
476    D8 =  Double scan mode is available.
477     0 =  No\n
478     1 =  Yes */
[c5a74946]479#define VBE_DblScnModeAvaiMask    0x0100
[038e1dba]480/** Mode Info Block - Mode Attributes\n
481    D9 =  Interlaced mode is available.
482     0 =  No\n
483     1 =  Yes */
[c5a74946]484#define VBE_InterlModeAvaiMask    0x0200
[038e1dba]485/** Mode Info Block - Mode Attributes\n
486    D10 =  Hardware triple buffering support.
487     0 =  No\n
488     1 =  Yes */
[c5a74946]489#define VBE_HWTripBufSupMask      0x0400
[038e1dba]490/** Mode Info Block - Mode Attributes\n
491    D11 =  Hardware stereoscopic display support.
492     0 =  No\n
493     1 =  Yes */
[c5a74946]494#define VBE_HWSterDispSupMask     0x0800
[038e1dba]495/** Mode Info Block - Mode Attributes\n
496    D12 =  Dual display start address support.
497     0 =  No\n
498     1 =  Yes */
[c5a74946]499#define VBE_DualDispStAdrSupMask  0x1000
500/*  D13-D15 =  Reserved */
501
[038e1dba]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 */
[c5a74946]506#define VBE_RelocWinSupMask       0x01
[038e1dba]507/** D1 =  Window readable.
508     0 =  Window is not readable\n
509     1 =  Window is readable */
[c5a74946]510#define VBE_WinReadableMask       0x02
[038e1dba]511/** D2 =  Window writeable.
512     0 =  Window is not writeable\n
513     1 =  Window is writeable */
[c5a74946]514#define VBE_WinWritableMask       0x04
515/*  D3-D7 =  Reserved */
516
[038e1dba]517/* VBE_mode_info_block MemoryModel */
[c5a74946]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
[038e1dba]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 */
[c5a74946]533#define VBE_ColRampProgMask       0x01
[038e1dba]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 */
[c5a74946]537#define VBE_RsvdBitsUsableMask    0x02
538
[038e1dba]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 */
[c5a74946]544#define VBE_GrModeDblScanMask     0x01
[038e1dba]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 */
[c5a74946]549#define VBE_GrModeInterlMask      0x02
[038e1dba]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 (-) */
[c5a74946]554#define VBE_HorSncPolNegMask      0x04
[038e1dba]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 (-) */
[c5a74946]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 */
[038e1dba]566/** VBE/DDC subfunction - Report VBE/DDC Capabilities */
567#define VBEDDC_Capabilities    0x0
568/** VBE/DDC subfunction - Read EDID */
569#define VBEDDC_ReadEDID        0x1
[c5a74946]570
571/* DDC Capabilities */
572/* DDC level supported - returned in BL register */
[038e1dba]573/** 0 - DDC1 not supported; 1 - DDC1 supported */
[c5a74946]574#define VBEDDC_1SupportedMask  0x1
[038e1dba]575/** 0 - DDC2 not supported; 1 - DDC2 supported */
[c5a74946]576#define VBEDDC_2SupportedMask  0x2
[038e1dba]577/** 0 - Screen not blanked during data transfer\n
578    1 - Screen blanked during data transfer */
[c5a74946]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 */
[038e1dba]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
[c5a74946]600
601/* SCI Capabilities */
602/* I2C level supported - returned in BL register */
[038e1dba]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
[c5a74946]611
612
613#ifdef __cplusplus
614}
615#endif /* __cplusplus */
616
617#endif /* ASM */
618
619#endif /* _VBE_H */
Note: See TracBrowser for help on using the repository browser.