VesaBiosExtensions.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
/** @file
Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The
full text of the license may be found at
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _VESA_BIOS_EXTENSIONS_H_
#define _VESA_BIOS_EXTENSIONS_H_
//
// Turn on byte packing of data structures
//
#pragma pack(1)
//
// VESA BIOS Extensions status codes
//
#define VESA_BIOS_EXTENSIONS_STATUS_SUCCESS 0x004f
//
// VESA BIOS Extensions Services
//
#define VESA_BIOS_EXTENSIONS_RETURN_CONTROLLER_INFORMATION 0x4f00
/*++
Routine Description:
Function 00 : Return Controller Information
Arguments:
Inputs:
AX = 0x4f00
ES:DI = Pointer to buffer to place VESA_BIOS_EXTENSIONS_INFORMATION_BLOCK structure
Outputs:
AX = Return Status
--*/
#define VESA_BIOS_EXTENSIONS_RETURN_MODE_INFORMATION 0x4f01
/*++
Routine Description:
Function 01 : Return Mode Information
Arguments:
Inputs:
AX = 0x4f01
CX = Mode Number
ES:DI = Pointer to buffer to place VESA_BIOS_EXTENSIONS_MODE_INFORMATION_BLOCK structure
Outputs:
AX = Return Status
--*/
#define VESA_BIOS_EXTENSIONS_SET_MODE 0x4f02
/*++
Routine Description:
Function 02 : Set Mode
Arguments:
Inputs:
AX = 0x4f02
BX = Desired mode to set
D0-D8 = Mode Number
D9-D10 = Reserved (must be 0)
D11 = 0 - Use current default refresh rate
= 1 - Use user specfieid CRTC values for refresh rate
D12-D13 = Reserved (must be 0)
D14 = 0 - Use windowed frame buffer model
D15 = 0 - Clear display memory
= 1 - Don't clear display memory
ES:DI = Pointer to buffer to the VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK structure
Outputs:
AX = Return Status
--*/
#define VESA_BIOS_EXTENSIONS_RETURN_CURRENT_MODE 0x4f03
/*++
Routine Description:
Function 03 : Return Current Mode
Arguments:
Inputs:
AX = 0x4f03
Outputs:
AX = Return Status
BX = Current mode
D0-D13 = Mode Number
D14 = 0 - Windowed frame buffer model
D15 = 0 - Memory cleared at last mode set
= 1 - Memory not cleared at last mode set
--*/
#define VESA_BIOS_EXTENSIONS_SAVE_RESTORE_STATE 0x4f04
/*++
Routine Description:
Arguments:
Inputs:
AX = 0x4f03
= 0x01 - Save State
= 0x02 - Restore State
CX = Requested Status
ES:BX = Pointer to buffer if DL=1 or DL=2
Outputs:
AX = Return Status
BX = Number of 64 byte blocks to hold the state buffer if DL=0
--*/
#define VESA_BIOS_EXTENSIONS_EDID 0x4f15
/*++
Routine Description:
Arguments:
Inputs:
AX = 0x4f15
CX = 0x00 - Controller unit number (00 = primary controller)
ES:DI = Null pointer, must be 0:0 in version 1.0
Outputs:
AX = Return Status
BH = Approx. time in seconds, rounded up, to transfer one EDID block(128 bytes)
BL = DDC level supported
D0 = 0 DDC1 not supported
= 1 DDC1 supported
D1 = 0 DDC2 not supported
= 1 DDC2 supported
D2 = 0 Screen not blanked during data transfer
= 1 Screen blanked during data transfer
Inputs:
AX = 0x4f15
BL = 0x01 - Read EDID
CX = 0x00 - Controller unit number (00 = primary controller)
DX = 0x00 - EDID block number
ES:DI = Pointer to buffer in which the EDID block is returned
Outputs:
AX = Return Status
--*/
//
// Timing data from EDID data block
//
#define VESA_BIOS_EXTENSIONS_EDID_BLOCK_SIZE 128
typedef struct {
typedef struct {
typedef struct {
//
// Super VGA Information Block
//
typedef struct {
//
// Super VGA Information Block VESASignature values
//
//
// Super VGA Information Block VESAVersion values
//
#define VESA_BIOS_EXTENSIONS_VERSION_1_2 0x0102
#define VESA_BIOS_EXTENSIONS_VERSION_2_0 0x0200
#define VESA_BIOS_EXTENSIONS_VERSION_3_0 0x0300
//
// Super VGA Information Block Capabilities field bit defintions
//
//
// 1: Controller is not VGA compatible
//
// 1: Use blank bit in function 9 to program RAMDAC
//
#define VESA_BIOS_EXTENSIONS_CAPABILITY_STEREOSCOPIC 0x08 // 0: No hardware stereoscopic signal support
// 1: Hardware stereoscopic signal support
//
#define VESA_BIOS_EXTENSIONS_CAPABILITY_VESA_EVC 0x10 // 0: Stero signaling supported via external VESA stereo connector
// 1: Stero signaling supported via VESA EVC connector
//
// Super VGA mode number bite field definitions
//
// 1: A VESA defined VBE mode
//
#define VESA_BIOS_EXTENSIONS_MODE_NUMBER_REFRESH_CONTROL_USER 0x0800 // 0: Use current BIOS default referesh rate
// 1: Use the user specified CRTC values for refresh rate
//
#define VESA_BIOS_EXTENSIONS_MODE_NUMBER_LINEAR_FRAME_BUFFER 0x4000 // 0: Use a banked/windowed frame buffer
//
// 1: Preseve display memory
//
// Super VGA Information Block mode list terminator value
//
#define VESA_BIOS_EXTENSIONS_END_OF_MODE_LIST 0xffff
//
// Window Function
//
typedef
);
//
// Super VGA Mode Information Block
//
typedef struct {
//
// Manadory fields for all VESA Bios Extensions revisions
//
//
// Manadory fields for VESA Bios Extensions 1.2 and above
//
//
// Manadory fields for VESA Bios Extensions 2.0 and above
//
//
// Manadory fields for VESA Bios Extensions 3.0 and above
//
//
// Super VGA Mode Information Block ModeAttributes field bit defintions
//
// 1: Mode supported in handware
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_TTY 0x0004 // 0: TTY Output functions not supported by BIOS
// 1: TTY Output functions supported by BIOS
//
// 1: Color mode
//
// 1: Graphics mode
//
// 1: Not a VGA compatible mode
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_NOT_WINDOWED 0x0040 // 0: VGA compatible windowed memory mode
// 1: Not a VGA compatible windowed memory mode
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_LINEAR_FRAME_BUFFER 0x0080 // 0: No linear fram buffer mode available
// 1: Linear frame buffer mode available
//
// 1: Double scan mode available
//
// 1: Interlaced mode is available
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_NO_TRIPPLE_BUFFER 0x0400 // 0: No hardware triple buffer mode support available
// 1: Hardware triple buffer mode support available
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_STEREOSCOPIC 0x0800 // 0: No hardware steroscopic display support
// 1: Hardware steroscopic display support
//
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_DUAL_DISPLAY 0x1000 // 0: No dual display start address support
// 1: Dual display start address support
//
// Super VGA Mode Information Block WinAAttribite/WinBAttributes field bit defintions
//
#define VESA_BIOS_EXTENSIONS_WINX_ATTRIBUTE_RELOCATABLE 0x01 // 0: Single non-relocatable window only
// 1: Relocatable window(s) are supported
//
// 1: Window is readable
//
// 1: Window is writable
//
// Super VGA Mode Information Block DirectColorMode field bit defintions
//
// 1: Color ramp is programmable
//
#define VESA_BIOS_EXTENSIONS_DIRECT_COLOR_MODE_RSVD_USABLE 0x02 // 0: Bits in Rsvd field are reserved
// 1: Bits in Rsdv field are usable
//
// Super VGA Memory Models
//
typedef enum {
//
// Super VGA CRTC Information Block
//
typedef struct {
// 1: Graphics mode is double scanned
//
// 1: Graphics mode is interlaced
//
#define VESA_BIOS_EXTENSIONS_CRTC_HORIZONTAL_SYNC_NEGATIVE 0x04 // 0: Horizontal sync polarity is positive(+)
// 0: Horizontal sync polarity is negative(-)
//
#define VESA_BIOS_EXTENSIONS_CRTC_VERITICAL_SYNC_NEGATIVE 0x08 // 0: Verical sync polarity is positive(+)
// 0: Verical sync polarity is negative(-)
//
// Turn off byte packing of data structures
//
#pragma pack()
#endif