3 Copyright (c) 2006 - 2008, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 Private data for the Uga driver that is bound to the Unix Thunk protocol
26 #include <Guid/EventGroup.h>
27 #include <Protocol/SimpleTextIn.h>
28 #include <Protocol/UgaDraw.h>
29 #include "Protocol/UnixUgaIo.h"
30 #include <Library/DebugLib.h>
31 #include <Library/BaseLib.h>
32 #include <Library/UefiDriverEntryPoint.h>
33 #include <Library/UefiLib.h>
34 #include <Library/BaseMemoryLib.h>
35 #include <Library/MemoryAllocationLib.h>
36 #include <Library/UefiBootServicesTableLib.h>
39 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding
;
40 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName
;
42 #define UNIX_UGA_CLASS_NAME L"UnixUgaWindow"
44 #define UGA_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
49 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
50 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
52 EFI_UNIX_THUNK_PROTOCOL
*UnixThunk
;
54 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
57 // UGA Private Data for GetMode ()
59 UINT32 HorizontalResolution
;
60 UINT32 VerticalResolution
;
65 // UGA Private Data knowing when to start hardware
67 BOOLEAN HardwareNeedsStarting
;
71 EFI_UNIX_UGA_IO_PROTOCOL
*UgaIo
;
75 #define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
76 CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
78 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
79 CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
82 // Global Protocol Variables
84 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding
;
85 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName
;
88 // Uga Hardware abstraction internal worker functions
92 IN EFI_UNIX_IO_PROTOCOL
*UnixIo
98 TODO: Add function description
102 UnixIo - TODO: add argument description
106 TODO: add return values
113 IN UGA_PRIVATE_DATA
*Private
119 TODO: Add function description
123 Private - TODO: add argument description
127 TODO: add return values
134 IN UGA_PRIVATE_DATA
*Private
140 TODO: Add function description
144 Private - TODO: add argument description
148 TODO: add return values
154 // EFI 1.1 driver model prototypes for Win UNIX UGA
160 IN EFI_HANDLE ImageHandle
,
161 IN EFI_SYSTEM_TABLE
*SystemTable
167 TODO: Add function description
171 ImageHandle - TODO: add argument description
172 SystemTable - TODO: add argument description
176 TODO: add return values
183 UnixUgaDriverBindingSupported (
184 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
185 IN EFI_HANDLE Handle
,
186 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
192 TODO: Add function description
196 This - TODO: add argument description
197 Handle - TODO: add argument description
198 RemainingDevicePath - TODO: add argument description
202 TODO: add return values
209 UnixUgaDriverBindingStart (
210 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
211 IN EFI_HANDLE Handle
,
212 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
218 TODO: Add function description
222 This - TODO: add argument description
223 Handle - TODO: add argument description
224 RemainingDevicePath - TODO: add argument description
228 TODO: add return values
235 UnixUgaDriverBindingStop (
236 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
237 IN EFI_HANDLE Handle
,
238 IN UINTN NumberOfChildren
,
239 IN EFI_HANDLE
*ChildHandleBuffer
245 TODO: Add function description
249 This - TODO: add argument description
250 Handle - TODO: add argument description
251 NumberOfChildren - TODO: add argument description
252 ChildHandleBuffer - TODO: add argument description
256 TODO: add return values
263 IN UGA_PRIVATE_DATA
*Private
,
270 TODO: Add function description
274 Private - TODO: add argument description
275 Key - TODO: add argument description
279 TODO: add return values
285 UnixUgaInitializeSimpleTextInForWindow (
286 IN UGA_PRIVATE_DATA
*Private
292 TODO: Add function description
296 Private - TODO: add argument description
300 TODO: add return values