]>
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 | |
49a2d8cb GH |
118 | \r |
119 | UINT8 Edid[128];\r | |
eaf4f336 | 120 | } QEMU_VIDEO_PRIVATE_DATA;\r |
121 | \r | |
122 | ///\r | |
cd152610 | 123 | /// Card-specific Video Mode structures\r |
eaf4f336 | 124 | ///\r |
125 | typedef struct {\r | |
ac0a286f MK |
126 | UINT32 Width;\r |
127 | UINT32 Height;\r | |
128 | UINT32 ColorDepth;\r | |
129 | UINT8 *CrtcSettings;\r | |
130 | UINT16 *SeqSettings;\r | |
131 | UINT8 MiscSetting;\r | |
212aac55 | 132 | } QEMU_VIDEO_CIRRUS_MODES;\r |
eaf4f336 | 133 | \r |
54f9b9ac | 134 | typedef struct {\r |
ac0a286f MK |
135 | UINT32 Width;\r |
136 | UINT32 Height;\r | |
54f9b9ac | 137 | } QEMU_VIDEO_BOCHS_MODES;\r |
138 | \r | |
eaf4f336 | 139 | #define QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS(a) \\r |
140 | CR(a, QEMU_VIDEO_PRIVATE_DATA, GraphicsOutput, QEMU_VIDEO_PRIVATE_DATA_SIGNATURE)\r | |
141 | \r | |
eaf4f336 | 142 | //\r |
143 | // Global Variables\r | |
144 | //\r | |
ac0a286f MK |
145 | extern UINT8 AttributeController[];\r |
146 | extern UINT8 GraphicsController[];\r | |
147 | extern UINT8 Crtc_640_480_256_60[];\r | |
148 | extern UINT16 Seq_640_480_256_60[];\r | |
149 | extern UINT8 Crtc_800_600_256_60[];\r | |
150 | extern UINT16 Seq_800_600_256_60[];\r | |
151 | extern UINT8 Crtc_1024_768_256_60[];\r | |
152 | extern UINT16 Seq_1024_768_256_60[];\r | |
153 | extern QEMU_VIDEO_CIRRUS_MODES QemuVideoCirrusModes[];\r | |
ac0a286f MK |
154 | extern EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding;\r |
155 | extern EFI_COMPONENT_NAME_PROTOCOL gQemuVideoComponentName;\r | |
156 | extern EFI_COMPONENT_NAME2_PROTOCOL gQemuVideoComponentName2;\r | |
eaf4f336 | 157 | \r |
158 | //\r | |
159 | // Io Registers defined by VGA\r | |
160 | //\r | |
ac0a286f MK |
161 | #define CRTC_ADDRESS_REGISTER 0x3d4\r |
162 | #define CRTC_DATA_REGISTER 0x3d5\r | |
163 | #define SEQ_ADDRESS_REGISTER 0x3c4\r | |
164 | #define SEQ_DATA_REGISTER 0x3c5\r | |
165 | #define GRAPH_ADDRESS_REGISTER 0x3ce\r | |
166 | #define GRAPH_DATA_REGISTER 0x3cf\r | |
167 | #define ATT_ADDRESS_REGISTER 0x3c0\r | |
168 | #define MISC_OUTPUT_REGISTER 0x3c2\r | |
169 | #define INPUT_STATUS_1_REGISTER 0x3da\r | |
170 | #define DAC_PIXEL_MASK_REGISTER 0x3c6\r | |
171 | #define PALETTE_INDEX_REGISTER 0x3c8\r | |
172 | #define PALETTE_DATA_REGISTER 0x3c9\r | |
173 | \r | |
174 | #define VBE_DISPI_IOPORT_INDEX 0x01CE\r | |
175 | #define VBE_DISPI_IOPORT_DATA 0x01D0\r | |
176 | \r | |
177 | #define VBE_DISPI_INDEX_ID 0x0\r | |
178 | #define VBE_DISPI_INDEX_XRES 0x1\r | |
179 | #define VBE_DISPI_INDEX_YRES 0x2\r | |
180 | #define VBE_DISPI_INDEX_BPP 0x3\r | |
181 | #define VBE_DISPI_INDEX_ENABLE 0x4\r | |
182 | #define VBE_DISPI_INDEX_BANK 0x5\r | |
183 | #define VBE_DISPI_INDEX_VIRT_WIDTH 0x6\r | |
184 | #define VBE_DISPI_INDEX_VIRT_HEIGHT 0x7\r | |
185 | #define VBE_DISPI_INDEX_X_OFFSET 0x8\r | |
186 | #define VBE_DISPI_INDEX_Y_OFFSET 0x9\r | |
187 | #define VBE_DISPI_INDEX_VIDEO_MEMORY_64K 0xa\r | |
188 | \r | |
189 | #define VBE_DISPI_ID0 0xB0C0\r | |
190 | #define VBE_DISPI_ID1 0xB0C1\r | |
191 | #define VBE_DISPI_ID2 0xB0C2\r | |
192 | #define VBE_DISPI_ID3 0xB0C3\r | |
193 | #define VBE_DISPI_ID4 0xB0C4\r | |
194 | #define VBE_DISPI_ID5 0xB0C5\r | |
195 | \r | |
196 | #define VBE_DISPI_DISABLED 0x00\r | |
197 | #define VBE_DISPI_ENABLED 0x01\r | |
198 | #define VBE_DISPI_GETCAPS 0x02\r | |
199 | #define VBE_DISPI_8BIT_DAC 0x20\r | |
200 | #define VBE_DISPI_LFB_ENABLED 0x40\r | |
201 | #define VBE_DISPI_NOCLEARMEM 0x80\r | |
eaf4f336 | 202 | \r |
203 | //\r | |
204 | // Graphics Output Hardware abstraction internal worker functions\r | |
205 | //\r | |
206 | EFI_STATUS\r | |
207 | QemuVideoGraphicsOutputConstructor (\r | |
208 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
209 | );\r | |
210 | \r | |
211 | EFI_STATUS\r | |
212 | QemuVideoGraphicsOutputDestructor (\r | |
213 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
214 | );\r | |
215 | \r | |
eaf4f336 | 216 | //\r |
217 | // EFI_DRIVER_BINDING_PROTOCOL Protocol Interface\r | |
218 | //\r | |
ac0a286f | 219 | \r |
eaf4f336 | 220 | /**\r |
221 | TODO: Add function description\r | |
222 | \r | |
223 | @param This TODO: add argument description\r | |
224 | @param Controller TODO: add argument description\r | |
225 | @param RemainingDevicePath TODO: add argument description\r | |
226 | \r | |
227 | TODO: add return values\r | |
228 | \r | |
229 | **/\r | |
230 | EFI_STATUS\r | |
231 | EFIAPI\r | |
232 | QemuVideoControllerDriverSupported (\r | |
233 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
234 | IN EFI_HANDLE Controller,\r | |
235 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
236 | );\r | |
237 | \r | |
238 | /**\r | |
239 | TODO: Add function description\r | |
240 | \r | |
241 | @param This TODO: add argument description\r | |
242 | @param Controller TODO: add argument description\r | |
243 | @param RemainingDevicePath TODO: add argument description\r | |
244 | \r | |
245 | TODO: add return values\r | |
246 | \r | |
247 | **/\r | |
248 | EFI_STATUS\r | |
249 | EFIAPI\r | |
250 | QemuVideoControllerDriverStart (\r | |
251 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
252 | IN EFI_HANDLE Controller,\r | |
253 | IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r | |
254 | );\r | |
255 | \r | |
256 | /**\r | |
257 | TODO: Add function description\r | |
258 | \r | |
259 | @param This TODO: add argument description\r | |
260 | @param Controller TODO: add argument description\r | |
261 | @param NumberOfChildren TODO: add argument description\r | |
262 | @param ChildHandleBuffer TODO: add argument description\r | |
263 | \r | |
264 | TODO: add return values\r | |
265 | \r | |
266 | **/\r | |
267 | EFI_STATUS\r | |
268 | EFIAPI\r | |
269 | QemuVideoControllerDriverStop (\r | |
270 | IN EFI_DRIVER_BINDING_PROTOCOL *This,\r | |
271 | IN EFI_HANDLE Controller,\r | |
272 | IN UINTN NumberOfChildren,\r | |
273 | IN EFI_HANDLE *ChildHandleBuffer\r | |
274 | );\r | |
275 | \r | |
276 | //\r | |
277 | // EFI Component Name Functions\r | |
278 | //\r | |
ac0a286f | 279 | \r |
eaf4f336 | 280 | /**\r |
281 | Retrieves a Unicode string that is the user readable name of the driver.\r | |
282 | \r | |
283 | This function retrieves the user readable name of a driver in the form of a\r | |
284 | Unicode string. If the driver specified by This has a user readable name in\r | |
285 | the language specified by Language, then a pointer to the driver name is\r | |
286 | returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r | |
287 | by This does not support the language specified by Language,\r | |
288 | then EFI_UNSUPPORTED is returned.\r | |
289 | \r | |
290 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
291 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
292 | \r | |
293 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
294 | array indicating the language. This is the\r | |
295 | language of the driver name that the caller is\r | |
296 | requesting, and it must match one of the\r | |
297 | languages specified in SupportedLanguages. The\r | |
298 | number of languages supported by a driver is up\r | |
299 | to the driver writer. Language is specified\r | |
300 | in RFC 4646 or ISO 639-2 language code format.\r | |
301 | \r | |
302 | @param DriverName[out] A pointer to the Unicode string to return.\r | |
303 | This Unicode string is the name of the\r | |
304 | driver specified by This in the language\r | |
305 | specified by Language.\r | |
306 | \r | |
307 | @retval EFI_SUCCESS The Unicode string for the Driver specified by\r | |
308 | This and the language specified by Language was\r | |
309 | returned in DriverName.\r | |
310 | \r | |
311 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
312 | \r | |
313 | @retval EFI_INVALID_PARAMETER DriverName is NULL.\r | |
314 | \r | |
315 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
316 | the language specified by Language.\r | |
317 | \r | |
318 | **/\r | |
319 | EFI_STATUS\r | |
320 | EFIAPI\r | |
321 | QemuVideoComponentNameGetDriverName (\r | |
322 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r | |
323 | IN CHAR8 *Language,\r | |
324 | OUT CHAR16 **DriverName\r | |
325 | );\r | |
326 | \r | |
eaf4f336 | 327 | /**\r |
328 | Retrieves a Unicode string that is the user readable name of the controller\r | |
329 | that is being managed by a driver.\r | |
330 | \r | |
331 | This function retrieves the user readable name of the controller specified by\r | |
332 | ControllerHandle and ChildHandle in the form of a Unicode string. If the\r | |
333 | driver specified by This has a user readable name in the language specified by\r | |
334 | Language, then a pointer to the controller name is returned in ControllerName,\r | |
335 | and EFI_SUCCESS is returned. If the driver specified by This is not currently\r | |
336 | managing the controller specified by ControllerHandle and ChildHandle,\r | |
337 | then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r | |
338 | support the language specified by Language, then EFI_UNSUPPORTED is returned.\r | |
339 | \r | |
340 | @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r | |
341 | EFI_COMPONENT_NAME_PROTOCOL instance.\r | |
342 | \r | |
343 | @param ControllerHandle[in] The handle of a controller that the driver\r | |
344 | specified by This is managing. This handle\r | |
345 | specifies the controller whose name is to be\r | |
346 | returned.\r | |
347 | \r | |
348 | @param ChildHandle[in] The handle of the child controller to retrieve\r | |
349 | the name of. This is an optional parameter that\r | |
350 | may be NULL. It will be NULL for device\r | |
351 | drivers. It will also be NULL for a bus drivers\r | |
352 | that wish to retrieve the name of the bus\r | |
353 | controller. It will not be NULL for a bus\r | |
354 | driver that wishes to retrieve the name of a\r | |
355 | child controller.\r | |
356 | \r | |
357 | @param Language[in] A pointer to a Null-terminated ASCII string\r | |
358 | array indicating the language. This is the\r | |
359 | language of the driver name that the caller is\r | |
360 | requesting, and it must match one of the\r | |
361 | languages specified in SupportedLanguages. The\r | |
362 | number of languages supported by a driver is up\r | |
363 | to the driver writer. Language is specified in\r | |
364 | RFC 4646 or ISO 639-2 language code format.\r | |
365 | \r | |
366 | @param ControllerName[out] A pointer to the Unicode string to return.\r | |
367 | This Unicode string is the name of the\r | |
368 | controller specified by ControllerHandle and\r | |
369 | ChildHandle in the language specified by\r | |
370 | Language from the point of view of the driver\r | |
371 | specified by This.\r | |
372 | \r | |
373 | @retval EFI_SUCCESS The Unicode string for the user readable name in\r | |
374 | the language specified by Language for the\r | |
375 | driver specified by This was returned in\r | |
376 | DriverName.\r | |
377 | \r | |
378 | @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.\r | |
379 | \r | |
380 | @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r | |
381 | EFI_HANDLE.\r | |
382 | \r | |
383 | @retval EFI_INVALID_PARAMETER Language is NULL.\r | |
384 | \r | |
385 | @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r | |
386 | \r | |
387 | @retval EFI_UNSUPPORTED The driver specified by This is not currently\r | |
388 | managing the controller specified by\r | |
389 | ControllerHandle and ChildHandle.\r | |
390 | \r | |
391 | @retval EFI_UNSUPPORTED The driver specified by This does not support\r | |
392 | the language specified by Language.\r | |
393 | \r | |
394 | **/\r | |
395 | EFI_STATUS\r | |
396 | EFIAPI\r | |
397 | QemuVideoComponentNameGetControllerName (\r | |
ac0a286f MK |
398 | IN EFI_COMPONENT_NAME_PROTOCOL *This,\r |
399 | IN EFI_HANDLE ControllerHandle,\r | |
400 | IN EFI_HANDLE ChildHandle OPTIONAL,\r | |
401 | IN CHAR8 *Language,\r | |
402 | OUT CHAR16 **ControllerName\r | |
eaf4f336 | 403 | );\r |
404 | \r | |
eaf4f336 | 405 | //\r |
406 | // Local Function Prototypes\r | |
407 | //\r | |
408 | VOID\r | |
212aac55 | 409 | InitializeCirrusGraphicsMode (\r |
eaf4f336 | 410 | QEMU_VIDEO_PRIVATE_DATA *Private,\r |
212aac55 | 411 | QEMU_VIDEO_CIRRUS_MODES *ModeData\r |
eaf4f336 | 412 | );\r |
413 | \r | |
54f9b9ac | 414 | VOID\r |
415 | InitializeBochsGraphicsMode (\r | |
416 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
7f25ddbc | 417 | QEMU_VIDEO_MODE_DATA *ModeData\r |
54f9b9ac | 418 | );\r |
419 | \r | |
eaf4f336 | 420 | VOID\r |
421 | SetPaletteColor (\r | |
422 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
423 | UINTN Index,\r |
424 | UINT8 Red,\r | |
425 | UINT8 Green,\r | |
426 | UINT8 Blue\r | |
eaf4f336 | 427 | );\r |
428 | \r | |
429 | VOID\r | |
430 | SetDefaultPalette (\r | |
431 | QEMU_VIDEO_PRIVATE_DATA *Private\r | |
432 | );\r | |
433 | \r | |
434 | VOID\r | |
435 | DrawLogo (\r | |
436 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
437 | UINTN ScreenWidth,\r |
438 | UINTN ScreenHeight\r | |
eaf4f336 | 439 | );\r |
440 | \r | |
441 | VOID\r | |
442 | outb (\r | |
443 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
444 | UINTN Address,\r |
445 | UINT8 Data\r | |
eaf4f336 | 446 | );\r |
447 | \r | |
448 | VOID\r | |
449 | outw (\r | |
450 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f MK |
451 | UINTN Address,\r |
452 | UINT16 Data\r | |
eaf4f336 | 453 | );\r |
454 | \r | |
455 | UINT8\r | |
456 | inb (\r | |
457 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f | 458 | UINTN Address\r |
eaf4f336 | 459 | );\r |
460 | \r | |
461 | UINT16\r | |
462 | inw (\r | |
463 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
ac0a286f | 464 | UINTN Address\r |
eaf4f336 | 465 | );\r |
466 | \r | |
54f9b9ac | 467 | VOID\r |
468 | BochsWrite (\r | |
469 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
470 | UINT16 Reg,\r | |
471 | UINT16 Data\r | |
472 | );\r | |
473 | \r | |
474 | UINT16\r | |
475 | BochsRead (\r | |
476 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
477 | UINT16 Reg\r | |
478 | );\r | |
479 | \r | |
cdb4f5dc | 480 | VOID\r |
481 | VgaOutb (\r | |
482 | QEMU_VIDEO_PRIVATE_DATA *Private,\r | |
483 | UINTN Reg,\r | |
484 | UINT8 Data\r | |
485 | );\r | |
486 | \r | |
eaf4f336 | 487 | EFI_STATUS\r |
212aac55 | 488 | QemuVideoCirrusModeSetup (\r |
eaf4f336 | 489 | QEMU_VIDEO_PRIVATE_DATA *Private\r |
490 | );\r | |
491 | \r | |
54f9b9ac | 492 | EFI_STATUS\r |
493 | QemuVideoBochsModeSetup (\r | |
b37bcfd6 LE |
494 | QEMU_VIDEO_PRIVATE_DATA *Private,\r |
495 | BOOLEAN IsQxl\r | |
54f9b9ac | 496 | );\r |
497 | \r | |
90803342 LE |
498 | VOID\r |
499 | InstallVbeShim (\r | |
ac0a286f MK |
500 | IN CONST CHAR16 *CardName,\r |
501 | IN EFI_PHYSICAL_ADDRESS FrameBufferBase\r | |
90803342 | 502 | );\r |
ac0a286f | 503 | \r |
eaf4f336 | 504 | #endif\r |