Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 987cc09c7cf38d628063062483e2341fba679b0e
      
https://github.com/tianocore/edk2/commit/987cc09c7cf38d628063062483e2341fba679b0e
  Author: Gerd Hoffmann <kra...@redhat.com>
  Date:   2023-01-16 (Mon, 16 Jan 2023)

  Changed paths:
    M ArmVirtPkg/ArmVirtKvmTool.dsc
    M ArmVirtPkg/ArmVirtQemu.dsc
    M ArmVirtPkg/ArmVirtQemuKernel.dsc

  Log Message:
  -----------
  ArmVirt: don't use unaligned CopyMem () on NOR flash

Commit 789a72328553 reclassified the NOR flash region as EFI_MEMORY_WC
in the OS visible EFI memory map, and dropped the explicit aligned
CopyMem() implementation, in the assumption that EFI_MEMORY_WC will be
honored by the OS, and that the region will be mapped in a way that
tolerates misaligned accesseses. However, Linux today uses device
attributes for all EFI MMIO regions, in spite of the memory type
attributes, and so using misaligned accesses is never safe.

So instead, switch to the generic CopyMem() implementation entirely,
just like we already did for VariableRuntimeDxe.

Fixes: 789a72328553 ("OvmfPkg/VirtNorFlashDxe: use EFI_MEMORY_WC and drop 
AlignedCopyMem()")
Signed-off-by: Gerd Hoffmann <kra...@redhat.com>
Reviewed-by: Ard Biesheuvel <a...@kernel.org>




_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to