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