summaryrefslogtreecommitdiffstats
path: root/PrmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-24 18:16:18 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-10-27 16:52:01 +0000
commit789a723285533f35652ebd6029976e2ddc955655 (patch)
tree9c4ed78d05dc606d87d0e5d4f4b2c36e9af6c39f /PrmPkg
parent25589c4a76e7e3668fd6f794dd1827e958b6719c (diff)
downloadedk2-789a723285533f35652ebd6029976e2ddc955655.tar.gz
edk2-789a723285533f35652ebd6029976e2ddc955655.tar.bz2
edk2-789a723285533f35652ebd6029976e2ddc955655.zip
OvmfPkg/VirtNorFlashDxe: use EFI_MEMORY_WC and drop AlignedCopyMem()
NOR flash emulation under KVM involves switching between two modes, where array mode is backed by a read-only memslot, and programming mode is fully emulated, i.e., the memory region is not backed by anything, and the faulting accesses are forwarded to the VMM by the hypervisor, which translates them into NOR flash programming commands. Normally, we are limited to the use of device attributes when mapping such regions, given that the programming mode has MMIO semantics. However, when running under KVM, the chosen memory attributes only take effect when in array mode, since no memory mapping exists otherwise. This means we can tune the memory mapping so it behaves a bit more like a ROM, by switching to EFI_MEMORY_WC attributes. This means we no longer need a special CopyMem() implementation that avoids unaligned accesses at all cost. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'PrmPkg')
0 files changed, 0 insertions, 0 deletions