TianoCore EDK2 master
Loading...
Searching...
No Matches
UgaIo.h
Go to the documentation of this file.
1
11#ifndef __UGA_IO_H__
12#define __UGA_IO_H__
13
14#define EFI_UGA_IO_PROTOCOL_GUID \
15 { 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } }
16
18
19typedef UINT32 UGA_STATUS;
20
21typedef enum {
22 UgaDtParentBus = 1,
23 UgaDtGraphicsController,
24 UgaDtOutputController,
25 UgaDtOutputPort,
26 UgaDtOther
27} UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;
28
29typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID;
30
31typedef struct {
32 UGA_DEVICE_TYPE deviceType;
33 UGA_DEVICE_ID deviceId;
34 UINT32 ui32DeviceContextSize;
35 UINT32 ui32SharedContextSize;
37
38typedef struct _UGA_DEVICE {
39 VOID *pvDeviceContext;
40 VOID *pvSharedContext;
41 VOID *pvRunTimeContext;
42 struct _UGA_DEVICE *pParentDevice;
43 VOID *pvBusIoServices;
44 VOID *pvStdIoServices;
45 UGA_DEVICE_DATA deviceData;
47
48typedef enum {
49 UgaIoGetVersion = 1,
50 UgaIoGetChildDevice,
51 UgaIoStartDevice,
52 UgaIoStopDevice,
53 UgaIoFlushDevice,
54 UgaIoResetDevice,
55 UgaIoGetDeviceState,
56 UgaIoSetDeviceState,
57 UgaIoSetPowerState,
58 UgaIoGetMemoryConfiguration,
59 UgaIoSetVideoMode,
60 UgaIoCopyRectangle,
61 UgaIoGetEdidSegment,
62 UgaIoDeviceChannelOpen,
63 UgaIoDeviceChannelClose,
64 UgaIoDeviceChannelRead,
65 UgaIoDeviceChannelWrite,
66 UgaIoGetPersistentDataSize,
67 UgaIoGetPersistentData,
68 UgaIoSetPersistentData,
69 UgaIoGetDevicePropertySize,
70 UgaIoGetDeviceProperty,
71 UgaIoBtPrivateInterface
72} UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;
73
74typedef struct {
75 IN UGA_IO_REQUEST_CODE ioRequestCode;
76 IN VOID *pvInBuffer;
77 IN UINT64 ui64InBufferSize;
78 OUT VOID *pvOutBuffer;
79 IN UINT64 ui64OutBufferSize;
80 OUT UINT64 ui64BytesReturned;
82
100typedef
104 IN UGA_DEVICE *ParentDevice,
105 IN UGA_DEVICE_DATA *DeviceData,
106 IN VOID *RunTimeContext,
107 OUT UGA_DEVICE **Device
108 );
109
123typedef
127 IN UGA_DEVICE *Device
128 );
129
147typedef UGA_STATUS
149 IN PUGA_DEVICE pDevice,
150 IN OUT PUGA_IO_REQUEST pIoRequest
151 );
152
159 PUGA_FW_SERVICE_DISPATCH DispatchService;
160};
161
162extern EFI_GUID gEfiUgaIoProtocolGuid;
163
164//
165// Data structure that is stored in the EFI Configuration Table with the
166// EFI_UGA_IO_PROTOCOL_GUID. The option ROMs listed in this table may have
167// EBC UGA drivers.
168//
169typedef struct {
170 UINT32 Version;
171 UINT32 HeaderSize;
172 UINT32 SizeOfEntries;
173 UINT32 NumberOfEntries;
175
176typedef enum {
177 EfiUgaDriverFromPciRom,
178 EfiUgaDriverFromSystem,
179 EfiDriverHandoffMax
180} EFI_DRIVER_HANOFF_ENUM;
181
182typedef struct {
183 EFI_DRIVER_HANOFF_ENUM Type;
184 EFI_DEVICE_PATH_PROTOCOL *DevicePath;
185 VOID *PciRomImage;
186 UINT64 PciRomSize;
188
189#endif
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
EFI_STATUS(EFIAPI * EFI_UGA_IO_PROTOCOL_DELETE_DEVICE)(IN EFI_UGA_IO_PROTOCOL *This, IN UGA_DEVICE *Device)
Definition: UgaIo.h:125
UGA_STATUS(EFIAPI * PUGA_FW_SERVICE_DISPATCH)(IN PUGA_DEVICE pDevice, IN OUT PUGA_IO_REQUEST pIoRequest)
Definition: UgaIo.h:148
EFI_STATUS(EFIAPI * EFI_UGA_IO_PROTOCOL_CREATE_DEVICE)(IN EFI_UGA_IO_PROTOCOL *This, IN UGA_DEVICE *ParentDevice, IN UGA_DEVICE_DATA *DeviceData, IN VOID *RunTimeContext, OUT UGA_DEVICE **Device)
Definition: UgaIo.h:102
Definition: Base.h:213