xref: /freebsd/stand/efi/include/efigop.h (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 /*++
2 
3 Copyright (c)  1999 - 2002 Intel Corporation. All rights reserved
4 This software and associated documentation (if any) is furnished
5 under a license and may only be used or copied in accordance
6 with the terms of the license. Except as permitted by such
7 license, no part of this software or documentation may be
8 reproduced, stored in a retrieval system, or transmitted in any
9 form or by any means without the express written consent of
10 Intel Corporation.
11 
12 Module Name:
13 
14     efigop.h
15 
16 Abstract:
17     Info about framebuffers
18 
19 
20 
21 
22 Revision History
23 
24 --*/
25 
26 #ifndef _EFIGOP_H
27 #define _EFIGOP_H
28 
29 #define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
30     { 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a} }
31 
32 INTERFACE_DECL(_EFI_GRAPHICS_OUTPUT);
33 
34 typedef struct {
35 	UINT32	RedMask;
36 	UINT32	GreenMask;
37 	UINT32	BlueMask;
38 	UINT32	ReservedMask;
39 } EFI_PIXEL_BITMASK;
40 
41 typedef enum {
42 	PixelRedGreenBlueReserved8BitPerColor,
43 	PixelBlueGreenRedReserved8BitPerColor,
44 	PixelBitMask,
45 	PixelBltOnly,
46 	PixelFormatMax,
47 } EFI_GRAPHICS_PIXEL_FORMAT;
48 
49 typedef struct {
50 	UINT32				Version;
51 	UINT32				HorizontalResolution;
52 	UINT32				VerticalResolution;
53 	EFI_GRAPHICS_PIXEL_FORMAT	PixelFormat;
54 	EFI_PIXEL_BITMASK		PixelInformation;
55 	UINT32				PixelsPerScanLine;
56 } EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
57 
58 typedef struct {
59 	UINT32					MaxMode;
60 	UINT32					Mode;
61 	EFI_GRAPHICS_OUTPUT_MODE_INFORMATION	*Info;
62 	UINTN					SizeOfInfo;
63 	EFI_PHYSICAL_ADDRESS			FrameBufferBase;
64 	UINTN					FrameBufferSize;
65 } EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
66 
67 typedef
68 EFI_STATUS
69 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
70     IN  struct _EFI_GRAPHICS_OUTPUT		*This,
71     IN  UINT32					ModeNumber,
72     OUT UINTN					*SizeOfInfo,
73     OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION	**Info
74     );
75 
76 typedef
77 EFI_STATUS
78 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
79     IN  struct _EFI_GRAPHICS_OUTPUT	*This,
80     IN  UINT32				ModeNumber
81     );
82 
83 typedef struct {
84 	UINT8	Blue;
85 	UINT8	Green;
86 	UINT8	Red;
87 	UINT8	Reserved;
88 } EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
89 
90 typedef enum {
91 	EfiBltVideoFill,
92 	EfiBltVideoToBltBuffer,
93 	EfiBltBufferToVideo,
94 	EfiBltVideoToVideo,
95 	EfiGraphcisOutputBltOperationMax,
96 } EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
97 
98 typedef
99 EFI_STATUS
100 (EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
101     IN struct _EFI_GRAPHICS_OUTPUT		*This,
102     IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL	*BltBuffer,
103     IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION	BltOperation,
104     IN UINTN					SourceX,
105     IN UINTN					SourceY,
106     IN UINTN					DestinationX,
107     IN UINTN					DestinationY,
108     IN UINTN					Width,
109     IN UINTN					Height,
110     IN UINTN					Delta
111     );
112 
113 typedef struct _EFI_GRAPHICS_OUTPUT {
114 	EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE	QueryMode;
115 	EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE	SetMode;
116 	EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT	Blt;
117 	EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE	*Mode;
118 } EFI_GRAPHICS_OUTPUT;
119 
120 #endif /* _EFIGOP_H */
121