ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

vbe.h
Go to the documentation of this file.
00001 /*
00002  * PROJECT:         VGA Miniport Driver
00003  * LICENSE:         BSD - See COPYING.ARM in the top level directory
00004  * FILE:            boot/drivers/video/miniport/vga/vbe.h
00005  * PURPOSE:         VESA VBE Registers and Structures
00006  * PROGRAMMERS:     ReactOS Portable Systems Group
00007  */
00008 
00009 
00010 #define LOWORD(l)   ((USHORT)((ULONG_PTR)(l)))
00011 #define HIWORD(l)   ((USHORT)(((ULONG_PTR)(l)>>16)&0xFFFF))
00012 
00013 
00014 /*
00015  * VBE Command Definitions
00016  */
00017 
00018 #define VBE_GET_CONTROLLER_INFORMATION       0x4F00
00019 #define VBE_GET_MODE_INFORMATION             0x4F01
00020 #define VBE_SET_VBE_MODE                     0x4F02
00021 #define VBE_GET_CURRENT_VBE_MODE             0x4F03
00022 #define VBE_SAVE_RESTORE_STATE               0x4F04
00023 #define VBE_DISPLAY_WINDOW_CONTROL           0x4F05
00024 #define VBE_SET_GET_LOGICAL_SCAN_LINE_LENGTH 0x4F06
00025 #define VBE_SET_GET_DISPLAY_START            0x4F07
00026 #define VBE_SET_GET_DAC_PALETTE_FORMAT       0x4F08
00027 #define VBE_SET_GET_PALETTE_DATA             0x4F09
00028 
00029 /* VBE 2.0+ */
00030 #define VBE_RETURN_PROTECTED_MODE_INTERFACE  0x4F0A
00031 #define VBE_GET_SET_PIXEL_CLOCK              0x4F0B
00032 
00033 /* Extensions */
00034 #define VBE_POWER_MANAGEMENT_EXTENSIONS      0x4F10
00035 #define VBE_FLAT_PANEL_INTERFACE_EXTENSIONS  0x4F11
00036 #define VBE_AUDIO_INTERFACE_EXTENSIONS       0x4F12
00037 #define VBE_OEM_EXTENSIONS                   0x4F13
00038 #define VBE_DISPLAY_DATA_CHANNEL             0x4F14
00039 #define VBE_DDC                              0x4F15
00040 
00041 /*
00042  * VBE DDC Sub-Functions
00043  */
00044 
00045 #define VBE_DDC_READ_EDID                      0x01
00046 #define VBE_DDC_REPORT_CAPABILITIES            0x10
00047 #define VBE_DDC_BEGIN_SCL_SDA_CONTROL          0x11
00048 #define VBE_DDC_END_SCL_SDA_CONTROL            0x12
00049 #define VBE_DDC_WRITE_SCL_CLOCK_LINE           0x13
00050 #define VBE_DDC_WRITE_SDA_DATA_LINE            0x14
00051 #define VBE_DDC_READ_SCL_CLOCK_LINE            0x15
00052 #define VBE_DDC_READ_SDA_DATA_LINE             0x16
00053 
00054 /*
00055  * VBE Video Mode Information Definitions
00056  */
00057 #define VBE_MODEATTR_VALID                      0x01
00058 #define VBE_MODEATTR_COLOR                      0x08
00059 #define VBE_MODEATTR_GRAPHICS                   0x10
00060 #define VBE_MODEATTR_NON_VGA                    0x20
00061 #define VBE_MODEATTR_NO_BANK_SWITCH             0x40
00062 #define VBE_MODEATTR_LINEAR                     0x80
00063 
00064 #define VBE_MODE_BITS                           8
00065 #define VBE_MODE_RESERVED_1                     0x200
00066 #define VBE_MODE_RESERVED_2                     0x400
00067 #define VBE_MODE_REFRESH_CONTROL                0x800
00068 #define VBE_MODE_ACCELERATED_1                  0x1000
00069 #define VBE_MODE_ACCELERATED_2                  0x2000
00070 #define VBE_MODE_LINEAR_FRAMEBUFFER             0x4000
00071 #define VBE_MODE_PRESERVE_DISPLAY               0x8000
00072 #define VBE_MODE_MASK                           ((1 << (VBE_MODE_BITS + 1)) - 1)
00073 
00074 #define VBE_MEMORYMODEL_PACKEDPIXEL            0x04
00075 #define VBE_MEMORYMODEL_DIRECTCOLOR            0x06
00076 
00077 /*
00078  * VBE Return Codes
00079  */
00080 
00081 #define VBE_SUCCESS                            0x4F
00082 #define VBE_UNSUCCESSFUL                      0x14F
00083 #define VBE_NOT_SUPPORTED                     0x24F
00084 #define VBE_FUNCTION_INVALID                  0x34F
00085 
00086 #define VBE_GETRETURNCODE(x) (x & 0xFFFF)
00087 
00088 #include <pshpack1.h>
00089 
00090 /*
00091  * VBE specification defined structure for general adapter info
00092  * returned by function VBE_GET_CONTROLLER_INFORMATION command.
00093  */
00094 
00095 typedef struct _VBE_CONTROLLER_INFO
00096 {
00097    ULONG Signature;
00098    USHORT Version;
00099    ULONG OemStringPtr;
00100    LONG Capabilities;
00101    ULONG VideoModePtr;
00102    USHORT TotalMemory;
00103    USHORT OemSoftwareRevision;
00104    ULONG OemVendorNamePtr;
00105    ULONG OemProductNamePtr;
00106    ULONG OemProductRevPtr;
00107    CHAR Reserved[222];
00108    CHAR OemData[256];
00109 } VBE_CONTROLLER_INFO, *PVBE_CONTROLLER_INFO;
00110 
00111 /*
00112  * VBE specification defined structure for specific video mode
00113  * info returned by function VBE_GET_MODE_INFORMATION command.
00114  */
00115 
00116 typedef struct _VBE_MODE_INFO
00117 {
00118    /* Mandatory information for all VBE revisions */
00119    USHORT ModeAttributes;
00120    UCHAR WinAAttributes;
00121    UCHAR WinBAttributes;
00122    USHORT WinGranularity;
00123    USHORT WinSize;
00124    USHORT WinASegment;
00125    USHORT WinBSegment;
00126    ULONG WinFuncPtr;
00127    USHORT BytesPerScanLine;
00128 
00129    /* Mandatory information for VBE 1.2 and above */
00130    USHORT XResolution;
00131    USHORT YResolution;
00132    UCHAR XCharSize;
00133    UCHAR YCharSize;
00134    UCHAR NumberOfPlanes;
00135    UCHAR BitsPerPixel;
00136    UCHAR NumberOfBanks;
00137    UCHAR MemoryModel;
00138    UCHAR BankSize;
00139    UCHAR NumberOfImagePages;
00140    UCHAR Reserved1;
00141 
00142    /* Direct Color fields (required for Direct/6 and YUV/7 memory models) */
00143    UCHAR RedMaskSize;
00144    UCHAR RedFieldPosition;
00145    UCHAR GreenMaskSize;
00146    UCHAR GreenFieldPosition;
00147    UCHAR BlueMaskSize;
00148    UCHAR BlueFieldPosition;
00149    UCHAR ReservedMaskSize;
00150    UCHAR ReservedFieldPosition;
00151    UCHAR DirectColorModeInfo;
00152 
00153    /* Mandatory information for VBE 2.0 and above */
00154    ULONG PhysBasePtr;
00155    ULONG Reserved2;
00156    USHORT Reserved3;
00157 
00158    /* Mandatory information for VBE 3.0 and above */
00159    USHORT LinBytesPerScanLine;
00160    UCHAR BnkNumberOfImagePages;
00161    UCHAR LinNumberOfImagePages;
00162    UCHAR LinRedMaskSize;
00163    UCHAR LinRedFieldPosition;
00164    UCHAR LinGreenMaskSize;
00165    UCHAR LinGreenFieldPosition;
00166    UCHAR LinBlueMaskSize;
00167    UCHAR LinBlueFieldPosition;
00168    UCHAR LinReservedMaskSize;
00169    UCHAR LinReservedFieldPosition;
00170    ULONG MaxPixelClock;
00171 
00172    CHAR Reserved4[190];
00173 } VBE_MODE_INFO, *PVBE_MODE_INFO;
00174 
00175 #include <poppack.h>
00176 
00177 typedef struct _VBE_INFO
00178 {
00179     VBE_CONTROLLER_INFO Info;
00180     VBE_MODE_INFO Modes;
00181     USHORT ModeArray[129];
00182 } VBE_INFO, *PVBE_INFO;
00183 
00184 C_ASSERT(sizeof(VBE_CONTROLLER_INFO) == 0x200);
00185 C_ASSERT(sizeof(VBE_MODE_INFO) == 0x100);
00186 
00187 typedef struct _VBE_COLOR_REGISTER
00188 {
00189     UCHAR Blue;
00190     UCHAR Green;
00191     UCHAR Red;
00192     UCHAR Pad;
00193 } VBE_COLOR_REGISTER, *PVBE_COLOR_REGISTER;
00194 
00195 VOID
00196 NTAPI
00197 InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension);
00198 
00199 VP_STATUS
00200 NTAPI
00201 VbeSetMode(IN PHW_DEVICE_EXTENSION VgaDeviceExtension,
00202          IN PVIDEOMODE VgaMode,
00203          OUT PULONG PhysPtrChange);
00204 
00205 VP_STATUS
00206 NTAPI
00207 VbeSetColorLookup(IN PHW_DEVICE_EXTENSION VgaExtension,
00208             IN PVIDEO_CLUT ClutBuffer);
00209 
00210 BOOLEAN
00211 NTAPI
00212 ValidateVbeInfo(IN PHW_DEVICE_EXTENSION VgaExtension,
00213                 IN PVBE_INFO VbeInfo);
00214 
00215 extern BOOLEAN g_bIntelBrookdaleBIOS;
00216 
00217 /* VBE2 magic number */
00218 #define VBE2_MAGIC ('V' + ('B' << 8) + ('E' << 16) + ('2' << 24))
00219 
00220 /* EOF */

Generated on Sat May 26 2012 04:36:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.