#ifndef __UGA_IO_H__
#define __UGA_IO_H__
#define EFI_UGA_IO_PROTOCOL_GUID \
{ 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } }
typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL;
typedef UINT32 UGA_STATUS;
typedef enum {
UgaDtParentBus = 1,
UgaDtGraphicsController,
UgaDtOutputController,
UgaDtOutputPort,
UgaDtOther
} UGA_DEVICE_TYPE, *PUGA_DEVICE_TYPE;
typedef UINT32 UGA_DEVICE_ID, *PUGA_DEVICE_ID;
typedef struct {
UGA_DEVICE_TYPE deviceType;
UGA_DEVICE_ID deviceId;
UINT32 ui32DeviceContextSize;
UINT32 ui32SharedContextSize;
} UGA_DEVICE_DATA, *PUGA_DEVICE_DATA;
typedef struct _UGA_DEVICE {
VOID *pvDeviceContext;
VOID *pvSharedContext;
VOID *pvRunTimeContext;
struct _UGA_DEVICE *pParentDevice;
VOID *pvBusIoServices;
VOID *pvStdIoServices;
UGA_DEVICE_DATA deviceData;
} UGA_DEVICE, *PUGA_DEVICE;
typedef enum {
UgaIoGetVersion = 1,
UgaIoGetChildDevice,
UgaIoStartDevice,
UgaIoStopDevice,
UgaIoFlushDevice,
UgaIoResetDevice,
UgaIoGetDeviceState,
UgaIoSetDeviceState,
UgaIoSetPowerState,
UgaIoGetMemoryConfiguration,
UgaIoSetVideoMode,
UgaIoCopyRectangle,
UgaIoGetEdidSegment,
UgaIoDeviceChannelOpen,
UgaIoDeviceChannelClose,
UgaIoDeviceChannelRead,
UgaIoDeviceChannelWrite,
UgaIoGetPersistentDataSize,
UgaIoGetPersistentData,
UgaIoSetPersistentData,
UgaIoGetDevicePropertySize,
UgaIoGetDeviceProperty,
UgaIoBtPrivateInterface
} UGA_IO_REQUEST_CODE, *PUGA_IO_REQUEST_CODE;
typedef struct {
IN UGA_IO_REQUEST_CODE ioRequestCode;
IN VOID *pvInBuffer;
IN UINT64 ui64InBufferSize;
OUT VOID *pvOutBuffer;
IN UINT64 ui64OutBufferSize;
OUT UINT64 ui64BytesReturned;
} UGA_IO_REQUEST, *PUGA_IO_REQUEST;
typedef
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
);
typedef
EFI_STATUS
(EFIAPI *EFI_UGA_IO_PROTOCOL_DELETE_DEVICE)(
IN EFI_UGA_IO_PROTOCOL *This,
IN UGA_DEVICE *Device
);
typedef UGA_STATUS
(EFIAPI *PUGA_FW_SERVICE_DISPATCH)(
IN PUGA_DEVICE pDevice,
IN OUT PUGA_IO_REQUEST pIoRequest
);
struct _EFI_UGA_IO_PROTOCOL {
EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice;
EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice;
PUGA_FW_SERVICE_DISPATCH DispatchService;
};
extern EFI_GUID gEfiUgaIoProtocolGuid;
typedef struct {
UINT32 Version;
UINT32 HeaderSize;
UINT32 SizeOfEntries;
UINT32 NumberOfEntries;
} EFI_DRIVER_OS_HANDOFF_HEADER;
typedef enum {
EfiUgaDriverFromPciRom,
EfiUgaDriverFromSystem,
EfiDriverHandoffMax
} EFI_DRIVER_HANOFF_ENUM;
typedef struct {
EFI_DRIVER_HANOFF_ENUM Type;
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
VOID *PciRomImage;
UINT64 PciRomSize;
} EFI_DRIVER_OS_HANDOFF;
#endif