OvmfPkg: remove Csm/BiosThunk/VideoDxe
Csm/BiosThunk/VideoDxe is not used by any platform at this point, remove it. This patch removes mentions of the following CSM resources from the source code: - GUIDs (protocols or otherwise): - gEfiLegacyBiosGuid - gEfiLegacyBiosProtocolGuid - gEfiVgaMiniPortProtocolGuid - headers: - FrameworkDxe.h - Guid/LegacyBios.h - Protocol/LegacyBios.h - Protocol/VgaMiniPort.h - PCDs: - PcdBiosVideoCheckVbeEnable - PcdBiosVideoCheckVgaEnable - PcdBiosVideoSetTextVgaModeEnable which extends the list of resources scheduled for removal to: - GUIDs (protocols or otherwise): - gEfiLegacyBiosGuid - gEfiLegacyBiosProtocolGuid - gEfiVgaMiniPortProtocolGuid - headers: - FrameworkDxe.h - Guid/LegacyBios.h - Protocol/LegacyBios.h - Protocol/VgaMiniPort.h - PCDs: - PcdBiosVideoCheckVbeEnable - PcdBiosVideoCheckVgaEnable - PcdBiosVideoSetTextVgaModeEnable Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4588 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20231110235820.644381-10-lersek@redhat.com> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Acked-by: Corvin Köhne <corvink@FreeBSD.org> Acked-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
ac79397267
commit
59dc8743ce
File diff suppressed because it is too large
Load Diff
@@ -1,524 +0,0 @@
|
|||||||
/** @file
|
|
||||||
|
|
||||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#ifndef _BIOS_GRAPHICS_OUTPUT_H_
|
|
||||||
#define _BIOS_GRAPHICS_OUTPUT_H_
|
|
||||||
|
|
||||||
#include <FrameworkDxe.h>
|
|
||||||
|
|
||||||
#include <Protocol/PciIo.h>
|
|
||||||
#include <Protocol/EdidActive.h>
|
|
||||||
#include <Protocol/DevicePath.h>
|
|
||||||
#include <Protocol/EdidDiscovered.h>
|
|
||||||
#include <Protocol/LegacyBios.h>
|
|
||||||
#include <Protocol/VgaMiniPort.h>
|
|
||||||
#include <Protocol/GraphicsOutput.h>
|
|
||||||
#include <Protocol/EdidOverride.h>
|
|
||||||
|
|
||||||
#include <Guid/StatusCodeDataTypeId.h>
|
|
||||||
#include <Guid/LegacyBios.h>
|
|
||||||
#include <Guid/EventGroup.h>
|
|
||||||
|
|
||||||
#include <Library/PcdLib.h>
|
|
||||||
#include <Library/DebugLib.h>
|
|
||||||
#include <Library/ReportStatusCodeLib.h>
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
|
||||||
#include <Library/UefiDriverEntryPoint.h>
|
|
||||||
#include <Library/UefiBootServicesTableLib.h>
|
|
||||||
#include <Library/UefiLib.h>
|
|
||||||
#include <Library/DevicePathLib.h>
|
|
||||||
#include <Library/MemoryAllocationLib.h>
|
|
||||||
|
|
||||||
#include <IndustryStandard/Pci.h>
|
|
||||||
#include "VesaBiosExtensions.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// Packed format support: The number of bits reserved for each of the colors and the actual
|
|
||||||
// position of RGB in the frame buffer is specified in the VBE Mode information
|
|
||||||
//
|
|
||||||
typedef struct {
|
|
||||||
UINT8 Position; // Position of the color
|
|
||||||
UINT8 Mask; // The number of bits expressed as a mask
|
|
||||||
} BIOS_VIDEO_COLOR_PLACEMENT;
|
|
||||||
|
|
||||||
//
|
|
||||||
// BIOS Graphics Output Graphical Mode Data
|
|
||||||
//
|
|
||||||
typedef struct {
|
|
||||||
UINT16 VbeModeNumber;
|
|
||||||
UINT16 BytesPerScanLine;
|
|
||||||
VOID *LinearFrameBuffer;
|
|
||||||
UINTN FrameBufferSize;
|
|
||||||
UINT32 HorizontalResolution;
|
|
||||||
UINT32 VerticalResolution;
|
|
||||||
UINT32 ColorDepth;
|
|
||||||
UINT32 RefreshRate;
|
|
||||||
UINT32 BitsPerPixel;
|
|
||||||
BIOS_VIDEO_COLOR_PLACEMENT Red;
|
|
||||||
BIOS_VIDEO_COLOR_PLACEMENT Green;
|
|
||||||
BIOS_VIDEO_COLOR_PLACEMENT Blue;
|
|
||||||
BIOS_VIDEO_COLOR_PLACEMENT Reserved;
|
|
||||||
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
|
||||||
EFI_PIXEL_BITMASK PixelBitMask;
|
|
||||||
} BIOS_VIDEO_MODE_DATA;
|
|
||||||
|
|
||||||
//
|
|
||||||
// BIOS video child handle private data Structure
|
|
||||||
//
|
|
||||||
#define BIOS_VIDEO_DEV_SIGNATURE SIGNATURE_32 ('B', 'V', 'M', 'p')
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINTN Signature;
|
|
||||||
EFI_HANDLE Handle;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Consumed Protocols
|
|
||||||
//
|
|
||||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
|
||||||
EFI_LEGACY_BIOS_PROTOCOL *LegacyBios;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Produced Protocols
|
|
||||||
//
|
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
|
|
||||||
EFI_EDID_DISCOVERED_PROTOCOL EdidDiscovered;
|
|
||||||
EFI_EDID_ACTIVE_PROTOCOL EdidActive;
|
|
||||||
EFI_VGA_MINI_PORT_PROTOCOL VgaMiniPort;
|
|
||||||
|
|
||||||
//
|
|
||||||
// General fields
|
|
||||||
//
|
|
||||||
BOOLEAN VgaCompatible;
|
|
||||||
BOOLEAN ProduceGraphicsOutput;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Graphics Output Protocol related fields
|
|
||||||
//
|
|
||||||
BOOLEAN HardwareNeedsStarting;
|
|
||||||
UINTN CurrentMode;
|
|
||||||
UINTN MaxMode;
|
|
||||||
BIOS_VIDEO_MODE_DATA *ModeData;
|
|
||||||
UINT8 *LineBuffer;
|
|
||||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VbeFrameBuffer;
|
|
||||||
UINT8 *VgaFrameBuffer;
|
|
||||||
|
|
||||||
//
|
|
||||||
// VESA Bios Extensions related fields
|
|
||||||
//
|
|
||||||
UINTN NumberOfPagesBelow1MB; // Number of 4KB pages in PagesBelow1MB
|
|
||||||
EFI_PHYSICAL_ADDRESS PagesBelow1MB; // Buffer for all VBE Information Blocks
|
|
||||||
VESA_BIOS_EXTENSIONS_INFORMATION_BLOCK *VbeInformationBlock; // 0x200 bytes. Must be allocated below 1MB
|
|
||||||
VESA_BIOS_EXTENSIONS_MODE_INFORMATION_BLOCK *VbeModeInformationBlock; // 0x100 bytes. Must be allocated below 1MB
|
|
||||||
VESA_BIOS_EXTENSIONS_EDID_DATA_BLOCK *VbeEdidDataBlock; // 0x80 bytes. Must be allocated below 1MB
|
|
||||||
VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK *VbeCrtcInformationBlock; // 59 bytes. Must be allocated below 1MB
|
|
||||||
UINTN VbeSaveRestorePages; // Number of 4KB pages in VbeSaveRestoreBuffer
|
|
||||||
EFI_PHYSICAL_ADDRESS VbeSaveRestoreBuffer; // Must be allocated below 1MB
|
|
||||||
//
|
|
||||||
// Status code
|
|
||||||
//
|
|
||||||
EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
|
|
||||||
|
|
||||||
EFI_EVENT ExitBootServicesEvent;
|
|
||||||
} BIOS_VIDEO_DEV;
|
|
||||||
|
|
||||||
#define BIOS_VIDEO_DEV_FROM_PCI_IO_THIS(a) CR (a, BIOS_VIDEO_DEV, PciIo, BIOS_VIDEO_DEV_SIGNATURE)
|
|
||||||
#define BIOS_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS(a) CR (a, BIOS_VIDEO_DEV, GraphicsOutput, BIOS_VIDEO_DEV_SIGNATURE)
|
|
||||||
#define BIOS_VIDEO_DEV_FROM_VGA_MINI_PORT_THIS(a) CR (a, BIOS_VIDEO_DEV, VgaMiniPort, BIOS_VIDEO_DEV_SIGNATURE)
|
|
||||||
|
|
||||||
#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff
|
|
||||||
|
|
||||||
//
|
|
||||||
// Global Variables
|
|
||||||
//
|
|
||||||
extern EFI_DRIVER_BINDING_PROTOCOL gBiosVideoDriverBinding;
|
|
||||||
extern EFI_COMPONENT_NAME_PROTOCOL gBiosVideoComponentName;
|
|
||||||
extern EFI_COMPONENT_NAME2_PROTOCOL gBiosVideoComponentName2;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Driver Binding Protocol functions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
Supported.
|
|
||||||
|
|
||||||
@param This Pointer to driver binding protocol
|
|
||||||
@param Controller Controller handle to connect
|
|
||||||
@param RemainingDevicePath A pointer to the remaining portion of a device
|
|
||||||
path
|
|
||||||
|
|
||||||
@retval EFI_STATUS EFI_SUCCESS:This controller can be managed by this
|
|
||||||
driver, Otherwise, this controller cannot be
|
|
||||||
managed by this driver
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoDriverBindingSupported (
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Install Graphics Output Protocol onto VGA device handles.
|
|
||||||
|
|
||||||
@param This Pointer to driver binding protocol
|
|
||||||
@param Controller Controller handle to connect
|
|
||||||
@param RemainingDevicePath A pointer to the remaining portion of a device
|
|
||||||
path
|
|
||||||
|
|
||||||
@return EFI_STATUS
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoDriverBindingStart (
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Stop.
|
|
||||||
|
|
||||||
@param This Pointer to driver binding protocol
|
|
||||||
@param Controller Controller handle to connect
|
|
||||||
@param NumberOfChildren Number of children handle created by this driver
|
|
||||||
@param ChildHandleBuffer Buffer containing child handle created
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Driver disconnected successfully from controller
|
|
||||||
@retval EFI_UNSUPPORTED Cannot find BIOS_VIDEO_DEV structure
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoDriverBindingStop (
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE Controller,
|
|
||||||
IN UINTN NumberOfChildren,
|
|
||||||
IN EFI_HANDLE *ChildHandleBuffer
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Private worker functions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
Check for VBE device.
|
|
||||||
|
|
||||||
@param BiosVideoPrivate Pointer to BIOS_VIDEO_DEV structure
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS VBE device found
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
BiosVideoCheckForVbe (
|
|
||||||
IN OUT BIOS_VIDEO_DEV *BiosVideoPrivate
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Check for VGA device.
|
|
||||||
|
|
||||||
@param BiosVideoPrivate Pointer to BIOS_VIDEO_DEV structure
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Standard VGA device found
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
BiosVideoCheckForVga (
|
|
||||||
IN OUT BIOS_VIDEO_DEV *BiosVideoPrivate
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Release resource for BIOS video instance.
|
|
||||||
|
|
||||||
@param BiosVideoPrivate Video child device private data structure
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
BiosVideoDeviceReleaseResource (
|
|
||||||
BIOS_VIDEO_DEV *BiosVideoPrivate
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// BIOS Graphics Output Protocol functions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
Graphics Output protocol interface to get video mode.
|
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
|
||||||
@param ModeNumber The mode number to return information on.
|
|
||||||
@param SizeOfInfo A pointer to the size, in bytes, of the Info
|
|
||||||
buffer.
|
|
||||||
@param Info Caller allocated buffer that returns information
|
|
||||||
about ModeNumber.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Mode information returned.
|
|
||||||
@retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.
|
|
||||||
@retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the
|
|
||||||
video mode.
|
|
||||||
@retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
|
|
||||||
@retval EFI_INVALID_PARAMETER One of the input args was NULL.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoGraphicsOutputQueryMode (
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
|
||||||
IN UINT32 ModeNumber,
|
|
||||||
OUT UINTN *SizeOfInfo,
|
|
||||||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Graphics Output protocol interface to set video mode.
|
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
|
||||||
@param ModeNumber The mode number to be set.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS Graphics mode was changed.
|
|
||||||
@retval EFI_DEVICE_ERROR The device had an error and could not complete the
|
|
||||||
request.
|
|
||||||
@retval EFI_UNSUPPORTED ModeNumber is not supported by this device.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoGraphicsOutputSetMode (
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
|
||||||
IN UINT32 ModeNumber
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Graphics Output protocol instance to block transfer for VBE device.
|
|
||||||
|
|
||||||
@param This Pointer to Graphics Output protocol instance
|
|
||||||
@param BltBuffer The data to transfer to screen
|
|
||||||
@param BltOperation The operation to perform
|
|
||||||
@param SourceX The X coordinate of the source for BltOperation
|
|
||||||
@param SourceY The Y coordinate of the source for BltOperation
|
|
||||||
@param DestinationX The X coordinate of the destination for
|
|
||||||
BltOperation
|
|
||||||
@param DestinationY The Y coordinate of the destination for
|
|
||||||
BltOperation
|
|
||||||
@param Width The width of a rectangle in the blt rectangle in
|
|
||||||
pixels
|
|
||||||
@param Height The height of a rectangle in the blt rectangle in
|
|
||||||
pixels
|
|
||||||
@param Delta Not used for EfiBltVideoFill and
|
|
||||||
EfiBltVideoToVideo operation. If a Delta of 0 is
|
|
||||||
used, the entire BltBuffer will be operated on. If
|
|
||||||
a subrectangle of the BltBuffer is used, then
|
|
||||||
Delta represents the number of bytes in a row of
|
|
||||||
the BltBuffer.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter passed in
|
|
||||||
@retval EFI_SUCCESS Blt operation success
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoGraphicsOutputVbeBlt (
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
|
||||||
IN UINTN SourceX,
|
|
||||||
IN UINTN SourceY,
|
|
||||||
IN UINTN DestinationX,
|
|
||||||
IN UINTN DestinationY,
|
|
||||||
IN UINTN Width,
|
|
||||||
IN UINTN Height,
|
|
||||||
IN UINTN Delta
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Graphics Output protocol instance to block transfer for VGA device.
|
|
||||||
|
|
||||||
@param This Pointer to Graphics Output protocol instance
|
|
||||||
@param BltBuffer The data to transfer to screen
|
|
||||||
@param BltOperation The operation to perform
|
|
||||||
@param SourceX The X coordinate of the source for BltOperation
|
|
||||||
@param SourceY The Y coordinate of the source for BltOperation
|
|
||||||
@param DestinationX The X coordinate of the destination for
|
|
||||||
BltOperation
|
|
||||||
@param DestinationY The Y coordinate of the destination for
|
|
||||||
BltOperation
|
|
||||||
@param Width The width of a rectangle in the blt rectangle in
|
|
||||||
pixels
|
|
||||||
@param Height The height of a rectangle in the blt rectangle in
|
|
||||||
pixels
|
|
||||||
@param Delta Not used for EfiBltVideoFill and
|
|
||||||
EfiBltVideoToVideo operation. If a Delta of 0 is
|
|
||||||
used, the entire BltBuffer will be operated on. If
|
|
||||||
a subrectangle of the BltBuffer is used, then
|
|
||||||
Delta represents the number of bytes in a row of
|
|
||||||
the BltBuffer.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Invalid parameter passed in
|
|
||||||
@retval EFI_SUCCESS Blt operation success
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoGraphicsOutputVgaBlt (
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer OPTIONAL,
|
|
||||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
|
||||||
IN UINTN SourceX,
|
|
||||||
IN UINTN SourceY,
|
|
||||||
IN UINTN DestinationX,
|
|
||||||
IN UINTN DestinationY,
|
|
||||||
IN UINTN Width,
|
|
||||||
IN UINTN Height,
|
|
||||||
IN UINTN Delta
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// BIOS VGA Mini Port Protocol functions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
VgaMiniPort protocol interface to set mode.
|
|
||||||
|
|
||||||
@param This Pointer to VgaMiniPort protocol instance
|
|
||||||
@param ModeNumber The index of the mode
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The requested mode is not supported
|
|
||||||
@retval EFI_SUCCESS The requested mode is set successfully
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoVgaMiniPortSetMode (
|
|
||||||
IN EFI_VGA_MINI_PORT_PROTOCOL *This,
|
|
||||||
IN UINTN ModeNumber
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Event handler for Exit Boot Service.
|
|
||||||
|
|
||||||
@param Event The event that be signalled when exiting boot service.
|
|
||||||
@param Context Pointer to instance of BIOS_VIDEO_DEV.
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoNotifyExitBootServices (
|
|
||||||
IN EFI_EVENT Event,
|
|
||||||
IN VOID *Context
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Standard VGA Definitions
|
|
||||||
//
|
|
||||||
#define VGA_HORIZONTAL_RESOLUTION 640
|
|
||||||
#define VGA_VERTICAL_RESOLUTION 480
|
|
||||||
#define VGA_NUMBER_OF_BIT_PLANES 4
|
|
||||||
#define VGA_PIXELS_PER_BYTE 8
|
|
||||||
#define VGA_BYTES_PER_SCAN_LINE (VGA_HORIZONTAL_RESOLUTION / VGA_PIXELS_PER_BYTE)
|
|
||||||
#define VGA_BYTES_PER_BIT_PLANE (VGA_VERTICAL_RESOLUTION * VGA_BYTES_PER_SCAN_LINE)
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_ADDRESS_REGISTER 0x3ce
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_DATA_REGISTER 0x3cf
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_SET_RESET_REGISTER 0x00
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_ENABLE_SET_RESET_REGISTER 0x01
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_COLOR_COMPARE_REGISTER 0x02
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_DATA_ROTATE_REGISTER 0x03
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_FUNCTION_REPLACE 0x00
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_FUNCTION_AND 0x08
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_FUNCTION_OR 0x10
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_FUNCTION_XOR 0x18
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_READ_MAP_SELECT_REGISTER 0x04
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_MODE_REGISTER 0x05
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_READ_MODE_0 0x00
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_READ_MODE_1 0x08
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_0 0x00
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_1 0x01
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_2 0x02
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_3 0x03
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_MISCELLANEOUS_REGISTER 0x06
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_COLOR_DONT_CARE_REGISTER 0x07
|
|
||||||
|
|
||||||
#define VGA_GRAPHICS_CONTROLLER_BIT_MASK_REGISTER 0x08
|
|
||||||
|
|
||||||
/**
|
|
||||||
Install child handles if the Handle supports MBR format.
|
|
||||||
|
|
||||||
@param This Calling context.
|
|
||||||
@param ParentHandle Parent Handle
|
|
||||||
@param ParentPciIo Parent PciIo interface
|
|
||||||
@param ParentLegacyBios Parent LegacyBios interface
|
|
||||||
@param ParentDevicePath Parent Device Path
|
|
||||||
@param RemainingDevicePath Remaining Device Path
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS If a child handle was added
|
|
||||||
@retval other A child handle was not added
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
BiosVideoChildHandleInstall (
|
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE ParentHandle,
|
|
||||||
IN EFI_PCI_IO_PROTOCOL *ParentPciIo,
|
|
||||||
IN EFI_LEGACY_BIOS_PROTOCOL *ParentLegacyBios,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath,
|
|
||||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Deregister an video child handle and free resources.
|
|
||||||
|
|
||||||
@param This Protocol instance pointer.
|
|
||||||
@param Controller Video controller handle
|
|
||||||
@param Handle Video child handle
|
|
||||||
|
|
||||||
@return EFI_STATUS
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
BiosVideoChildHandleUninstall (
|
|
||||||
EFI_DRIVER_BINDING_PROTOCOL *This,
|
|
||||||
EFI_HANDLE Controller,
|
|
||||||
EFI_HANDLE Handle
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Release resource for BIOS video instance.
|
|
||||||
|
|
||||||
@param BiosVideoPrivate Video child device private data structure
|
|
||||||
|
|
||||||
**/
|
|
||||||
VOID
|
|
||||||
BiosVideoDeviceReleaseResource (
|
|
||||||
BIOS_VIDEO_DEV *BiosVideoPrivate
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Check if all video child handles have been uninstalled.
|
|
||||||
|
|
||||||
@param Controller Video controller handle
|
|
||||||
|
|
||||||
@return TRUE Child handles exist.
|
|
||||||
@return FALSE All video child handles have been uninstalled.
|
|
||||||
|
|
||||||
**/
|
|
||||||
BOOLEAN
|
|
||||||
HasChildHandle (
|
|
||||||
IN EFI_HANDLE Controller
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
|
@@ -1,17 +0,0 @@
|
|||||||
// /** @file
|
|
||||||
// Video driver based on legacy bios.
|
|
||||||
//
|
|
||||||
// This driver by using Legacy Bios protocol service to support csm Video
|
|
||||||
// and produce Graphics Output Protocol.
|
|
||||||
//
|
|
||||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
//
|
|
||||||
// **/
|
|
||||||
|
|
||||||
|
|
||||||
#string STR_MODULE_ABSTRACT #language en-US "Video driver based on legacy bios"
|
|
||||||
|
|
||||||
#string STR_MODULE_DESCRIPTION #language en-US "This driver uses the Legacy Bios protocol service to utilize the CSM Video Support and produce the Graphics Output Protocol."
|
|
||||||
|
|
@@ -1,14 +0,0 @@
|
|||||||
// /** @file
|
|
||||||
// BiosVideoDxe Localized Strings and Content
|
|
||||||
//
|
|
||||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
//
|
|
||||||
// **/
|
|
||||||
|
|
||||||
#string STR_PROPERTIES_MODULE_NAME
|
|
||||||
#language en-US
|
|
||||||
"Legacy Video DXE Driver"
|
|
||||||
|
|
||||||
|
|
@@ -1,304 +0,0 @@
|
|||||||
/** @file
|
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#include "BiosVideo.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// EFI Component Name Functions
|
|
||||||
//
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves a Unicode string that is the user readable name of the driver.
|
|
||||||
|
|
||||||
This function retrieves the user readable name of a driver in the form of a
|
|
||||||
Unicode string. If the driver specified by This has a user readable name in
|
|
||||||
the language specified by Language, then a pointer to the driver name is
|
|
||||||
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
|
||||||
by This does not support the language specified by Language,
|
|
||||||
then EFI_UNSUPPORTED is returned.
|
|
||||||
|
|
||||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
|
|
||||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
|
||||||
array indicating the language. This is the
|
|
||||||
language of the driver name that the caller is
|
|
||||||
requesting, and it must match one of the
|
|
||||||
languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up
|
|
||||||
to the driver writer. Language is specified
|
|
||||||
in RFC 4646 or ISO 639-2 language code format.
|
|
||||||
|
|
||||||
@param DriverName[out] A pointer to the Unicode string to return.
|
|
||||||
This Unicode string is the name of the
|
|
||||||
driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
|
||||||
This and the language specified by Language was
|
|
||||||
returned in DriverName.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
|
||||||
the language specified by Language.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoComponentNameGetDriverName (
|
|
||||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
|
||||||
IN CHAR8 *Language,
|
|
||||||
OUT CHAR16 **DriverName
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by a driver.
|
|
||||||
|
|
||||||
This function retrieves the user readable name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
|
||||||
driver specified by This has a user readable name in the language specified by
|
|
||||||
Language, then a pointer to the controller name is returned in ControllerName,
|
|
||||||
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
|
||||||
managing the controller specified by ControllerHandle and ChildHandle,
|
|
||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
|
||||||
|
|
||||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
|
|
||||||
@param ControllerHandle[in] The handle of a controller that the driver
|
|
||||||
specified by This is managing. This handle
|
|
||||||
specifies the controller whose name is to be
|
|
||||||
returned.
|
|
||||||
|
|
||||||
@param ChildHandle[in] The handle of the child controller to retrieve
|
|
||||||
the name of. This is an optional parameter that
|
|
||||||
may be NULL. It will be NULL for device
|
|
||||||
drivers. It will also be NULL for a bus drivers
|
|
||||||
that wish to retrieve the name of the bus
|
|
||||||
controller. It will not be NULL for a bus
|
|
||||||
driver that wishes to retrieve the name of a
|
|
||||||
child controller.
|
|
||||||
|
|
||||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
|
||||||
array indicating the language. This is the
|
|
||||||
language of the driver name that the caller is
|
|
||||||
requesting, and it must match one of the
|
|
||||||
languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up
|
|
||||||
to the driver writer. Language is specified in
|
|
||||||
RFC 4646 or ISO 639-2 language code format.
|
|
||||||
|
|
||||||
@param ControllerName[out] A pointer to the Unicode string to return.
|
|
||||||
This Unicode string is the name of the
|
|
||||||
controller specified by ControllerHandle and
|
|
||||||
ChildHandle in the language specified by
|
|
||||||
Language from the point of view of the driver
|
|
||||||
specified by This.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
|
||||||
the language specified by Language for the
|
|
||||||
driver specified by This was returned in
|
|
||||||
DriverName.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
|
||||||
the language specified by Language.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoComponentNameGetControllerName (
|
|
||||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE ControllerHandle,
|
|
||||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
|
||||||
IN CHAR8 *Language,
|
|
||||||
OUT CHAR16 **ControllerName
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// EFI Component Name Protocol
|
|
||||||
//
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gBiosVideoComponentName = {
|
|
||||||
BiosVideoComponentNameGetDriverName,
|
|
||||||
BiosVideoComponentNameGetControllerName,
|
|
||||||
"eng"
|
|
||||||
};
|
|
||||||
|
|
||||||
//
|
|
||||||
// EFI Component Name 2 Protocol
|
|
||||||
//
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gBiosVideoComponentName2 = {
|
|
||||||
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME)BiosVideoComponentNameGetDriverName,
|
|
||||||
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)BiosVideoComponentNameGetControllerName,
|
|
||||||
"en"
|
|
||||||
};
|
|
||||||
|
|
||||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mBiosVideoDriverNameTable[] = {
|
|
||||||
{
|
|
||||||
"eng;en",
|
|
||||||
L"BIOS[INT10] Video Driver"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
NULL,
|
|
||||||
NULL
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves a Unicode string that is the user readable name of the driver.
|
|
||||||
|
|
||||||
This function retrieves the user readable name of a driver in the form of a
|
|
||||||
Unicode string. If the driver specified by This has a user readable name in
|
|
||||||
the language specified by Language, then a pointer to the driver name is
|
|
||||||
returned in DriverName, and EFI_SUCCESS is returned. If the driver specified
|
|
||||||
by This does not support the language specified by Language,
|
|
||||||
then EFI_UNSUPPORTED is returned.
|
|
||||||
|
|
||||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
|
|
||||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
|
||||||
array indicating the language. This is the
|
|
||||||
language of the driver name that the caller is
|
|
||||||
requesting, and it must match one of the
|
|
||||||
languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up
|
|
||||||
to the driver writer. Language is specified
|
|
||||||
in RFC 4646 or ISO 639-2 language code format.
|
|
||||||
|
|
||||||
@param DriverName[out] A pointer to the Unicode string to return.
|
|
||||||
This Unicode string is the name of the
|
|
||||||
driver specified by This in the language
|
|
||||||
specified by Language.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string for the Driver specified by
|
|
||||||
This and the language specified by Language was
|
|
||||||
returned in DriverName.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER DriverName is NULL.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
|
||||||
the language specified by Language.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoComponentNameGetDriverName (
|
|
||||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
|
||||||
IN CHAR8 *Language,
|
|
||||||
OUT CHAR16 **DriverName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return LookupUnicodeString2 (
|
|
||||||
Language,
|
|
||||||
This->SupportedLanguages,
|
|
||||||
mBiosVideoDriverNameTable,
|
|
||||||
DriverName,
|
|
||||||
(BOOLEAN)(This == &gBiosVideoComponentName)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
Retrieves a Unicode string that is the user readable name of the controller
|
|
||||||
that is being managed by a driver.
|
|
||||||
|
|
||||||
This function retrieves the user readable name of the controller specified by
|
|
||||||
ControllerHandle and ChildHandle in the form of a Unicode string. If the
|
|
||||||
driver specified by This has a user readable name in the language specified by
|
|
||||||
Language, then a pointer to the controller name is returned in ControllerName,
|
|
||||||
and EFI_SUCCESS is returned. If the driver specified by This is not currently
|
|
||||||
managing the controller specified by ControllerHandle and ChildHandle,
|
|
||||||
then EFI_UNSUPPORTED is returned. If the driver specified by This does not
|
|
||||||
support the language specified by Language, then EFI_UNSUPPORTED is returned.
|
|
||||||
|
|
||||||
@param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or
|
|
||||||
EFI_COMPONENT_NAME_PROTOCOL instance.
|
|
||||||
|
|
||||||
@param ControllerHandle[in] The handle of a controller that the driver
|
|
||||||
specified by This is managing. This handle
|
|
||||||
specifies the controller whose name is to be
|
|
||||||
returned.
|
|
||||||
|
|
||||||
@param ChildHandle[in] The handle of the child controller to retrieve
|
|
||||||
the name of. This is an optional parameter that
|
|
||||||
may be NULL. It will be NULL for device
|
|
||||||
drivers. It will also be NULL for a bus drivers
|
|
||||||
that wish to retrieve the name of the bus
|
|
||||||
controller. It will not be NULL for a bus
|
|
||||||
driver that wishes to retrieve the name of a
|
|
||||||
child controller.
|
|
||||||
|
|
||||||
@param Language[in] A pointer to a Null-terminated ASCII string
|
|
||||||
array indicating the language. This is the
|
|
||||||
language of the driver name that the caller is
|
|
||||||
requesting, and it must match one of the
|
|
||||||
languages specified in SupportedLanguages. The
|
|
||||||
number of languages supported by a driver is up
|
|
||||||
to the driver writer. Language is specified in
|
|
||||||
RFC 4646 or ISO 639-2 language code format.
|
|
||||||
|
|
||||||
@param ControllerName[out] A pointer to the Unicode string to return.
|
|
||||||
This Unicode string is the name of the
|
|
||||||
controller specified by ControllerHandle and
|
|
||||||
ChildHandle in the language specified by
|
|
||||||
Language from the point of view of the driver
|
|
||||||
specified by This.
|
|
||||||
|
|
||||||
@retval EFI_SUCCESS The Unicode string for the user readable name in
|
|
||||||
the language specified by Language for the
|
|
||||||
driver specified by This was returned in
|
|
||||||
DriverName.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid
|
|
||||||
EFI_HANDLE.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER Language is NULL.
|
|
||||||
|
|
||||||
@retval EFI_INVALID_PARAMETER ControllerName is NULL.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This is not currently
|
|
||||||
managing the controller specified by
|
|
||||||
ControllerHandle and ChildHandle.
|
|
||||||
|
|
||||||
@retval EFI_UNSUPPORTED The driver specified by This does not support
|
|
||||||
the language specified by Language.
|
|
||||||
|
|
||||||
**/
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
BiosVideoComponentNameGetControllerName (
|
|
||||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
|
||||||
IN EFI_HANDLE ControllerHandle,
|
|
||||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
|
||||||
IN CHAR8 *Language,
|
|
||||||
OUT CHAR16 **ControllerName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
return EFI_UNSUPPORTED;
|
|
||||||
}
|
|
@@ -1,459 +0,0 @@
|
|||||||
/** @file
|
|
||||||
|
|
||||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
|
||||||
|
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
|
|
||||||
**/
|
|
||||||
|
|
||||||
#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
|
|
||||||
= 1 - Use linear/flat 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
|
|
||||||
= 1 - Linear/flat 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:
|
|
||||||
Function 04 : Save/Restore State
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Inputs:
|
|
||||||
AX = 0x4f03
|
|
||||||
DL = 0x00 - Return Save/Restore State buffer size
|
|
||||||
= 0x01 - Save State
|
|
||||||
= 0x02 - Restore State
|
|
||||||
CX = Requested Status
|
|
||||||
D0 = Save/Restore controller hardware state
|
|
||||||
D1 = Save/Restore BIOS data state
|
|
||||||
D2 = Save/Restore DAC state
|
|
||||||
D3 = Save/Restore Regsiter state
|
|
||||||
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:
|
|
||||||
Function 15 : implement VBE/DDC service
|
|
||||||
|
|
||||||
Arguments:
|
|
||||||
Inputs:
|
|
||||||
AX = 0x4f15
|
|
||||||
BL = 0x00 - Report VBE/DDC Capabilities
|
|
||||||
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
|
|
||||||
#define VESA_BIOS_EXTENSIONS_EDID_ESTABLISHED_TIMING_MAX_NUMBER 17
|
|
||||||
|
|
||||||
//
|
|
||||||
// Established Timings: 24 possible resolutions
|
|
||||||
// Standard Timings: 8 possible resolutions
|
|
||||||
// Detailed Timings: 4 possible resolutions
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_EDID_TIMING_MAX_NUMBER 36
|
|
||||||
|
|
||||||
//
|
|
||||||
// Timing data size for Established Timings, Standard Timings and Detailed Timings
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_ESTABLISHED_TIMING_SIZE 3
|
|
||||||
#define VESA_BIOS_EXTENSIONS_STANDARD_TIMING_SIZE 16
|
|
||||||
#define VESA_BIOS_EXTENSIONS_DETAILED_TIMING_EACH_DESCRIPTOR_SIZE 18
|
|
||||||
#define VESA_BIOS_EXTENSIONS_DETAILED_TIMING_DESCRIPTOR_MAX_SIZE 72
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINT16 HorizontalResolution;
|
|
||||||
UINT16 VerticalResolution;
|
|
||||||
UINT16 RefreshRate;
|
|
||||||
} VESA_BIOS_EXTENSIONS_EDID_TIMING;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINT32 ValidNumber;
|
|
||||||
UINT32 Key[VESA_BIOS_EXTENSIONS_EDID_TIMING_MAX_NUMBER];
|
|
||||||
} VESA_BIOS_EXTENSIONS_VALID_EDID_TIMING;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
UINT8 Header[8]; // EDID header "00 FF FF FF FF FF FF 00"
|
|
||||||
UINT16 ManufactureName; // EISA 3-character ID
|
|
||||||
UINT16 ProductCode; // Vendor assigned code
|
|
||||||
UINT32 SerialNumber; // 32-bit serial number
|
|
||||||
UINT8 WeekOfManufacture; // Week number
|
|
||||||
UINT8 YearOfManufacture; // Year
|
|
||||||
UINT8 EdidVersion; // EDID Structure Version
|
|
||||||
UINT8 EdidRevision; // EDID Structure Revision
|
|
||||||
UINT8 VideoInputDefinition;
|
|
||||||
UINT8 MaxHorizontalImageSize; // cm
|
|
||||||
UINT8 MaxVerticalImageSize; // cm
|
|
||||||
UINT8 DisplayTransferCharacteristic;
|
|
||||||
UINT8 FeatureSupport;
|
|
||||||
UINT8 RedGreenLowBits; // Rx1 Rx0 Ry1 Ry0 Gx1 Gx0 Gy1Gy0
|
|
||||||
UINT8 BlueWhiteLowBits; // Bx1 Bx0 By1 By0 Wx1 Wx0 Wy1 Wy0
|
|
||||||
UINT8 RedX; // Red-x Bits 9 - 2
|
|
||||||
UINT8 RedY; // Red-y Bits 9 - 2
|
|
||||||
UINT8 GreenX; // Green-x Bits 9 - 2
|
|
||||||
UINT8 GreenY; // Green-y Bits 9 - 2
|
|
||||||
UINT8 BlueX; // Blue-x Bits 9 - 2
|
|
||||||
UINT8 BlueY; // Blue-y Bits 9 - 2
|
|
||||||
UINT8 WhiteX; // White-x Bits 9 - 2
|
|
||||||
UINT8 WhiteY; // White-x Bits 9 - 2
|
|
||||||
UINT8 EstablishedTimings[VESA_BIOS_EXTENSIONS_ESTABLISHED_TIMING_SIZE];
|
|
||||||
UINT8 StandardTimingIdentification[VESA_BIOS_EXTENSIONS_STANDARD_TIMING_SIZE];
|
|
||||||
UINT8 DetailedTimingDescriptions[VESA_BIOS_EXTENSIONS_DETAILED_TIMING_DESCRIPTOR_MAX_SIZE];
|
|
||||||
UINT8 ExtensionFlag; // Number of (optional) 128-byte EDID extension blocks to follow
|
|
||||||
UINT8 Checksum;
|
|
||||||
} VESA_BIOS_EXTENSIONS_EDID_DATA_BLOCK;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Super VGA Information Block
|
|
||||||
//
|
|
||||||
typedef struct {
|
|
||||||
UINT32 VESASignature; // 'VESA' 4 byte signature
|
|
||||||
UINT16 VESAVersion; // VBE version number
|
|
||||||
UINT32 OEMStringPtr; // Pointer to OEM string
|
|
||||||
UINT32 Capabilities; // Capabilities of video card
|
|
||||||
UINT32 VideoModePtr; // Pointer to an array of 16-bit supported modes values terminated by 0xFFFF
|
|
||||||
UINT16 TotalMemory; // Number of 64kb memory blocks
|
|
||||||
UINT16 OemSoftwareRev; // VBE implementation Software revision
|
|
||||||
UINT32 OemVendorNamePtr; // VbeFarPtr to Vendor Name String
|
|
||||||
UINT32 OemProductNamePtr; // VbeFarPtr to Product Name String
|
|
||||||
UINT32 OemProductRevPtr; // VbeFarPtr to Product Revision String
|
|
||||||
UINT8 Reserved[222]; // Reserved for VBE implementation scratch area
|
|
||||||
UINT8 OemData[256]; // Data area for OEM strings. Pad to 512 byte block size
|
|
||||||
} VESA_BIOS_EXTENSIONS_INFORMATION_BLOCK;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Super VGA Information Block VESASignature values
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_VESA_SIGNATURE SIGNATURE_32 ('V', 'E', 'S', 'A')
|
|
||||||
#define VESA_BIOS_EXTENSIONS_VBE2_SIGNATURE SIGNATURE_32 ('V', 'B', 'E', '2')
|
|
||||||
|
|
||||||
//
|
|
||||||
// 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 definitions
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_CAPABILITY_8_BIT_DAC 0x01 // 0: DAC width is fixed at 6 bits/color
|
|
||||||
// 1: DAC width switchable to 8 bits/color
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_CAPABILITY_NOT_VGA 0x02 // 0: Controller is VGA compatible
|
|
||||||
// 1: Controller is not VGA compatible
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_CAPABILITY_NOT_NORMAL_RAMDAC 0x04 // 0: Normal RAMDAC operation
|
|
||||||
// 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
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_NUMBER_VESA 0x0100 // 0: Not a VESA defined VBE mode
|
|
||||||
// 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: Use a linear/flat frame buffer
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_NUMBER_PRESERVE_MEMORY 0x8000 // 0: Clear display memory
|
|
||||||
// 1: Preseve display memory
|
|
||||||
//
|
|
||||||
// Super VGA Information Block mode list terminator value
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_END_OF_MODE_LIST 0xffff
|
|
||||||
|
|
||||||
//
|
|
||||||
// Window Function
|
|
||||||
//
|
|
||||||
typedef
|
|
||||||
VOID
|
|
||||||
(*VESA_BIOS_EXTENSIONS_WINDOW_FUNCTION) (
|
|
||||||
VOID
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
// Super VGA Mode Information Block
|
|
||||||
//
|
|
||||||
typedef struct {
|
|
||||||
//
|
|
||||||
// Manadory fields for all VESA Bios Extensions revisions
|
|
||||||
//
|
|
||||||
UINT16 ModeAttributes; // Mode attributes
|
|
||||||
UINT8 WinAAttributes; // Window A attributes
|
|
||||||
UINT8 WinBAttributes; // Window B attributes
|
|
||||||
UINT16 WinGranularity; // Window granularity in k
|
|
||||||
UINT16 WinSize; // Window size in k
|
|
||||||
UINT16 WinASegment; // Window A segment
|
|
||||||
UINT16 WinBSegment; // Window B segment
|
|
||||||
UINT32 WindowFunction; // Pointer to window function
|
|
||||||
UINT16 BytesPerScanLine; // Bytes per scanline
|
|
||||||
//
|
|
||||||
// Manadory fields for VESA Bios Extensions 1.2 and above
|
|
||||||
//
|
|
||||||
UINT16 XResolution; // Horizontal resolution
|
|
||||||
UINT16 YResolution; // Vertical resolution
|
|
||||||
UINT8 XCharSize; // Character cell width
|
|
||||||
UINT8 YCharSize; // Character cell height
|
|
||||||
UINT8 NumberOfPlanes; // Number of memory planes
|
|
||||||
UINT8 BitsPerPixel; // Bits per pixel
|
|
||||||
UINT8 NumberOfBanks; // Number of CGA style banks
|
|
||||||
UINT8 MemoryModel; // Memory model type
|
|
||||||
UINT8 BankSize; // Size of CGA style banks
|
|
||||||
UINT8 NumberOfImagePages; // Number of images pages
|
|
||||||
UINT8 Reserved1; // Reserved
|
|
||||||
UINT8 RedMaskSize; // Size of direct color red mask
|
|
||||||
UINT8 RedFieldPosition; // Bit posn of lsb of red mask
|
|
||||||
UINT8 GreenMaskSize; // Size of direct color green mask
|
|
||||||
UINT8 GreenFieldPosition; // Bit posn of lsb of green mask
|
|
||||||
UINT8 BlueMaskSize; // Size of direct color blue mask
|
|
||||||
UINT8 BlueFieldPosition; // Bit posn of lsb of blue mask
|
|
||||||
UINT8 RsvdMaskSize; // Size of direct color res mask
|
|
||||||
UINT8 RsvdFieldPosition; // Bit posn of lsb of res mask
|
|
||||||
UINT8 DirectColorModeInfo; // Direct color mode attributes
|
|
||||||
//
|
|
||||||
// Manadory fields for VESA Bios Extensions 2.0 and above
|
|
||||||
//
|
|
||||||
UINT32 PhysBasePtr; // Physical Address for flat memory frame buffer
|
|
||||||
UINT32 Reserved2; // Reserved
|
|
||||||
UINT16 Reserved3; // Reserved
|
|
||||||
//
|
|
||||||
// Manadory fields for VESA Bios Extensions 3.0 and above
|
|
||||||
//
|
|
||||||
UINT16 LinBytesPerScanLine; // Bytes/scan line for linear modes
|
|
||||||
UINT8 BnkNumberOfImagePages; // Number of images for banked modes
|
|
||||||
UINT8 LinNumberOfImagePages; // Number of images for linear modes
|
|
||||||
UINT8 LinRedMaskSize; // Size of direct color red mask (linear mode)
|
|
||||||
UINT8 LinRedFieldPosition; // Bit posiiton of lsb of red mask (linear modes)
|
|
||||||
UINT8 LinGreenMaskSize; // Size of direct color green mask (linear mode)
|
|
||||||
UINT8 LinGreenFieldPosition; // Bit posiiton of lsb of green mask (linear modes)
|
|
||||||
UINT8 LinBlueMaskSize; // Size of direct color blue mask (linear mode)
|
|
||||||
UINT8 LinBlueFieldPosition; // Bit posiiton of lsb of blue mask (linear modes)
|
|
||||||
UINT8 LinRsvdMaskSize; // Size of direct color reserved mask (linear mode)
|
|
||||||
UINT8 LinRsvdFieldPosition; // Bit posiiton of lsb of reserved mask (linear modes)
|
|
||||||
UINT32 MaxPixelClock; // Maximum pixel clock (in Hz) for graphics mode
|
|
||||||
UINT8 Pad[190]; // Pad to 256 byte block size
|
|
||||||
} VESA_BIOS_EXTENSIONS_MODE_INFORMATION_BLOCK;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Super VGA Mode Information Block ModeAttributes field bit definitions
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_HARDWARE 0x0001 // 0: Mode not supported in handware
|
|
||||||
// 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
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_COLOR 0x0008 // 0: Monochrome mode
|
|
||||||
// 1: Color mode
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_GRAPHICS 0x0010 // 0: Text mode
|
|
||||||
// 1: Graphics mode
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_NOT_VGA 0x0020 // 0: VGA compatible 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
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_DOUBLE_SCAN 0x0100 // 0: No double scan mode available
|
|
||||||
// 1: Double scan mode available
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_MODE_ATTRIBUTE_INTERLACED 0x0200 // 0: No interlaced mode is 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 definitions
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_WINX_ATTRIBUTE_RELOCATABLE 0x01 // 0: Single non-relocatable window only
|
|
||||||
// 1: Relocatable window(s) are supported
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_WINX_ATTRIBUTE_READABLE 0x02 // 0: Window is not readable
|
|
||||||
// 1: Window is readable
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_WINX_ATTRIBUTE_WRITABLE 0x04 // 0: Window is not writable
|
|
||||||
// 1: Window is writable
|
|
||||||
//
|
|
||||||
// Super VGA Mode Information Block DirectColorMode field bit definitions
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_DIRECT_COLOR_MODE_PROG_COLOR_RAMP 0x01 // 0: Color ram is fixed
|
|
||||||
// 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 {
|
|
||||||
MemPL = 3, // Planar memory model
|
|
||||||
MemPK = 4, // Packed pixel memory model
|
|
||||||
MemRGB = 6, // Direct color RGB memory model
|
|
||||||
MemYUV = 7 // Direct color YUV memory model
|
|
||||||
} VESA_BIOS_EXTENSIONS_MEMORY_MODELS;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Super VGA CRTC Information Block
|
|
||||||
//
|
|
||||||
typedef struct {
|
|
||||||
UINT16 HorizontalTotal; // Horizontal total in pixels
|
|
||||||
UINT16 HorizontalSyncStart; // Horizontal sync start in pixels
|
|
||||||
UINT16 HorizontalSyncEnd; // Horizontal sync end in pixels
|
|
||||||
UINT16 VericalTotal; // Vertical total in pixels
|
|
||||||
UINT16 VericalSyncStart; // Vertical sync start in pixels
|
|
||||||
UINT16 VericalSyncEnd; // Vertical sync end in pixels
|
|
||||||
UINT8 Flags; // Flags (Interlaced/DoubleScan/etc).
|
|
||||||
UINT32 PixelClock; // Pixel clock in units of Hz
|
|
||||||
UINT16 RefreshRate; // Refresh rate in units of 0.01 Hz
|
|
||||||
UINT8 Reserved[40]; // Pad
|
|
||||||
} VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK;
|
|
||||||
|
|
||||||
#define VESA_BIOS_EXTENSIONS_CRTC_FLAGS_DOUBLE_SCAN 0x01 // 0: Graphics mode is not souble scanned
|
|
||||||
// 1: Graphics mode is double scanned
|
|
||||||
//
|
|
||||||
#define VESA_BIOS_EXTENSIONS_CRTC_FLAGSINTERLACED 0x02 // 0: Graphics mode is not interlaced
|
|
||||||
// 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
|
|
@@ -1,78 +0,0 @@
|
|||||||
## @file
|
|
||||||
# Video driver based on legacy bios.
|
|
||||||
#
|
|
||||||
# This driver by using Legacy Bios protocol service to support csm Video
|
|
||||||
# and produce Graphics Output Protocol.
|
|
||||||
#
|
|
||||||
# Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.<BR>
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
||||||
#
|
|
||||||
##
|
|
||||||
|
|
||||||
[Defines]
|
|
||||||
INF_VERSION = 0x00010005
|
|
||||||
BASE_NAME = BiosVideoDxe
|
|
||||||
MODULE_UNI_FILE = BiosVideoDxe.uni
|
|
||||||
FILE_GUID = 8669E6C9-842B-4B49-BCC3-32C96D244750
|
|
||||||
MODULE_TYPE = UEFI_DRIVER
|
|
||||||
VERSION_STRING = 1.0
|
|
||||||
|
|
||||||
ENTRY_POINT = BiosVideoEntryPoint
|
|
||||||
|
|
||||||
#
|
|
||||||
# The following information is for reference only and not required by the build tools.
|
|
||||||
#
|
|
||||||
# VALID_ARCHITECTURES = IA32 X64 EBC
|
|
||||||
#
|
|
||||||
# DRIVER_BINDING = gBiosVideoDriverBinding
|
|
||||||
# COMPONENT_NAME = gBiosVideoComponentName
|
|
||||||
#
|
|
||||||
|
|
||||||
[Sources]
|
|
||||||
BiosVideo.c
|
|
||||||
BiosVideo.h
|
|
||||||
ComponentName.c
|
|
||||||
VesaBiosExtensions.h
|
|
||||||
|
|
||||||
[Packages]
|
|
||||||
MdePkg/MdePkg.dec
|
|
||||||
MdeModulePkg/MdeModulePkg.dec
|
|
||||||
OvmfPkg/OvmfPkg.dec
|
|
||||||
|
|
||||||
[LibraryClasses]
|
|
||||||
MemoryAllocationLib
|
|
||||||
DevicePathLib
|
|
||||||
UefiLib
|
|
||||||
UefiBootServicesTableLib
|
|
||||||
UefiDriverEntryPoint
|
|
||||||
BaseMemoryLib
|
|
||||||
ReportStatusCodeLib
|
|
||||||
DebugLib
|
|
||||||
PcdLib
|
|
||||||
|
|
||||||
|
|
||||||
[Guids]
|
|
||||||
gEfiLegacyBiosGuid ## PRODUCES ##GUID # Install Legacy BIOS GUID to mark this driver as a BIOS Thunk Driver
|
|
||||||
gEfiEventExitBootServicesGuid ## CONSUMES ##Event
|
|
||||||
|
|
||||||
[Protocols]
|
|
||||||
gEfiVgaMiniPortProtocolGuid ## BY_START
|
|
||||||
gEfiEdidDiscoveredProtocolGuid ## BY_START
|
|
||||||
gEfiGraphicsOutputProtocolGuid ## BY_START
|
|
||||||
gEfiEdidActiveProtocolGuid ## BY_START
|
|
||||||
gEfiLegacyBiosProtocolGuid ## CONSUMES
|
|
||||||
gEfiPciIoProtocolGuid ## TO_START
|
|
||||||
gEfiDevicePathProtocolGuid ## TO_START
|
|
||||||
gEfiDevicePathProtocolGuid ## BY_START
|
|
||||||
gEfiEdidOverrideProtocolGuid ## SOMETIMES_CONSUMES
|
|
||||||
|
|
||||||
[Pcd]
|
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdBiosVideoSetTextVgaModeEnable ## CONSUMES
|
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdBiosVideoCheckVbeEnable ## CONSUMES
|
|
||||||
gUefiOvmfPkgTokenSpaceGuid.PcdBiosVideoCheckVgaEnable ## SOMETIMES_CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoHorizontalResolution ## SOMETIMES_CONSUMES
|
|
||||||
gEfiMdeModulePkgTokenSpaceGuid.PcdVideoVerticalResolution ## SOMETIMES_CONSUMES
|
|
||||||
|
|
||||||
[UserExtensions.TianoCore."ExtraFiles"]
|
|
||||||
BiosVideoDxeExtra.uni
|
|
Reference in New Issue
Block a user