Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Laszlo Ersek b37bcfd6bd OvmfPkg: QemuVideoDxe: work around misreported QXL framebuffer size
When setting up the list of GOP modes offered on QEMU's stdvga ("VGA") and
QXL ("qxl-vga") video devices, QemuVideoBochsModeSetup() filters those
modes against the available framebuffer size. (Refer to SVN r15288 / git
commit ec88061e.)

The VBE_DISPI_INDEX_VIDEO_MEMORY_64K register of both stdvga and QXL is
supposed to report the size of the drawable, VGA-compatibility
framebuffer. Instead, up to and including qemu-2.1, this register actually
reports the full video RAM (PCI BAR 0) size.

In case of stdvga, this happens to be correct, because on that card the
full PCI BAR 0 is usable for drawing; there is no difference between
"drawable framebuffer size" and "video RAM (PCI BAR 0) size".

However, on the QXL card, only an initial portion of the video RAM is
suitable for drawing, as compatibility framebuffer; and the value
currently reported by VBE_DISPI_INDEX_VIDEO_MEMORY_64K overshoots the
valid size. Beyond the drawable range, the video RAM contains buffers and
structures for the QXL guest-host protocol.

Luckily, the size of the drawable QXL framebuffer can also be read from a
register in the QXL ROM BAR (PCI BAR 2), so let's retrieve it from there.

Without this fix, OVMF offers too large resolutions on the QXL card (up to
the full size of the video RAM). If a GOP client selects such a resolution
and draws into the video RAM past the compatibility segment, then the
guest corrupts its communication structures (which is invalid guest
behavior).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15978 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 17:27:20 +00:00
AppPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
ArmPkg ArmPkg/TimerDxe: Fixed real time period 2014-08-27 10:13:36 +00:00
ArmPlatformPkg ArmPlatformPkg/NorFlashDxe: Clean the driver 2014-08-26 10:20:47 +00:00
BaseTools License header updated to match correct format. 2014-08-28 13:53:34 +00:00
BeagleBoardPkg ARM Packages: Replace tabs by spaces for indentation 2014-08-26 10:14:17 +00:00
Conf Adding top-level Conf directory for next generation of EDK II build infrastructure tools. 2007-06-20 19:33:23 +00:00
CryptoPkg Correct OpenSSL version in Cryptest.uni 2014-08-29 04:49:15 +00:00
DuetPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EdkCompatibilityPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EdkShellBinPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EdkShellPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
EmbeddedPkg EmbeddedPkg/FdtLib: Added support to load FDT from Firmware Volume 2014-08-26 10:21:48 +00:00
EmulatorPkg EmulatorPkg:Unix: Add support for X11 on Mac OS X via XQuartz 2014-08-28 03:38:21 +00:00
FatBinPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
IntelFrameworkModulePkg Add the missing GUID in BdsDxe.inf 2014-08-28 15:43:14 +00:00
IntelFrameworkPkg IntelFrameworkPkg: INF/DEC file updates to EDK II packages 2014-08-28 03:21:49 +00:00
IntelFspPkg IntelFspPkg BaseCacheLib: State CacheAsRamLib in its inf, because it consumes DisableCacheAsRam() that is the interface of CacheAsRamLib. 2014-08-22 01:23:28 +00:00
IntelFspWrapperPkg Rollback file GUID change, because it is VTF file and GUID is predefined. 2014-08-08 02:15:41 +00:00
MdeModulePkg Allocate EfiReservedMemoryType of memory. 2014-08-29 09:01:52 +00:00
MdePkg Don't initialize local variables in its declaration. 2014-08-28 14:49:14 +00:00
NetworkPkg NetworkPkg: INF/DEC file updates to EDK II packages 2014-08-28 06:18:03 +00:00
Nt32Pkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
Omap35xxPkg ARM Packages: Replace tabs by spaces for indentation 2014-08-26 10:14:17 +00:00
OptionRomPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
OvmfPkg OvmfPkg: QemuVideoDxe: work around misreported QXL framebuffer size 2014-08-29 17:27:20 +00:00
PcAtChipsetPkg PcAtChipsetPkg: INF/DEC file updates to EDK II packages 2014-08-28 05:19:28 +00:00
PerformancePkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
SecurityPkg SecurityPkg: INF/DEC file updates to EDK II packages 2014-08-28 06:17:17 +00:00
ShellBinPkg EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
ShellPkg ShellPkg: Remove 'STATIC' from function declarations to avoid source level debugging problem. 2014-08-29 01:30:43 +00:00
SourceLevelDebugPkg SourceLevelDebugPkg: INF/DEC file updates to EDK II packages 2014-08-28 05:14:51 +00:00
StdLib EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
StdLibPrivateInternalFiles EDK II Contributions.txt: Note acceptable contribution licenses 2014-08-25 23:10:18 +00:00
UefiCpuPkg UefiCpuPkg: INF/DEC file updates to EDK II packages 2014-08-28 05:12:05 +00:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
BuildNotes2.txt Update to new SVN URL in readme.txt 2013-06-08 05:26:39 +00:00
Edk2Setup.bat Updated version, missed the last two commits and to add the SVN Revision property (last part of the version value). 2014-08-22 16:08:47 +00:00
edksetup.bat Contributed-under: TianoCore Contribution Agreement 1.0 2014-06-18 09:01:33 +00:00
edksetup.sh edksetup.sh: Ensure that WORKSPACE points to the top of an edk2 checkout 2014-07-28 17:37:40 +00:00