mirror of https://github.com/acidanthera/audk.git
ArmVirt: don't use unaligned CopyMem () on NOR flash
Commit789a723285
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:789a723285
("OvmfPkg/VirtNorFlashDxe: use EFI_MEMORY_WC and drop AlignedCopyMem()") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
parent
47ab397011
commit
987cc09c7c
|
@ -296,7 +296,11 @@
|
|||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
<LibraryClasses>
|
||||
# don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
}
|
||||
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
|
|
|
@ -428,7 +428,11 @@
|
|||
<LibraryClasses>
|
||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
<LibraryClasses>
|
||||
# don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
}
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
#
|
||||
|
|
|
@ -331,7 +331,11 @@
|
|||
<LibraryClasses>
|
||||
NULL|ArmVirtPkg/Library/ArmVirtTimerFdtClientLib/ArmVirtTimerFdtClientLib.inf
|
||||
}
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
|
||||
OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf {
|
||||
<LibraryClasses>
|
||||
# don't use unaligned CopyMem () on the UEFI varstore NOR flash region
|
||||
BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf
|
||||
}
|
||||
MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue