]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/BiosVideoThunkDxe/BiosVideo.h
CorebootPayloadPkg: Use extra braces to prevent gcc compile fail
[mirror_edk2.git] / DuetPkg / BiosVideoThunkDxe / BiosVideo.h
CommitLineData
f1294e4a 1/** @file\r
7da78b1f 2\r
b1f700a8
HT
3Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
7da78b1f 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
f1294e4a 12**/\r
7da78b1f 13\r
0d92cdc2 14#ifndef _BIOS_GRAPHICS_OUTPUT_H\r
15#define _BIOS_GRAPHICS_OUTPUT_H\r
7da78b1f 16\r
17#include <Uefi.h>\r
18\r
19//\r
20// Driver Consumed Protocol Prototypes\r
21//\r
22#include <Protocol/DevicePath.h>\r
23#include <Protocol/PciIo.h>\r
24#include <Protocol/DriverBinding.h>\r
25#include <Protocol/ComponentName.h>\r
26#include <Protocol/ComponentName2.h>\r
27#include <Protocol/UgaDraw.h>\r
28#include <Protocol/VgaMiniPort.h>\r
29#include <Protocol/Legacy8259.h>\r
0d92cdc2 30#include <Protocol/EdidActive.h>\r
31#include <Protocol/EdidDiscovered.h>\r
32#include <Protocol/DevicePath.h>\r
7da78b1f 33\r
34#include <Library/UefiLib.h>\r
35#include <Library/DebugLib.h>\r
36#include <Library/UefiBootServicesTableLib.h>\r
37#include <Library/BaseMemoryLib.h>\r
0d92cdc2 38#include <Library/DevicePathLib.h>\r
7da78b1f 39\r
1a573c7e 40#include <IndustryStandard/Pci.h>\r
7da78b1f 41\r
42#include "VesaBiosExtensions.h"\r
7da78b1f 43\r
44//\r
45// Packed format support: The number of bits reserved for each of the colors and the actual\r
46// position of RGB in the frame buffer is specified in the VBE Mode information\r
47//\r
48typedef struct {\r
49 UINT8 Position; // Position of the color\r
50 UINT8 Mask; // The number of bits expressed as a mask\r
51} BIOS_VIDEO_COLOR_PLACEMENT;\r
52\r
53//\r
0d92cdc2 54// BIOS Graphics Output Graphical Mode Data\r
7da78b1f 55//\r
56typedef struct {\r
57 UINT16 VbeModeNumber;\r
58 UINT16 BytesPerScanLine;\r
59 VOID *LinearFrameBuffer;\r
0d92cdc2 60 UINTN FrameBufferSize;\r
7da78b1f 61 UINT32 HorizontalResolution;\r
62 UINT32 VerticalResolution;\r
7da78b1f 63 UINT32 RefreshRate;\r
64 UINT32 BitsPerPixel;\r
65 BIOS_VIDEO_COLOR_PLACEMENT Red;\r
66 BIOS_VIDEO_COLOR_PLACEMENT Green;\r
67 BIOS_VIDEO_COLOR_PLACEMENT Blue;\r
0d92cdc2 68 BIOS_VIDEO_COLOR_PLACEMENT Reserved;\r
69 EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;\r
70 EFI_PIXEL_BITMASK PixelBitMask;\r
7da78b1f 71} BIOS_VIDEO_MODE_DATA;\r
72\r
73//\r
0d92cdc2 74// BIOS video child handle private data Structure\r
7da78b1f 75//\r
0d92cdc2 76#define BIOS_VIDEO_DEV_SIGNATURE SIGNATURE_32 ('B', 'V', 'M', 'p')\r
7da78b1f 77\r
78typedef struct {\r
79 UINTN Signature;\r
80 EFI_HANDLE Handle;\r
81\r
82 //\r
f1294e4a 83 // Consumed Protocols inherited from parent controller.\r
7da78b1f 84 //\r
85 EFI_PCI_IO_PROTOCOL *PciIo;\r
0d92cdc2 86 EFI_LEGACY_8259_PROTOCOL *Legacy8259;\r
f1294e4a 87 THUNK_CONTEXT *ThunkContext;\r
88 \r
7da78b1f 89 //\r
90 // Produced Protocols\r
91 //\r
0d92cdc2 92 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;\r
93 EFI_EDID_DISCOVERED_PROTOCOL EdidDiscovered;\r
94 EFI_EDID_ACTIVE_PROTOCOL EdidActive;\r
7da78b1f 95 EFI_VGA_MINI_PORT_PROTOCOL VgaMiniPort;\r
96\r
97 //\r
98 // General fields\r
99 //\r
7da78b1f 100 BOOLEAN VgaCompatible;\r
0d92cdc2 101 BOOLEAN ProduceGraphicsOutput;\r
7da78b1f 102\r
103 //\r
0d92cdc2 104 // Graphics Output Protocol related fields\r
7da78b1f 105 //\r
106 BOOLEAN HardwareNeedsStarting;\r
7da78b1f 107 BIOS_VIDEO_MODE_DATA *ModeData;\r
108 UINT8 *LineBuffer;\r
0d92cdc2 109 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *VbeFrameBuffer;\r
7da78b1f 110 UINT8 *VgaFrameBuffer;\r
111\r
112 //\r
113 // VESA Bios Extensions related fields\r
114 //\r
115 UINTN NumberOfPagesBelow1MB; // Number of 4KB pages in PagesBelow1MB\r
116 EFI_PHYSICAL_ADDRESS PagesBelow1MB; // Buffer for all VBE Information Blocks\r
117 VESA_BIOS_EXTENSIONS_INFORMATION_BLOCK *VbeInformationBlock; // 0x200 bytes. Must be allocated below 1MB\r
118 VESA_BIOS_EXTENSIONS_MODE_INFORMATION_BLOCK *VbeModeInformationBlock; // 0x100 bytes. Must be allocated below 1MB\r
0d92cdc2 119 VESA_BIOS_EXTENSIONS_EDID_DATA_BLOCK *VbeEdidDataBlock; // 0x80 bytes. Must be allocated below 1MB\r
7da78b1f 120 VESA_BIOS_EXTENSIONS_CRTC_INFORMATION_BLOCK *VbeCrtcInformationBlock; // 59 bytes. Must be allocated below 1MB\r
121 UINTN VbeSaveRestorePages; // Number of 4KB pages in VbeSaveRestoreBuffer\r
122 EFI_PHYSICAL_ADDRESS VbeSaveRestoreBuffer; // Must be allocated below 1MB\r
123 //\r
124 // Status code\r
125 //\r
126 EFI_DEVICE_PATH_PROTOCOL *DevicePath;\r
127} BIOS_VIDEO_DEV;\r
128\r
0d92cdc2 129#define BIOS_VIDEO_DEV_FROM_PCI_IO_THIS(a) CR (a, BIOS_VIDEO_DEV, PciIo, BIOS_VIDEO_DEV_SIGNATURE)\r
130#define BIOS_VIDEO_DEV_FROM_GRAPHICS_OUTPUT_THIS(a) CR (a, BIOS_VIDEO_DEV, GraphicsOutput, BIOS_VIDEO_DEV_SIGNATURE)\r
7da78b1f 131#define BIOS_VIDEO_DEV_FROM_VGA_MINI_PORT_THIS(a) CR (a, BIOS_VIDEO_DEV, VgaMiniPort, BIOS_VIDEO_DEV_SIGNATURE)\r
132\r
b29a823d 133#define GRAPHICS_OUTPUT_INVALIDE_MODE_NUMBER 0xffff\r
0d92cdc2 134\r
d0c94e59 135#define EFI_SEGMENT(_Adr) (UINT16) ((UINT16) (((UINTN) (_Adr)) >> 4) & 0xf000)\r
136#define EFI_OFFSET(_Adr) (UINT16) (((UINT16) ((UINTN) (_Adr))) & 0xffff)\r
137\r
7da78b1f 138//\r
139// Global Variables\r
140//\r
141extern EFI_DRIVER_BINDING_PROTOCOL gBiosVideoDriverBinding;\r
142extern EFI_COMPONENT_NAME_PROTOCOL gBiosVideoComponentName;\r
143extern EFI_COMPONENT_NAME2_PROTOCOL gBiosVideoComponentName2;\r
144\r
145//\r
146// Driver Binding Protocol functions\r
147//\r
f1294e4a 148/**\r
149 Test to see if Bios Video could be supported on the Controller.\r
150\r
151 @param This Pointer to driver binding protocol\r
152 @param Controller Controller handle to connect\r
153 @param RemainingDevicePath A pointer to the remaining portion of a device path\r
154\r
155 @retval EFI_SUCCESS This driver supports this device.\r
156 @retval other This driver does not support this device.\r
157\r
158**/\r
7da78b1f 159EFI_STATUS\r
160EFIAPI\r
161BiosVideoDriverBindingSupported (\r
162 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
163 IN EFI_HANDLE Controller,\r
164 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
165 )\r
f1294e4a 166;\r
0d92cdc2 167\r
f1294e4a 168/**\r
169 Install Graphics Output Protocol onto VGA device handles\r
0d92cdc2 170\r
f1294e4a 171 @param This Pointer to driver binding protocol\r
172 @param Controller Controller handle to connect\r
173 @param RemainingDevicePath A pointer to the remaining portion of a device path\r
7da78b1f 174\r
f1294e4a 175 @return EFI_STATUS\r
7da78b1f 176\r
f1294e4a 177**/\r
7da78b1f 178EFI_STATUS\r
179EFIAPI\r
180BiosVideoDriverBindingStart (\r
181 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
182 IN EFI_HANDLE Controller,\r
183 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
184 )\r
f1294e4a 185;\r
0d92cdc2 186\r
f1294e4a 187/**\r
188 Stop this driver on Controller \r
0d92cdc2 189\r
f1294e4a 190 @param This Protocol instance pointer.\r
191 @param Controller Handle of device to stop driver on\r
192 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
193 children is zero stop the entire bus driver.\r
194 @param ChildHandleBuffer List of Child Handles to Stop.\r
7da78b1f 195\r
f1294e4a 196 @retval EFI_SUCCESS This driver is removed Controller.\r
197 @retval other This driver was not removed from this device.\r
7da78b1f 198\r
f1294e4a 199**/\r
7da78b1f 200EFI_STATUS\r
201EFIAPI\r
202BiosVideoDriverBindingStop (\r
203 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
204 IN EFI_HANDLE Controller,\r
205 IN UINTN NumberOfChildren,\r
206 IN EFI_HANDLE *ChildHandleBuffer\r
207 )\r
7da78b1f 208;\r
209\r
210//\r
211// Private worker functions\r
212//\r
f1294e4a 213/**\r
214 Check for VBE device\r
215\r
216 @param BiosVideoPrivate - Pointer to BIOS_VIDEO_DEV structure\r
217\r
218 @retval EFI_SUCCESS VBE device found\r
219\r
220**/\r
7da78b1f 221EFI_STATUS\r
7830363c 222EFIAPI\r
7da78b1f 223BiosVideoCheckForVbe (\r
7830363c 224 IN OUT BIOS_VIDEO_DEV *BiosVideoPrivate\r
7da78b1f 225 )\r
f1294e4a 226;\r
0d92cdc2 227\r
f1294e4a 228/**\r
229 Check for VGA device\r
0d92cdc2 230\r
f1294e4a 231 @param BiosVideoPrivate - Pointer to BIOS_VIDEO_DEV structure\r
0d92cdc2 232\r
f1294e4a 233 @retval EFI_SUCCESS Standard VGA device found\r
234**/\r
7da78b1f 235\r
236EFI_STATUS\r
7830363c 237EFIAPI\r
7da78b1f 238BiosVideoCheckForVga (\r
239 BIOS_VIDEO_DEV *BiosVideoPrivate\r
240 )\r
7da78b1f 241;\r
242\r
f1294e4a 243/**\r
244 Collect the resource from destroyed bios video device.\r
7da78b1f 245\r
f1294e4a 246 @param BiosVideoPrivate Video child device private data structure\r
7da78b1f 247\r
f1294e4a 248**/\r
0d92cdc2 249VOID\r
250BiosVideoDeviceReleaseResource (\r
251 BIOS_VIDEO_DEV *BiosVideoChildPrivate\r
252 )\r
f1294e4a 253;\r
0d92cdc2 254\r
f1294e4a 255//\r
256// BIOS Graphics Output Protocol functions\r
257//\r
258/**\r
0d92cdc2 259\r
f1294e4a 260 Graphics Output protocol interface to get video mode\r
0d92cdc2 261\r
0d92cdc2 262\r
f1294e4a 263 @param This - Protocol instance pointer.\r
264 @param ModeNumber - The mode number to return information on.\r
265 @param SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.\r
266 @param Info - Caller allocated buffer that returns information about ModeNumber.\r
0d92cdc2 267\r
f1294e4a 268 @return EFI_SUCCESS - Mode information returned.\r
269 EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.\r
270 EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()\r
271 EFI_INVALID_PARAMETER - One of the input args was NULL.\r
0d92cdc2 272\r
f1294e4a 273**/\r
7da78b1f 274EFI_STATUS\r
275EFIAPI\r
0d92cdc2 276BiosVideoGraphicsOutputQueryMode (\r
277 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
278 IN UINT32 ModeNumber,\r
279 OUT UINTN *SizeOfInfo,\r
280 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
7da78b1f 281 )\r
f1294e4a 282;\r
7da78b1f 283\r
f1294e4a 284/**\r
7da78b1f 285\r
f1294e4a 286 Graphics Output protocol interface to set video mode\r
7da78b1f 287\r
7da78b1f 288\r
f1294e4a 289 @param This - Protocol instance pointer.\r
290 @param ModeNumber - The mode number to be set.\r
7da78b1f 291\r
f1294e4a 292 @return EFI_SUCCESS - Graphics mode was changed.\r
293 EFI_DEVICE_ERROR - The device had an error and could not complete the request.\r
294 EFI_UNSUPPORTED - ModeNumber is not supported by this device.\r
0d92cdc2 295\r
f1294e4a 296**/\r
0d92cdc2 297EFI_STATUS\r
298EFIAPI\r
299BiosVideoGraphicsOutputSetMode (\r
300 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
301 IN UINT32 ModeNumber\r
302 )\r
f1294e4a 303;\r
0d92cdc2 304\r
f1294e4a 305/**\r
0d92cdc2 306\r
f1294e4a 307 Graphics Output protocol instance to block transfer for VBE device\r
0d92cdc2 308\r
7da78b1f 309\r
f1294e4a 310 @param This - Pointer to Graphics Output protocol instance\r
311 @param BltBuffer - The data to transfer to screen\r
312 @param BltOperation - The operation to perform\r
313 @param SourceX - The X coordinate of the source for BltOperation\r
314 @param SourceY - The Y coordinate of the source for BltOperation\r
315 @param DestinationX - The X coordinate of the destination for BltOperation\r
316 @param DestinationY - The Y coordinate of the destination for BltOperation\r
317 @param Width - The width of a rectangle in the blt rectangle in pixels\r
318 @param Height - The height of a rectangle in the blt rectangle in pixels\r
319 @param Delta - Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.\r
320 If a Delta of 0 is used, the entire BltBuffer will be operated on.\r
321 If a subrectangle of the BltBuffer is used, then Delta represents\r
322 the number of bytes in a row of the BltBuffer.\r
323\r
324 @return EFI_INVALID_PARAMETER - Invalid parameter passed in\r
325 EFI_SUCCESS - Blt operation success\r
326\r
327**/\r
7da78b1f 328EFI_STATUS\r
329EFIAPI\r
0d92cdc2 330BiosVideoGraphicsOutputVbeBlt (\r
331 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
332 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
333 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
334 IN UINTN SourceX,\r
335 IN UINTN SourceY,\r
336 IN UINTN DestinationX,\r
337 IN UINTN DestinationY,\r
338 IN UINTN Width,\r
339 IN UINTN Height,\r
340 IN UINTN Delta\r
7da78b1f 341 )\r
7da78b1f 342;\r
343\r
f1294e4a 344/**\r
345 Grahpics Output protocol instance to block transfer for VGA device\r
346\r
347 @param This Pointer to Grahpics Output protocol instance\r
348 @param BltBuffer The data to transfer to screen\r
349 @param BltOperation The operation to perform\r
350 @param SourceX The X coordinate of the source for BltOperation\r
351 @param SourceY The Y coordinate of the source for BltOperation\r
352 @param DestinationX The X coordinate of the destination for BltOperation\r
353 @param DestinationY The Y coordinate of the destination for BltOperation\r
354 @param Width The width of a rectangle in the blt rectangle in pixels\r
355 @param Height The height of a rectangle in the blt rectangle in pixels\r
356 @param Delta Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.\r
357 If a Delta of 0 is used, the entire BltBuffer will be operated on.\r
358 If a subrectangle of the BltBuffer is used, then Delta represents\r
359 the number of bytes in a row of the BltBuffer.\r
360\r
361 @retval EFI_INVALID_PARAMETER Invalid parameter passed in\r
362 @retval EFI_SUCCESS Blt operation success\r
363\r
364**/\r
7da78b1f 365EFI_STATUS\r
366EFIAPI\r
0d92cdc2 367BiosVideoGraphicsOutputVgaBlt (\r
368 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
369 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
370 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
371 IN UINTN SourceX,\r
372 IN UINTN SourceY,\r
373 IN UINTN DestinationX,\r
374 IN UINTN DestinationY,\r
375 IN UINTN Width,\r
376 IN UINTN Height,\r
377 IN UINTN Delta\r
7da78b1f 378 )\r
7da78b1f 379;\r
380\r
381//\r
382// BIOS VGA Mini Port Protocol functions\r
383//\r
f1294e4a 384/**\r
385 VgaMiniPort protocol interface to set mode\r
386\r
387 @param This Pointer to VgaMiniPort protocol instance\r
388 @param ModeNumber The index of the mode\r
389\r
390 @retval EFI_UNSUPPORTED The requested mode is not supported\r
391 @retval EFI_SUCCESS The requested mode is set successfully\r
392\r
393**/\r
7da78b1f 394EFI_STATUS\r
395EFIAPI\r
396BiosVideoVgaMiniPortSetMode (\r
397 IN EFI_VGA_MINI_PORT_PROTOCOL *This,\r
398 IN UINTN ModeNumber\r
399 )\r
7da78b1f 400;\r
401\r
f1294e4a 402/**\r
403 Judge whether this device is VGA device.\r
404\r
405 @param PciIo Parent PciIo protocol instance pointer\r
7da78b1f 406\r
f1294e4a 407 @retval TRUE Is vga device\r
408 @retval FALSE Is no vga device\r
409**/\r
7da78b1f 410BOOLEAN\r
411BiosVideoIsVga (\r
412 IN EFI_PCI_IO_PROTOCOL *PciIo\r
413 )\r
414;\r
415\r
416\r
417//\r
418// Standard VGA Definitions\r
419//\r
420#define VGA_HORIZONTAL_RESOLUTION 640\r
421#define VGA_VERTICAL_RESOLUTION 480\r
422#define VGA_NUMBER_OF_BIT_PLANES 4\r
423#define VGA_PIXELS_PER_BYTE 8\r
424#define VGA_BYTES_PER_SCAN_LINE (VGA_HORIZONTAL_RESOLUTION / VGA_PIXELS_PER_BYTE)\r
425#define VGA_BYTES_PER_BIT_PLANE (VGA_VERTICAL_RESOLUTION * VGA_BYTES_PER_SCAN_LINE)\r
426\r
427#define VGA_GRAPHICS_CONTROLLER_ADDRESS_REGISTER 0x3ce\r
428#define VGA_GRAPHICS_CONTROLLER_DATA_REGISTER 0x3cf\r
429\r
430#define VGA_GRAPHICS_CONTROLLER_SET_RESET_REGISTER 0x00\r
431\r
432#define VGA_GRAPHICS_CONTROLLER_ENABLE_SET_RESET_REGISTER 0x01\r
433\r
434#define VGA_GRAPHICS_CONTROLLER_COLOR_COMPARE_REGISTER 0x02\r
435\r
436#define VGA_GRAPHICS_CONTROLLER_DATA_ROTATE_REGISTER 0x03\r
437#define VGA_GRAPHICS_CONTROLLER_FUNCTION_REPLACE 0x00\r
438#define VGA_GRAPHICS_CONTROLLER_FUNCTION_AND 0x08\r
439#define VGA_GRAPHICS_CONTROLLER_FUNCTION_OR 0x10\r
440#define VGA_GRAPHICS_CONTROLLER_FUNCTION_XOR 0x18\r
441\r
442#define VGA_GRAPHICS_CONTROLLER_READ_MAP_SELECT_REGISTER 0x04\r
443\r
444#define VGA_GRAPHICS_CONTROLLER_MODE_REGISTER 0x05\r
445#define VGA_GRAPHICS_CONTROLLER_READ_MODE_0 0x00\r
446#define VGA_GRAPHICS_CONTROLLER_READ_MODE_1 0x08\r
447#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_0 0x00\r
448#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_1 0x01\r
449#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_2 0x02\r
450#define VGA_GRAPHICS_CONTROLLER_WRITE_MODE_3 0x03\r
451\r
452#define VGA_GRAPHICS_CONTROLLER_MISCELLANEOUS_REGISTER 0x06\r
453\r
454#define VGA_GRAPHICS_CONTROLLER_COLOR_DONT_CARE_REGISTER 0x07\r
455\r
456#define VGA_GRAPHICS_CONTROLLER_BIT_MASK_REGISTER 0x08\r
457\r
f1294e4a 458/**\r
459 Initialize legacy environment for BIOS INI caller.\r
460 \r
461 @param ThunkContext the instance pointer of THUNK_CONTEXT\r
462**/\r
0d92cdc2 463VOID\r
464InitializeBiosIntCaller (\r
f1294e4a 465 THUNK_CONTEXT *ThunkContext\r
0d92cdc2 466 );\r
467 \r
f1294e4a 468/**\r
469 Initialize interrupt redirection code and entries, because\r
470 IDT Vectors 0x68-0x6f must be redirected to IDT Vectors 0x08-0x0f.\r
471 Or the interrupt will lost when we do thunk.\r
472 NOTE: We do not reset 8259 vector base, because it will cause pending\r
473 interrupt lost.\r
474 \r
475 @param Legacy8259 Instance pointer for EFI_LEGACY_8259_PROTOCOL.\r
476 \r
477**/ \r
0d92cdc2 478VOID\r
479InitializeInterruptRedirection (\r
f1294e4a 480 IN EFI_LEGACY_8259_PROTOCOL *Legacy8259\r
0d92cdc2 481 );\r
482 \r
f1294e4a 483/**\r
484 Thunk to 16-bit real mode and execute a software interrupt with a vector \r
485 of BiosInt. Regs will contain the 16-bit register context on entry and \r
486 exit.\r
487 \r
488 @param This Protocol instance pointer.\r
489 @param BiosInt Processor interrupt vector to invoke\r
490 @param Reg Register contexted passed into (and returned) from thunk to 16-bit mode\r
491 \r
492 @retval TRUE Thunk completed, and there were no BIOS errors in the target code.\r
493 See Regs for status.\r
494 @retval FALSE There was a BIOS erro in the target code. \r
495**/ \r
0d92cdc2 496BOOLEAN\r
497EFIAPI\r
498LegacyBiosInt86 (\r
499 IN BIOS_VIDEO_DEV *BiosDev,\r
500 IN UINT8 BiosInt,\r
d0c94e59 501 IN IA32_REGISTER_SET *Regs\r
0d92cdc2 502 ); \r
503 \r
7da78b1f 504#endif\r