3 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4 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/SimplePointer.h>
29 #include <Protocol/UgaDraw.h>
30 #include "Protocol/UnixUgaIo.h"
31 #include <Library/DebugLib.h>
32 #include <Library/BaseLib.h>
33 #include <Library/UefiDriverEntryPoint.h>
34 #include <Library/UefiLib.h>
35 #include <Library/BaseMemoryLib.h>
36 #include <Library/MemoryAllocationLib.h>
37 #include <Library/UefiBootServicesTableLib.h>
40 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding
;
41 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName
;
43 #define UNIX_UGA_CLASS_NAME L"UnixUgaWindow"
45 #define UGA_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('S', 'g', 'o', 'N')
50 EFI_UGA_DRAW_PROTOCOL UgaDraw
;
51 EFI_SIMPLE_TEXT_INPUT_PROTOCOL SimpleTextIn
;
52 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer
;
54 EFI_UNIX_THUNK_PROTOCOL
*UnixThunk
;
56 EFI_UNICODE_STRING_TABLE
*ControllerNameTable
;
59 // UGA Private Data for GetMode ()
61 UINT32 HorizontalResolution
;
62 UINT32 VerticalResolution
;
66 EFI_SIMPLE_POINTER_MODE PointerMode
;
69 // UGA Private Data knowing when to start hardware
71 BOOLEAN HardwareNeedsStarting
;
75 EFI_UNIX_UGA_IO_PROTOCOL
*UgaIo
;
79 #define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
80 CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
82 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
83 CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
85 #define UGA_PRIVATE_DATA_FROM_POINTER_THIS(a) \
86 CR(a, UGA_PRIVATE_DATA, SimplePointer, UGA_PRIVATE_DATA_SIGNATURE)
89 // Global Protocol Variables
91 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding
;
92 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName
;
95 // Uga Hardware abstraction internal worker functions
99 IN EFI_UNIX_IO_PROTOCOL
*UnixIo
105 TODO: Add function description
109 UnixIo - TODO: add argument description
113 TODO: add return values
120 IN UGA_PRIVATE_DATA
*Private
126 TODO: Add function description
130 Private - TODO: add argument description
134 TODO: add return values
141 IN UGA_PRIVATE_DATA
*Private
147 TODO: Add function description
151 Private - TODO: add argument description
155 TODO: add return values
161 // EFI 1.1 driver model prototypes for Win UNIX UGA
167 IN EFI_HANDLE ImageHandle
,
168 IN EFI_SYSTEM_TABLE
*SystemTable
174 TODO: Add function description
178 ImageHandle - TODO: add argument description
179 SystemTable - TODO: add argument description
183 TODO: add return values
190 UnixUgaDriverBindingSupported (
191 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
192 IN EFI_HANDLE Handle
,
193 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
199 TODO: Add function description
203 This - TODO: add argument description
204 Handle - TODO: add argument description
205 RemainingDevicePath - TODO: add argument description
209 TODO: add return values
216 UnixUgaDriverBindingStart (
217 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
218 IN EFI_HANDLE Handle
,
219 IN EFI_DEVICE_PATH_PROTOCOL
*RemainingDevicePath
225 TODO: Add function description
229 This - TODO: add argument description
230 Handle - TODO: add argument description
231 RemainingDevicePath - TODO: add argument description
235 TODO: add return values
242 UnixUgaDriverBindingStop (
243 IN EFI_DRIVER_BINDING_PROTOCOL
*This
,
244 IN EFI_HANDLE Handle
,
245 IN UINTN NumberOfChildren
,
246 IN EFI_HANDLE
*ChildHandleBuffer
252 TODO: Add function description
256 This - TODO: add argument description
257 Handle - TODO: add argument description
258 NumberOfChildren - TODO: add argument description
259 ChildHandleBuffer - TODO: add argument description
263 TODO: add return values
270 IN UGA_PRIVATE_DATA
*Private
,
277 TODO: Add function description
281 Private - TODO: add argument description
282 Key - TODO: add argument description
286 TODO: add return values
292 UnixUgaInitializeSimpleTextInForWindow (
293 IN UGA_PRIVATE_DATA
*Private
299 TODO: Add function description
303 Private - TODO: add argument description
307 TODO: add return values
313 UnixUgaInitializeSimplePointerForWindow (
314 IN UGA_PRIVATE_DATA
*Private
320 TODO: Add function description
324 Private - TODO: add argument description
328 TODO: add return values