/** @file\r
QEMU Video Controller Driver\r
\r
- Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Library/BaseMemoryLib.h>\r
#include <Library/DevicePathLib.h>\r
#include <Library/TimerLib.h>\r
+#include <Library/FrameBufferBltLib.h>\r
\r
#include <IndustryStandard/Pci.h>\r
+#include <IndustryStandard/Acpi.h>\r
\r
//\r
// QEMU Video PCI Configuration Header values\r
// QEMU Vide Graphical Mode Data\r
//\r
typedef struct {\r
- UINT32 ModeNumber;\r
+ UINT32 InternalModeIndex; // points into card-specific mode table\r
UINT32 HorizontalResolution;\r
UINT32 VerticalResolution;\r
UINT32 ColorDepth;\r
QEMU_VIDEO_CIRRUS_5430 = 1,\r
QEMU_VIDEO_CIRRUS_5446,\r
QEMU_VIDEO_BOCHS,\r
+ QEMU_VIDEO_BOCHS_MMIO,\r
} QEMU_VIDEO_VARIANT;\r
\r
typedef struct {\r
UINT64 OriginalPciAttributes;\r
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;\r
EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;\r
+\r
+ //\r
+ // The next three fields match the client-visible\r
+ // EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE.Mode and\r
+ // EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE.MaxMode fields.\r
+ //\r
UINTN CurrentMode;\r
UINTN MaxMode;\r
QEMU_VIDEO_MODE_DATA *ModeData;\r
+\r
UINT8 *LineBuffer;\r
- BOOLEAN HardwareNeedsStarting;\r
QEMU_VIDEO_VARIANT Variant;\r
+ FRAME_BUFFER_CONFIGURE *FrameBufferBltConfigure;\r
+ UINTN FrameBufferBltConfigureSize;\r
} QEMU_VIDEO_PRIVATE_DATA;\r
\r
///\r
-/// Video Mode structure\r
+/// Card-specific Video Mode structures\r
///\r
typedef struct {\r
UINT32 Width;\r
UINT16 Reg\r
);\r
\r
+VOID\r
+VgaOutb (\r
+ QEMU_VIDEO_PRIVATE_DATA *Private,\r
+ UINTN Reg,\r
+ UINT8 Data\r
+ );\r
+\r
EFI_STATUS\r
QemuVideoCirrusModeSetup (\r
QEMU_VIDEO_PRIVATE_DATA *Private\r
\r
EFI_STATUS\r
QemuVideoBochsModeSetup (\r
- QEMU_VIDEO_PRIVATE_DATA *Private\r
+ QEMU_VIDEO_PRIVATE_DATA *Private,\r
+ BOOLEAN IsQxl\r
);\r
\r
+VOID\r
+InstallVbeShim (\r
+ IN CONST CHAR16 *CardName,\r
+ IN EFI_PHYSICAL_ADDRESS FrameBufferBase\r
+ );\r
#endif\r