2011-12-16 06:48:06 +01:00
|
|
|
## @file
|
2011-04-12 17:08:51 +02:00
|
|
|
# This driver is a sample implementation of the Graphics Output Protocol for
|
|
|
|
# the QEMU (Cirrus Logic 5446) video controller.
|
|
|
|
#
|
2016-10-11 07:26:27 +02:00
|
|
|
# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
2011-04-12 17:08:51 +02:00
|
|
|
#
|
|
|
|
# This program and the accompanying materials
|
|
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
|
|
#
|
|
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
#
|
2011-12-16 06:48:06 +01:00
|
|
|
##
|
2011-04-12 17:08:51 +02:00
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
|
|
|
BASE_NAME = QemuVideoDxe
|
|
|
|
FILE_GUID = e3752948-b9a1-4770-90c4-df41c38986be
|
|
|
|
MODULE_TYPE = UEFI_DRIVER
|
|
|
|
VERSION_STRING = 1.0
|
|
|
|
|
|
|
|
ENTRY_POINT = InitializeQemuVideo
|
|
|
|
|
|
|
|
#
|
|
|
|
# The following information is for reference only and not required by the build tools.
|
|
|
|
#
|
2017-08-24 14:17:48 +02:00
|
|
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
2011-04-12 17:08:51 +02:00
|
|
|
#
|
|
|
|
# DRIVER_BINDING = gQemuVideoDriverBinding
|
|
|
|
# COMPONENT_NAME = gQemuVideoComponentName
|
|
|
|
#
|
|
|
|
|
|
|
|
[Sources.common]
|
|
|
|
ComponentName.c
|
|
|
|
Driver.c
|
|
|
|
DriverSupportedEfiVersion.c
|
|
|
|
Gop.c
|
|
|
|
Initialize.c
|
2015-02-23 17:02:29 +01:00
|
|
|
|
|
|
|
[Sources.Ia32, Sources.X64]
|
OvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL)
The Windows 2008 R2 SP1 (and Windows 7) UEFI guest's default video driver
dereferences the real mode Int10h vector, loads the pointed-to handler
code, and executes what it thinks to be VGA BIOS services in an internal
real-mode emulator. Consequently, video mode switching doesn't work in
Windows 2008 R2 SP1 when it runs on the pure UEFI build of OVMF, making
the guest uninstallable.
This patch adds a VGABIOS "shim" to QemuVideoDxe. For the first stdvga or
QXL card bound, an extremely stripped down VGABIOS imitation is installed
in the C segment. It provides a real implementation for the few services
that are in fact necessary for the win2k8r2sp1 UEFI guest, plus some fakes
that the guest invokes but whose effect is not important.
The C segment is not present in the UEFI memory map prepared by OVMF. We
never add memory space that would cover it (either in PEI, in the form of
memory resource descriptor HOBs, or in DXE, via gDS->AddMemorySpace()).
This way the handler body is invisible to all non-buggy UEFI guests, and
the rest of edk2.
The Int10h real-mode IVT entry is covered with a Boot Services Code page,
making that too unaccessible to the rest of edk2. (Thus UEFI guest OSes
different from the Windows 2008 family can reclaim the page. The Windows
2008 family accesses the page at zero regardless of the allocation type.)
The patch is the result of collaboration:
Initial proof of concept IVT entry installation and handler skeleton (in
NASM) by Jordan Justen.
Service tracing and implementation, data collection/analysis, and C coding
by yours truly.
Last minute changes by Gerd Hoffmann:
- Use OEM mode number (0xf1) instead of standard 800x600 mode (0x143). The
resolution of the OEM mode (0xf1) is not standardized; the guest can't
expect anything from it in advance.
- Use 1024x768 rather than 800x600 for more convenience in the Windows
2008 R2 SP1 guest during OS installation, and after normal boot until
the QXL XDDM guest driver is installed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15540 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-20 18:33:00 +02:00
|
|
|
VbeShim.c
|
2017-04-07 08:25:57 +02:00
|
|
|
UnalignedIoGcc.c | GCC
|
|
|
|
UnalignedIoMsc.c | MSFT
|
|
|
|
UnalignedIoIcc.c | INTEL
|
|
|
|
|
2017-08-24 14:17:48 +02:00
|
|
|
[Sources.IPF, Sources.EBC]
|
2017-04-07 08:25:57 +02:00
|
|
|
UnalignedIoUnsupported.c
|
2011-04-12 17:08:51 +02:00
|
|
|
|
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
2016-10-11 07:26:27 +02:00
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
2011-04-12 17:08:51 +02:00
|
|
|
OptionRomPkg/OptionRomPkg.dec
|
OvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL)
The Windows 2008 R2 SP1 (and Windows 7) UEFI guest's default video driver
dereferences the real mode Int10h vector, loads the pointed-to handler
code, and executes what it thinks to be VGA BIOS services in an internal
real-mode emulator. Consequently, video mode switching doesn't work in
Windows 2008 R2 SP1 when it runs on the pure UEFI build of OVMF, making
the guest uninstallable.
This patch adds a VGABIOS "shim" to QemuVideoDxe. For the first stdvga or
QXL card bound, an extremely stripped down VGABIOS imitation is installed
in the C segment. It provides a real implementation for the few services
that are in fact necessary for the win2k8r2sp1 UEFI guest, plus some fakes
that the guest invokes but whose effect is not important.
The C segment is not present in the UEFI memory map prepared by OVMF. We
never add memory space that would cover it (either in PEI, in the form of
memory resource descriptor HOBs, or in DXE, via gDS->AddMemorySpace()).
This way the handler body is invisible to all non-buggy UEFI guests, and
the rest of edk2.
The Int10h real-mode IVT entry is covered with a Boot Services Code page,
making that too unaccessible to the rest of edk2. (Thus UEFI guest OSes
different from the Windows 2008 family can reclaim the page. The Windows
2008 family accesses the page at zero regardless of the allocation type.)
The patch is the result of collaboration:
Initial proof of concept IVT entry installation and handler skeleton (in
NASM) by Jordan Justen.
Service tracing and implementation, data collection/analysis, and C coding
by yours truly.
Last minute changes by Gerd Hoffmann:
- Use OEM mode number (0xf1) instead of standard 800x600 mode (0x143). The
resolution of the OEM mode (0xf1) is not standardized; the guest can't
expect anything from it in advance.
- Use 1024x768 rather than 800x600 for more convenience in the Windows
2008 R2 SP1 guest during OS installation, and after normal boot until
the QXL XDDM guest driver is installed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15540 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-20 18:33:00 +02:00
|
|
|
OvmfPkg/OvmfPkg.dec
|
2011-04-12 17:08:51 +02:00
|
|
|
|
|
|
|
[LibraryClasses]
|
|
|
|
BaseMemoryLib
|
2016-10-11 07:26:27 +02:00
|
|
|
FrameBufferBltLib
|
2011-04-12 17:08:51 +02:00
|
|
|
DebugLib
|
|
|
|
DevicePathLib
|
|
|
|
MemoryAllocationLib
|
OvmfPkg: QemuVideoDxe: Int10h stub for Windows 7 & 2008 (stdvga, QXL)
The Windows 2008 R2 SP1 (and Windows 7) UEFI guest's default video driver
dereferences the real mode Int10h vector, loads the pointed-to handler
code, and executes what it thinks to be VGA BIOS services in an internal
real-mode emulator. Consequently, video mode switching doesn't work in
Windows 2008 R2 SP1 when it runs on the pure UEFI build of OVMF, making
the guest uninstallable.
This patch adds a VGABIOS "shim" to QemuVideoDxe. For the first stdvga or
QXL card bound, an extremely stripped down VGABIOS imitation is installed
in the C segment. It provides a real implementation for the few services
that are in fact necessary for the win2k8r2sp1 UEFI guest, plus some fakes
that the guest invokes but whose effect is not important.
The C segment is not present in the UEFI memory map prepared by OVMF. We
never add memory space that would cover it (either in PEI, in the form of
memory resource descriptor HOBs, or in DXE, via gDS->AddMemorySpace()).
This way the handler body is invisible to all non-buggy UEFI guests, and
the rest of edk2.
The Int10h real-mode IVT entry is covered with a Boot Services Code page,
making that too unaccessible to the rest of edk2. (Thus UEFI guest OSes
different from the Windows 2008 family can reclaim the page. The Windows
2008 family accesses the page at zero regardless of the allocation type.)
The patch is the result of collaboration:
Initial proof of concept IVT entry installation and handler skeleton (in
NASM) by Jordan Justen.
Service tracing and implementation, data collection/analysis, and C coding
by yours truly.
Last minute changes by Gerd Hoffmann:
- Use OEM mode number (0xf1) instead of standard 800x600 mode (0x143). The
resolution of the OEM mode (0xf1) is not standardized; the guest can't
expect anything from it in advance.
- Use 1024x768 rather than 800x600 for more convenience in the Windows
2008 R2 SP1 guest during OS installation, and after normal boot until
the QXL XDDM guest driver is installed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15540 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-20 18:33:00 +02:00
|
|
|
PciLib
|
|
|
|
PrintLib
|
2011-04-12 17:08:51 +02:00
|
|
|
TimerLib
|
|
|
|
UefiBootServicesTableLib
|
|
|
|
UefiDriverEntryPoint
|
|
|
|
UefiLib
|
|
|
|
|
|
|
|
[Protocols]
|
|
|
|
gEfiDriverSupportedEfiVersionProtocolGuid # PROTOCOL ALWAYS_PRODUCED
|
|
|
|
gEfiGraphicsOutputProtocolGuid # PROTOCOL BY_START
|
|
|
|
gEfiDevicePathProtocolGuid # PROTOCOL BY_START
|
|
|
|
gEfiPciIoProtocolGuid # PROTOCOL TO_START
|
|
|
|
|
|
|
|
[Pcd]
|
|
|
|
gOptionRomPkgTokenSpaceGuid.PcdDriverSupportedEfiVersion
|
|
|
|
|