]>
Commit | Line | Data |
---|---|---|
eaf4f336 | 1 | /** @file\r |
2 | QEMU Video Controller Driver\r | |
3 | \r | |
cd514773 | 4 | Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>\r |
b26f0cf9 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
eaf4f336 | 6 | \r |
7 | **/\r | |
8 | \r | |
9 | //\r | |
10 | // QEMU Video Controller Driver\r | |
11 | //\r | |
12 | \r | |
13 | #ifndef _QEMU_H_\r | |
14 | #define _QEMU_H_\r | |
15 | \r | |
eaf4f336 | 16 | #include <Uefi.h>\r |
17 | #include <Protocol/GraphicsOutput.h>\r | |
18 | #include <Protocol/PciIo.h>\r | |
19 | #include <Protocol/DriverSupportedEfiVersion.h>\r | |
20 | #include <Protocol/DevicePath.h>\r | |
21 | \r | |
22 | #include <Library/DebugLib.h>\r | |
23 | #include <Library/UefiDriverEntryPoint.h>\r | |
24 | #include <Library/UefiLib.h>\r | |
25 | #include <Library/PcdLib.h>\r | |
26 | #include <Library/MemoryAllocationLib.h>\r | |
27 | #include <Library/UefiBootServicesTableLib.h>\r | |
28 | #include <Library/BaseMemoryLib.h>\r | |
29 | #include <Library/DevicePathLib.h>\r | |
30 | #include <Library/TimerLib.h>\r | |
5b2291f9 | 31 | #include <Library/FrameBufferBltLib.h>\r |
eaf4f336 | 32 | \r |
33 | #include <IndustryStandard/Pci.h>\r | |
5b2291f9 | 34 | #include <IndustryStandard/Acpi.h>\r |
eaf4f336 | 35 | \r |
36 | //\r | |
37 | // QEMU Video PCI Configuration Header values\r | |
38 | //\r | |
ac0a286f MK |
39 | #define CIRRUS_LOGIC_VENDOR_ID 0x1013\r |
40 | #define CIRRUS_LOGIC_5430_DEVICE_ID 0x00a8\r | |
41 | #define CIRRUS_LOGIC_5430_ALTERNATE_DEVICE_ID 0x00a0\r | |
42 | #define CIRRUS_LOGIC_5446_DEVICE_ID 0x00b8\r | |
eaf4f336 | 43 | \r |
44 | //\r | |
45 | // QEMU Vide Graphical Mode Data\r | |
46 | //\r | |
47 | typedef struct {\r | |
ac0a286f MK |
48 | UINT32 InternalModeIndex; // points into card-specific mode table\r |
49 | UINT32 HorizontalResolution;\r | |
50 | UINT32 VerticalResolution;\r | |
51 | UINT32 ColorDepth;\r | |
eaf4f336 | 52 | } QEMU_VIDEO_MODE_DATA;\r |
53 | \r | |
ac0a286f MK |
54 | #define PIXEL_RED_SHIFT 0\r |
55 | #define PIXEL_GREEN_SHIFT 3\r | |
56 | #define PIXEL_BLUE_SHIFT 6\r | |
eaf4f336 | 57 | \r |
58 | #define PIXEL_RED_MASK (BIT7 | BIT6 | BIT5)\r | |
59 | #define PIXEL_GREEN_MASK (BIT4 | BIT3 | BIT2)\r | |
60 | #define PIXEL_BLUE_MASK (BIT1 | BIT0)\r | |
61 | \r | |
ac0a286f MK |
62 | #define PIXEL_TO_COLOR_BYTE(pixel, mask, shift) ((UINT8) ((pixel & mask) << shift))\r |
63 | #define PIXEL_TO_RED_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_RED_MASK, PIXEL_RED_SHIFT)\r | |
64 | #define PIXEL_TO_GREEN_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_GREEN_MASK, PIXEL_GREEN_SHIFT)\r | |
65 | #define PIXEL_TO_BLUE_BYTE(pixel) PIXEL_TO_COLOR_BYTE(pixel, PIXEL_BLUE_MASK, PIXEL_BLUE_SHIFT)\r | |
eaf4f336 | 66 | \r |
67 | #define RGB_BYTES_TO_PIXEL(Red, Green, Blue) \\r | |
68 | (UINT8) ( (((Red) >> PIXEL_RED_SHIFT) & PIXEL_RED_MASK) | \\r | |
69 | (((Green) >> PIXEL_GREEN_SHIFT) & PIXEL_GREEN_MASK) | \\r | |
70 | (((Blue) >> PIXEL_BLUE_SHIFT) & PIXEL_BLUE_MASK) )\r | |
71 | \r | |
72 | #define PIXEL24_RED_MASK 0x00ff0000\r | |
73 | #define PIXEL24_GREEN_MASK 0x0000ff00\r | |
74 | #define PIXEL24_BLUE_MASK 0x000000ff\r | |
75 | \r | |
76 | #define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff\r | |
77 | \r | |
78 | //\r | |
79 | // QEMU Video Private Data Structure\r | |
80 | //\r | |
81 | #define QEMU_VIDEO_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('Q', 'V', 'I', 'D')\r | |
82 | \r | |
212aac55 | 83 | typedef enum {\r |
84 | QEMU_VIDEO_CIRRUS_5430 = 1,\r | |
85 | QEMU_VIDEO_CIRRUS_5446,\r | |
54f9b9ac | 86 | QEMU_VIDEO_BOCHS,\r |
cdb4f5dc | 87 | QEMU_VIDEO_BOCHS_MMIO,\r |
d021868c | 88 | QEMU_VIDEO_VMWARE_SVGA,\r |
212aac55 | 89 | } QEMU_VIDEO_VARIANT;\r |
90 | \r | |
91 | typedef struct {\r | |
ac0a286f MK |
92 | UINT8 SubClass;\r |
93 | UINT16 VendorId;\r | |
94 | UINT16 DeviceId;\r | |
95 | QEMU_VIDEO_VARIANT Variant;\r | |
96 | CHAR16 *Name;\r | |
212aac55 | 97 | } QEMU_VIDEO_CARD;\r |
98 | \r | |
eaf4f336 | 99 | typedef struct {\r |
ac0a286f MK |
100 | UINT64 Signature;\r |
101 | EFI_HANDLE Handle;\r | |
102 | EFI_PCI_IO_PROTOCOL *PciIo;\r | |
103 | UINT64 OriginalPciAttributes;\r | |
104 | EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;\r | |
105 | EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;\r | |
cd152610 LE |
106 | \r |
107 | //\r | |
37b9c0a6 LE |
108 | // The next two fields match the client-visible\r |
109 | // EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE.MaxMode field.\r | |
cd152610 | 110 | //\r |
ac0a286f MK |
111 | UINTN MaxMode;\r |
112 | QEMU_VIDEO_MODE_DATA *ModeData;\r | |
cd152610 | 113 | \r |
ac0a286f MK |
114 | QEMU_VIDEO_VARIANT Variant;\r |
115 | FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;\r | |
116 | UINTN FrameBufferBltConfigureSize;\r | |
117 | UINT8 FrameBufferVramBarIndex;\r | |
eaf4f336 | 118 | } QEMU_VIDEO_PRIVATE_DATA;\r |
119 | \r | |
120 | ///\r | |
cd152610 | 121 | /// Card-specific Video Mode structures\r |
eaf4f336 | 122 | ///\r |
123 | typedef struct {\r | |
ac0a286f MK |
124 | UINT32 Width;\r |
125 | UINT32 Height;\r | |
126 | UINT32 ColorDepth;\r | |
127 | UINT8 *CrtcSettings;\r | |
128 | UINT16 *SeqSettings;\r | |
129 | UINT8 MiscSetting;\r | |
212aac55 | 130 | } QEMU_VIDEO_CIRRUS_MODES;\r |
eaf4f336 | 131 | \r |
54f9b9ac | 132 | typedef struct {\r |
ac0a286f MK |
133 | UINT32 Width;\r |
134 | UINT32 Height;\r | |
54f9b9ac | 135 | } QEMU_VIDEO_BOCHS_MODES;\r |
136 | \r | |
eaf4f336 | 137 | #define QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS(a) \\r |
138 | CR(a, QEMU_VIDEO_PRIVATE_DATA, GraphicsOutput, QEMU_VIDEO_PRIVATE_DATA_SIGNATURE)\r | |
139 | \r | |
eaf4f336 | 140 | //\r |
141 | // Global Variables\r | |
142 | //\r | |
ac0a286f MK |
143 | extern UINT8 AttributeController[];\r |
144 | extern UINT8 GraphicsController[];\r | |
145 | extern UINT8 Crtc_640_480_256_60[];\r | |
146 | extern UINT16 Seq_640_480_256_60[];\r | |
147 | extern UINT8 Crtc_800_600_256_60[];\r | |
148 | extern UINT16 Seq_800_600_256_60[];\r | |
149 | extern UINT8 Crtc_1024_768_256_60[];\r | |
150 | extern UINT16 Seq_1024_768_256_60[];\r | |
151 | extern QEMU_VIDEO_CIRRUS_MODES QemuVideoCirrusModes[];\r | |
ac0a286f MK |
152 | extern EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding;\r |
153 | extern EFI_COMPONENT_NAME_PROTOCOL gQemuVideoComponentName;\r | |
154 | extern EFI_COMPONENT_NAME2_PROTOCOL gQemuVideoComponentName2;\r | |
eaf4f336 | 155 | \r |
156 | //\r | |
157 | // Io Registers defined by VGA\r | |
158 | //\r | |
ac0a286f MK |
159 | #define CRTC_ADDRESS_REGISTER 0x3d4\r |
160 | #define CRTC_DATA_REGISTER 0x3d5\r | |
161 | #define SEQ_ADDRESS_REGISTER 0x3c4\r | |
162 | #define SEQ_DATA_REGISTER 0x3c5\r | |
163 | #define GRAPH_ADDRESS_REGISTER 0x3ce\r | |
164 | #define GRAPH_DATA_REGISTER 0x3cf\r | |
165 | #define ATT_ADDRESS_REGISTER 0x3c0\r | |
166 | #define MISC_OUTPUT_REGISTER 0x3c2\r | |
167 | #define INPUT_STATUS_1_REGISTER 0x3da\r | |
168 | #define DAC_PIXEL_MASK_REGISTER 0x3c6\r | |
169 | #define PALETTE_INDEX_REGISTER 0x3c8\r | |
170 | #define PALETTE_DATA_REGISTER 0x3c9\r | |
171 | \r | |
172 | #define VBE_DISPI_IOPORT_INDEX 0x01CE\r | |
173 | #define VBE_DISPI_IOPORT_DATA 0x01D0\r | |
174 | \r | |
175 | #define VBE_DISPI_INDEX_ID 0x0\r | |
176 | #define VBE_DISPI_INDEX_XRES 0x1\r | |
177 | #define VBE_DISPI_INDEX_YRES 0x2\r | |
178 | #define VBE_DISPI_INDEX_BPP 0x3\r | |
179 | #define VBE_DISPI_INDEX_ENABLE 0x4\r | |
180 | #define VBE_DISPI_INDEX_BANK 0x5\r | |
181 | #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6\r | |
182 | #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7\r | |
183 | #define VBE_DISPI_INDEX_X_OFFSET 0x8\r | |
184 | #define VBE_DISPI_INDEX_Y_OFFSET 0x9\r | |
185 | #define VBE_DISPI_INDEX_VIDEO_MEMORY_64K 0xa\r | |
186 | \r | |
187 | #define VBE_DISPI_ID0 0xB0C0\r | |
188 | #define VBE_DISPI_ID1 0xB0C1\r | |
189 | #define VBE_DISPI_ID2 0xB0C2\r | |
190 | #define VBE_DISPI_ID3 0xB0C3\r | |
191 | #define VBE_DISPI_ID4 0xB0C4\r | |
192 | #define VBE_DISPI_ID5 0xB0C5\r | |
193 | \r | |
194 | #define VBE_DISPI_DISABLED 0x00\r | |
195 | #define VBE_DISPI_ENABLED 0x01\r | |
196 | #define VBE_DISPI_GETCAPS 0x02\r | |
197 | #define VBE_DISPI_8BIT_DAC 0x20\r | |
198 | #define VBE_DISPI_LFB_ENABLED 0x40\r | |
199 | #define VBE_DISPI_NOCLEARMEM 0x80\r | |
eaf4f336 | 200 | \r |
201 | //\r | |
202 | // Graphics Output Hardware abstraction internal worker functions\r | |
203 | //\r | |
204 | EFI_STATUS\r | |
205 | QemuVideoGraphicsOutputConstructor (\r | |
206 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
207 | );\r | |
208 | \r | |
209 | EFI_STATUS\r | |
210 | QemuVideoGraphicsOutputDestructor (\r | |
211 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
212 | );\r | |
213 | \r | |
eaf4f336 | 214 | //\r |
215 | // EFI_DRIVER_BINDING_PROTOCOL Protocol Interface\r | |
216 | //\r | |
ac0a286f | 217 | \r |
eaf4f336 | 218 | /**\r |
219 | TODO: Add function description\r | |
220 | \r | |
221 | @param This TODO: add argument description\r | |
222 | @param Controller TODO: add argument description\r | |
223 | @param RemainingDevicePath TODO: add argument description\r | |
224 | \r | |
225 | TODO: add return values\r | |
226 | \r | |
227 | **/\r | |
228 | EFI_STATUS\r | |
229 | EFIAPI\r | |
230 | QemuVideoControllerDriverSupported (\r | |
231 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
232 | IN EFI_HANDLE Controller,\r | |
233 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
234 | );\r | |
235 | \r | |
236 | /**\r | |
237 | TODO: Add function description\r | |
238 | \r | |
239 | @param This TODO: add argument description\r | |
240 | @param Controller TODO: add argument description\r | |
241 | @param RemainingDevicePath TODO: add argument description\r | |
242 | \r | |
243 | TODO: add return values\r | |
244 | \r | |
245 | **/\r | |
246 | EFI_STATUS\r | |
247 | EFIAPI\r | |
248 | QemuVideoControllerDriverStart (\r | |
249 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
250 | IN EFI_HANDLE Controller,\r | |
251 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
252 | );\r | |
253 | \r | |
254 | /**\r | |
255 | TODO: Add function description\r | |
256 | \r | |
257 | @param This TODO: add argument description\r | |
258 | @param Controller TODO: add argument description\r | |
259 | @param NumberOfChildren TODO: add argument description\r | |
260 | @param ChildHandleBuffer TODO: add argument description\r | |
261 | \r | |
262 | TODO: add return values\r | |
263 | \r | |
264 | **/\r | |
265 | EFI_STATUS\r | |
266 | EFIAPI\r | |
267 | QemuVideoControllerDriverStop (\r | |
268 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
269 | IN EFI_HANDLE Controller,\r | |
270 | IN UINTN NumberOfChildren,\r | |
271 | IN EFI_HANDLE *ChildHandleBuffer\r | |
272 | );\r | |
273 | \r | |
274 | //\r | |
275 | // EFI Component Name Functions\r | |
276 | //\r | |
ac0a286f | 277 | \r |
eaf4f336 | 278 | /**\r |
279 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
280 | \r | |
281 | This function retrieves the user readable name of a driver in the form of a\r | |
282 | Unicode string. If the driver specified by This has a user readable name in\r | |
283 | the language specified by Language, then a pointer to the driver name is\r | |
284 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
285 | by This does not support the language specified by Language,\r | |
286 | then EFI_UNSUPPORTED is returned.\r | |
287 | \r | |
288 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
289 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
290 | \r | |
291 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
292 | array indicating the language. This is the\r | |
293 | language of the driver name that the caller is\r | |
294 | requesting, and it must match one of the\r | |
295 | languages specified in SupportedLanguages. The\r | |
296 | number of languages supported by a driver is up\r | |
297 | to the driver writer. Language is specified\r | |
298 | in RFC 4646 or ISO 639-2 language code format.\r | |
299 | \r | |
300 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
301 | This Unicode string is the name of the\r | |
302 | driver specified by This in the language\r | |
303 | specified by Language.\r | |
304 | \r | |
305 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
306 | This and the language specified by Language was\r | |
307 | returned in DriverName.\r | |
308 | \r | |
309 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
310 | \r | |
311 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
312 | \r | |
313 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
314 | the language specified by Language.\r | |
315 | \r | |
316 | **/\r | |
317 | EFI_STATUS\r | |
318 | EFIAPI\r | |
319 | QemuVideoComponentNameGetDriverName (\r | |
320 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
321 | IN CHAR8 *Language,\r | |
322 | OUT CHAR16 **DriverName\r | |
323 | );\r | |
324 | \r | |
eaf4f336 | 325 | /**\r |
326 | Retrieves a Unicode string that is the user readable name of the controller\r | |
327 | that is being managed by a driver.\r | |
328 | \r | |
329 | This function retrieves the user readable name of the controller specified by\r | |
330 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
331 | driver specified by This has a user readable name in the language specified by\r | |
332 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
333 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
334 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
335 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
336 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
337 | \r | |
338 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
339 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
340 | \r | |
341 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
342 | specified by This is managing. This handle\r | |
343 | specifies the controller whose name is to be\r | |
344 | returned.\r | |
345 | \r | |
346 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
347 | the name of. This is an optional parameter that\r | |
348 | may be NULL. It will be NULL for device\r | |
349 | drivers. It will also be NULL for a bus drivers\r | |
350 | that wish to retrieve the name of the bus\r | |
351 | controller. It will not be NULL for a bus\r | |
352 | driver that wishes to retrieve the name of a\r | |
353 | child controller.\r | |
354 | \r | |
355 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
356 | array indicating the language. This is the\r | |
357 | language of the driver name that the caller is\r | |
358 | requesting, and it must match one of the\r | |
359 | languages specified in SupportedLanguages. The\r | |
360 | number of languages supported by a driver is up\r | |
361 | to the driver writer. Language is specified in\r | |
362 | RFC 4646 or ISO 639-2 language code format.\r | |
363 | \r | |
364 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
365 | This Unicode string is the name of the\r | |
366 | controller specified by ControllerHandle and\r | |
367 | ChildHandle in the language specified by\r | |
368 | Language from the point of view of the driver\r | |
369 | specified by This.\r | |
370 | \r | |
371 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
372 | the language specified by Language for the\r | |
373 | driver specified by This was returned in\r | |
374 | DriverName.\r | |
375 | \r | |
376 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
377 | \r | |
378 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
379 | EFI_HANDLE.\r | |
380 | \r | |
381 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
382 | \r | |
383 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
384 | \r | |
385 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
386 | managing the controller specified by\r | |
387 | ControllerHandle and ChildHandle.\r | |
388 | \r | |
389 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
390 | the language specified by Language.\r | |
391 | \r | |
392 | **/\r | |
393 | EFI_STATUS\r | |
394 | EFIAPI\r | |
395 | QemuVideoComponentNameGetControllerName (\r | |
ac0a286f MK |
396 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r |
397 | IN EFI_HANDLE ControllerHandle,\r | |
398 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
399 | IN CHAR8 *Language,\r | |
400 | OUT CHAR16 **ControllerName\r | |
eaf4f336 | 401 | );\r |
402 | \r | |
eaf4f336 | 403 | //\r |
404 | // Local Function Prototypes\r | |
405 | //\r | |
406 | VOID\r | |
212aac55 | 407 | InitializeCirrusGraphicsMode (\r |
eaf4f336 | 408 | QEMU_VIDEO_PRIVATE_DATA *Private,\r |
212aac55 | 409 | QEMU_VIDEO_CIRRUS_MODES *ModeData\r |
eaf4f336 | 410 | );\r |
411 | \r | |
54f9b9ac | 412 | VOID\r |
413 | InitializeBochsGraphicsMode (\r | |
414 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
7f25ddbc | 415 | QEMU_VIDEO_MODE_DATA *ModeData\r |
54f9b9ac | 416 | );\r |
417 | \r | |
eaf4f336 | 418 | VOID\r |
419 | SetPaletteColor (\r | |
420 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
421 | UINTN Index,\r |
422 | UINT8 Red,\r | |
423 | UINT8 Green,\r | |
424 | UINT8 Blue\r | |
eaf4f336 | 425 | );\r |
426 | \r | |
427 | VOID\r | |
428 | SetDefaultPalette (\r | |
429 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
430 | );\r | |
431 | \r | |
432 | VOID\r | |
433 | DrawLogo (\r | |
434 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
435 | UINTN ScreenWidth,\r |
436 | UINTN ScreenHeight\r | |
eaf4f336 | 437 | );\r |
438 | \r | |
439 | VOID\r | |
440 | outb (\r | |
441 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
442 | UINTN Address,\r |
443 | UINT8 Data\r | |
eaf4f336 | 444 | );\r |
445 | \r | |
446 | VOID\r | |
447 | outw (\r | |
448 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
449 | UINTN Address,\r |
450 | UINT16 Data\r | |
eaf4f336 | 451 | );\r |
452 | \r | |
453 | UINT8\r | |
454 | inb (\r | |
455 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f | 456 | UINTN Address\r |
eaf4f336 | 457 | );\r |
458 | \r | |
459 | UINT16\r | |
460 | inw (\r | |
461 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f | 462 | UINTN Address\r |
eaf4f336 | 463 | );\r |
464 | \r | |
54f9b9ac | 465 | VOID\r |
466 | BochsWrite (\r | |
467 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
468 | UINT16 Reg,\r | |
469 | UINT16 Data\r | |
470 | );\r | |
471 | \r | |
472 | UINT16\r | |
473 | BochsRead (\r | |
474 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
475 | UINT16 Reg\r | |
476 | );\r | |
477 | \r | |
cdb4f5dc | 478 | VOID\r |
479 | VgaOutb (\r | |
480 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
481 | UINTN Reg,\r | |
482 | UINT8 Data\r | |
483 | );\r | |
484 | \r | |
eaf4f336 | 485 | EFI_STATUS\r |
212aac55 | 486 | QemuVideoCirrusModeSetup (\r |
eaf4f336 | 487 | QEMU_VIDEO_PRIVATE_DATA *Private\r |
488 | );\r | |
489 | \r | |
54f9b9ac | 490 | EFI_STATUS\r |
491 | QemuVideoBochsModeSetup (\r | |
b37bcfd6 LE |
492 | QEMU_VIDEO_PRIVATE_DATA *Private,\r |
493 | BOOLEAN IsQxl\r | |
54f9b9ac | 494 | );\r |
495 | \r | |
90803342 LE |
496 | VOID\r |
497 | InstallVbeShim (\r | |
ac0a286f MK |
498 | IN CONST CHAR16 *CardName,\r |
499 | IN EFI_PHYSICAL_ADDRESS FrameBufferBase\r | |
90803342 | 500 | );\r |
ac0a286f | 501 | \r |
eaf4f336 | 502 | #endif\r |