2 UGA IO protocol from the EFI 1.10 specification.
4 Abstraction of a very simple graphics device.
6 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
14 #define EFI_UGA_IO_PROTOCOL_GUID \
15 { 0x61a4d49e, 0x6f68, 0x4f1b, { 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 } }
17 typedef struct _EFI_UGA_IO_PROTOCOL EFI_UGA_IO_PROTOCOL
;
19 typedef UINT32 UGA_STATUS
;
23 UgaDtGraphicsController
,
24 UgaDtOutputController
,
27 } UGA_DEVICE_TYPE
, *PUGA_DEVICE_TYPE
;
29 typedef UINT32 UGA_DEVICE_ID
, *PUGA_DEVICE_ID
;
32 UGA_DEVICE_TYPE deviceType
;
33 UGA_DEVICE_ID deviceId
;
34 UINT32 ui32DeviceContextSize
;
35 UINT32 ui32SharedContextSize
;
36 } UGA_DEVICE_DATA
, *PUGA_DEVICE_DATA
;
38 typedef 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
;
46 } UGA_DEVICE
, *PUGA_DEVICE
;
58 UgaIoGetMemoryConfiguration
,
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
;
75 IN UGA_IO_REQUEST_CODE ioRequestCode
;
77 IN UINT64 ui64InBufferSize
;
78 OUT VOID
*pvOutBuffer
;
79 IN UINT64 ui64OutBufferSize
;
80 OUT UINT64 ui64BytesReturned
;
81 } UGA_IO_REQUEST
, *PUGA_IO_REQUEST
;
84 Dynamically allocate storage for a child UGA_DEVICE.
86 @param[in] This The EFI_UGA_IO_PROTOCOL instance.
87 @param[in] ParentDevice ParentDevice specifies a pointer to the parent device of Device.
88 @param[in] DeviceData A pointer to UGA_DEVICE_DATA returned from a call to DispatchService()
89 with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice.
90 @param[in] RunTimeContext Context to associate with Device.
91 @param[out] Device The Device returns a dynamically allocated child UGA_DEVICE object
92 for ParentDevice. The caller is responsible for deleting Device.
95 @retval EFI_SUCCESS Device was returned.
96 @retval EFI_INVALID_PARAMETER One of the arguments was not valid.
97 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
102 (EFIAPI
*EFI_UGA_IO_PROTOCOL_CREATE_DEVICE
)(
103 IN EFI_UGA_IO_PROTOCOL
*This
,
104 IN UGA_DEVICE
*ParentDevice
,
105 IN UGA_DEVICE_DATA
*DeviceData
,
106 IN VOID
*RunTimeContext
,
107 OUT UGA_DEVICE
**Device
111 Delete a dynamically allocated child UGA_DEVICE object that was allocated via CreateDevice().
113 @param[in] This The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is
114 defined in Section 10.7.
115 @param[in] Device The Device points to a UGA_DEVICE object that was dynamically
116 allocated via a CreateDevice() call.
119 @retval EFI_SUCCESS Device was returned.
120 @retval EFI_INVALID_PARAMETER The Device was not allocated via CreateDevice().
125 (EFIAPI
*EFI_UGA_IO_PROTOCOL_DELETE_DEVICE
)(
126 IN EFI_UGA_IO_PROTOCOL
*This
,
127 IN UGA_DEVICE
*Device
131 This is the main UGA service dispatch routine for all UGA_IO_REQUEST s.
133 @param pDevice pDevice specifies a pointer to a device object associated with a
134 device enumerated by a pIoRequest->ioRequestCode of type
135 UgaIoGetChildDevice. The root device for the EFI_UGA_IO_PROTOCOL
136 is represented by pDevice being set to NULL.
139 pIoRequest points to a caller allocated buffer that contains data
140 defined by pIoRequest->ioRequestCode. See Related Definitions for
141 a definition of UGA_IO_REQUEST_CODE s and their associated data
148 (EFIAPI
*PUGA_FW_SERVICE_DISPATCH
)(
149 IN PUGA_DEVICE pDevice
,
150 IN OUT PUGA_IO_REQUEST pIoRequest
154 /// Provides a basic abstraction to send I/O requests to the graphics device and any of its children.
156 struct _EFI_UGA_IO_PROTOCOL
{
157 EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice
;
158 EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice
;
159 PUGA_FW_SERVICE_DISPATCH DispatchService
;
162 extern EFI_GUID gEfiUgaIoProtocolGuid
;
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
172 UINT32 SizeOfEntries
;
173 UINT32 NumberOfEntries
;
174 } EFI_DRIVER_OS_HANDOFF_HEADER
;
177 EfiUgaDriverFromPciRom
,
178 EfiUgaDriverFromSystem
,
180 } EFI_DRIVER_HANOFF_ENUM
;
183 EFI_DRIVER_HANOFF_ENUM Type
;
184 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
187 } EFI_DRIVER_OS_HANDOFF
;