]> git.proxmox.com Git - mirror_edk2.git/blob - EdkUnixPkg/Dxe/UnixThunk/Bus/Uga/UnixUga.h
Always return an aligned block when mapping memory.
[mirror_edk2.git] / EdkUnixPkg / Dxe / UnixThunk / Bus / Uga / UnixUga.h
1 /*++
2
3 Copyright (c) 2006, 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
8
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.
11
12 Module Name:
13
14 UnixUga.h
15
16 Abstract:
17
18 Private data for the Uga driver that is bound to the Unix Thunk protocol
19
20 --*/
21
22 #ifndef _UNIX_UGA_H_
23 #define _UNIX_UGA_H_
24
25 #include "Protocol/UnixUgaIo.h"
26
27 #define UNIX_UGA_CLASS_NAME L"UnixUgaWindow"
28
29 #define UGA_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('S', 'g', 'o', 'N')
30 typedef struct {
31 UINT64 Signature;
32
33 EFI_HANDLE Handle;
34 EFI_UGA_DRAW_PROTOCOL UgaDraw;
35 EFI_SIMPLE_TEXT_IN_PROTOCOL SimpleTextIn;
36
37 EFI_UNIX_THUNK_PROTOCOL *UnixThunk;
38
39 EFI_UNICODE_STRING_TABLE *ControllerNameTable;
40
41 //
42 // UGA Private Data for GetMode ()
43 //
44 UINT32 HorizontalResolution;
45 UINT32 VerticalResolution;
46 UINT32 ColorDepth;
47 UINT32 RefreshRate;
48
49 //
50 // UGA Private Data knowing when to start hardware
51 //
52 BOOLEAN HardwareNeedsStarting;
53
54 CHAR16 *WindowName;
55
56 EFI_UNIX_UGA_IO_PROTOCOL *UgaIo;
57
58 } UGA_PRIVATE_DATA;
59
60 #define UGA_DRAW_PRIVATE_DATA_FROM_THIS(a) \
61 CR(a, UGA_PRIVATE_DATA, UgaDraw, UGA_PRIVATE_DATA_SIGNATURE)
62
63 #define UGA_PRIVATE_DATA_FROM_TEXT_IN_THIS(a) \
64 CR(a, UGA_PRIVATE_DATA, SimpleTextIn, UGA_PRIVATE_DATA_SIGNATURE)
65
66 //
67 // Global Protocol Variables
68 //
69 extern EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding;
70 extern EFI_COMPONENT_NAME_PROTOCOL gUnixUgaComponentName;
71
72 //
73 // Uga Hardware abstraction internal worker functions
74 //
75 EFI_STATUS
76 UnixUgaSupported (
77 IN EFI_UNIX_IO_PROTOCOL *UnixIo
78 )
79 /*++
80
81 Routine Description:
82
83 TODO: Add function description
84
85 Arguments:
86
87 UnixIo - TODO: add argument description
88
89 Returns:
90
91 TODO: add return values
92
93 --*/
94 ;
95
96 EFI_STATUS
97 UnixUgaConstructor (
98 IN UGA_PRIVATE_DATA *Private
99 )
100 /*++
101
102 Routine Description:
103
104 TODO: Add function description
105
106 Arguments:
107
108 Private - TODO: add argument description
109
110 Returns:
111
112 TODO: add return values
113
114 --*/
115 ;
116
117 EFI_STATUS
118 UnixUgaDestructor (
119 IN UGA_PRIVATE_DATA *Private
120 )
121 /*++
122
123 Routine Description:
124
125 TODO: Add function description
126
127 Arguments:
128
129 Private - TODO: add argument description
130
131 Returns:
132
133 TODO: add return values
134
135 --*/
136 ;
137
138 //
139 // EFI 1.1 driver model prototypes for Win NT UGA
140 //
141
142 EFI_STATUS
143 EFIAPI
144 UnixUgaInitialize (
145 IN EFI_HANDLE ImageHandle,
146 IN EFI_SYSTEM_TABLE *SystemTable
147 )
148 /*++
149
150 Routine Description:
151
152 TODO: Add function description
153
154 Arguments:
155
156 ImageHandle - TODO: add argument description
157 SystemTable - TODO: add argument description
158
159 Returns:
160
161 TODO: add return values
162
163 --*/
164 ;
165
166 EFI_STATUS
167 EFIAPI
168 UnixUgaDriverBindingSupported (
169 IN EFI_DRIVER_BINDING_PROTOCOL *This,
170 IN EFI_HANDLE Handle,
171 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
172 )
173 /*++
174
175 Routine Description:
176
177 TODO: Add function description
178
179 Arguments:
180
181 This - TODO: add argument description
182 Handle - TODO: add argument description
183 RemainingDevicePath - TODO: add argument description
184
185 Returns:
186
187 TODO: add return values
188
189 --*/
190 ;
191
192 EFI_STATUS
193 EFIAPI
194 UnixUgaDriverBindingStart (
195 IN EFI_DRIVER_BINDING_PROTOCOL *This,
196 IN EFI_HANDLE Handle,
197 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
198 )
199 /*++
200
201 Routine Description:
202
203 TODO: Add function description
204
205 Arguments:
206
207 This - TODO: add argument description
208 Handle - TODO: add argument description
209 RemainingDevicePath - TODO: add argument description
210
211 Returns:
212
213 TODO: add return values
214
215 --*/
216 ;
217
218 EFI_STATUS
219 EFIAPI
220 UnixUgaDriverBindingStop (
221 IN EFI_DRIVER_BINDING_PROTOCOL *This,
222 IN EFI_HANDLE Handle,
223 IN UINTN NumberOfChildren,
224 IN EFI_HANDLE *ChildHandleBuffer
225 )
226 /*++
227
228 Routine Description:
229
230 TODO: Add function description
231
232 Arguments:
233
234 This - TODO: add argument description
235 Handle - TODO: add argument description
236 NumberOfChildren - TODO: add argument description
237 ChildHandleBuffer - TODO: add argument description
238
239 Returns:
240
241 TODO: add return values
242
243 --*/
244 ;
245
246 EFI_STATUS
247 UgaPrivateAddQ (
248 IN UGA_PRIVATE_DATA *Private,
249 IN EFI_INPUT_KEY Key
250 )
251 /*++
252
253 Routine Description:
254
255 TODO: Add function description
256
257 Arguments:
258
259 Private - TODO: add argument description
260 Key - TODO: add argument description
261
262 Returns:
263
264 TODO: add return values
265
266 --*/
267 ;
268
269 EFI_STATUS
270 UnixUgaInitializeSimpleTextInForWindow (
271 IN UGA_PRIVATE_DATA *Private
272 )
273 /*++
274
275 Routine Description:
276
277 TODO: Add function description
278
279 Arguments:
280
281 Private - TODO: add argument description
282
283 Returns:
284
285 TODO: add return values
286
287 --*/
288 ;
289 #endif