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
;
85 Dynamically allocate storage for a child UGA_DEVICE.
87 @param[in] This The EFI_UGA_IO_PROTOCOL instance.
88 @param[in] ParentDevice ParentDevice specifies a pointer to the parent device of Device.
89 @param[in] DeviceData A pointer to UGA_DEVICE_DATA returned from a call to DispatchService()
90 with a UGA_DEVICE of Parent and an IoRequest of type UgaIoGetChildDevice.
91 @param[in] RunTimeContext Context to associate with Device.
92 @param[out] Device The Device returns a dynamically allocated child UGA_DEVICE object
93 for ParentDevice. The caller is responsible for deleting Device.
96 @retval EFI_SUCCESS Device was returned.
97 @retval EFI_INVALID_PARAMETER One of the arguments was not valid.
98 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.
103 (EFIAPI
*EFI_UGA_IO_PROTOCOL_CREATE_DEVICE
)(
104 IN EFI_UGA_IO_PROTOCOL
*This
,
105 IN UGA_DEVICE
*ParentDevice
,
106 IN UGA_DEVICE_DATA
*DeviceData
,
107 IN VOID
*RunTimeContext
,
108 OUT UGA_DEVICE
**Device
113 Delete a dynamically allocated child UGA_DEVICE object that was allocated via CreateDevice().
115 @param[in] This The EFI_UGA_IO_PROTOCOL instance. Type EFI_UGA_IO_PROTOCOL is
116 defined in Section 10.7.
117 @param[in] Device The Device points to a UGA_DEVICE object that was dynamically
118 allocated via a CreateDevice() call.
121 @retval EFI_SUCCESS Device was returned.
122 @retval EFI_INVALID_PARAMETER The Device was not allocated via CreateDevice().
127 (EFIAPI
*EFI_UGA_IO_PROTOCOL_DELETE_DEVICE
)(
128 IN EFI_UGA_IO_PROTOCOL
* This
,
129 IN UGA_DEVICE
* Device
133 This is the main UGA service dispatch routine for all UGA_IO_REQUEST s.
135 @param pDevice pDevice specifies a pointer to a device object associated with a
136 device enumerated by a pIoRequest->ioRequestCode of type
137 UgaIoGetChildDevice. The root device for the EFI_UGA_IO_PROTOCOL
138 is represented by pDevice being set to NULL.
141 pIoRequest points to a caller allocated buffer that contains data
142 defined by pIoRequest->ioRequestCode. See Related Definitions for
143 a definition of UGA_IO_REQUEST_CODE s and their associated data
150 (EFIAPI
*PUGA_FW_SERVICE_DISPATCH
)(
151 IN PUGA_DEVICE pDevice
,
152 IN OUT PUGA_IO_REQUEST pIoRequest
156 /// Provides a basic abstraction to send I/O requests to the graphics device and any of its children.
158 struct _EFI_UGA_IO_PROTOCOL
{
159 EFI_UGA_IO_PROTOCOL_CREATE_DEVICE CreateDevice
;
160 EFI_UGA_IO_PROTOCOL_DELETE_DEVICE DeleteDevice
;
161 PUGA_FW_SERVICE_DISPATCH DispatchService
;
164 extern EFI_GUID gEfiUgaIoProtocolGuid
;
167 // Data structure that is stored in the EFI Configuration Table with the
168 // EFI_UGA_IO_PROTOCOL_GUID. The option ROMs listed in this table may have
174 UINT32 SizeOfEntries
;
175 UINT32 NumberOfEntries
;
176 } EFI_DRIVER_OS_HANDOFF_HEADER
;
179 EfiUgaDriverFromPciRom
,
180 EfiUgaDriverFromSystem
,
182 } EFI_DRIVER_HANOFF_ENUM
;
185 EFI_DRIVER_HANOFF_ENUM Type
;
186 EFI_DEVICE_PATH_PROTOCOL
*DevicePath
;
189 } EFI_DRIVER_OS_HANDOFF
;