diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-06-17 17:07:41 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-06-18 20:52:56 +0000 |
commit | c1d1910be6e04a8b1a73090cf2881fb698947a6e (patch) | |
tree | a04a6bf14e83387e36341ff38a975debf57852b7 /OvmfPkg/OvmfPkg.dec | |
parent | ffce430d2b65d508a1604dc986ba16db3583943d (diff) | |
download | edk2-c1d1910be6e04a8b1a73090cf2881fb698947a6e.tar.gz edk2-c1d1910be6e04a8b1a73090cf2881fb698947a6e.tar.bz2 edk2-c1d1910be6e04a8b1a73090cf2881fb698947a6e.zip |
OvmfPkg/QemuVideoDxe: add feature PCD to remap framebuffer W/C
Some platforms (such as SBSA-QEMU on recent builds of the emulator) only
tolerate misaligned accesses to normal memory, and raise alignment
faults on such accesses to device memory, which is the default for PCIe
MMIO BARs.
When emulating a PCIe graphics controller, the framebuffer is typically
exposed via a MMIO BAR, while the disposition of the region is closer to
memory (no side effects on reads or writes, except for the changing
picture on the screen; direct random access to any pixel in the image).
In order to permit the use of such controllers on platforms that only
tolerate these types of accesses for normal memory, it is necessary to
remap the memory. Use the DXE services to set the desired capabilities
and attributes.
Hide this behavior under a feature PCD so only platforms that really
need it can enable it. (OVMF on x86 has no need for this)
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'OvmfPkg/OvmfPkg.dec')
-rw-r--r-- | OvmfPkg/OvmfPkg.dec | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index e1ef8420ce..c1c8198061 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -449,3 +449,8 @@ ## This feature flag indicates the firmware build supports secure boot.
gUefiOvmfPkgTokenSpaceGuid.PcdSecureBootSupported|FALSE|BOOLEAN|0x6d
+
+ ## Whether QemuVideoDxe should perform a EFI_MEMORY_WC remap of the PCI
+ # framebuffer. This might be required on platforms that do not tolerate
+ # misaligned accesses otherwise.
+ gUefiOvmfPkgTokenSpaceGuid.PcdRemapFrameBufferWriteCombine|FALSE|BOOLEAN|0x75
|