]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPlatformPkg: remove EFI_MEMORY_UC attribute from normal memory
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Sep 2016 08:05:45 +0000 (09:05 +0100)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 8 Sep 2016 09:35:33 +0000 (10:35 +0100)
On ARM systems, mapping normal memory as device memory may have unintended
side effects, given that unaligned accesses or loads and stores with special
semantics (e.g., load/store exclusive) may fault or may not work as expected.
Similarly, DC ZVA instructions are only supported on normal memory, not
device memory.

So remove the EFI_MEMORY_UC attribute that we set by default on system RAM.
If any region requires this attribute, it is up to the driver to set this
attribute, and to ensure that no offending operations are performed on it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPlatformPkg/ArmJunoPkg/Library/ArmJunoLib/ArmJunoMem.c
ArmPlatformPkg/ArmVExpressPkg/Library/ArmVExpressLibRTSM/RTSMMem.c
ArmPlatformPkg/MemoryInitPei/MemoryInitPeiLib.c

index 41731c1ebdb8d7d8c7e6544b6e670b9f170706be..aa8d7d9c3b0d41e62d1849e6e88760e3066617f7 100644 (file)
@@ -56,7 +56,6 @@ ArmPlatformGetVirtualMemoryMap (
   ResourceAttributes =\r
       EFI_RESOURCE_ATTRIBUTE_PRESENT |\r
       EFI_RESOURCE_ATTRIBUTE_INITIALIZED |\r
-      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |\r
index c6df2e1b3de466c92f999e8fa6ea7380707206f4..115df246796d23081dadcbda94f743bc63233f56 100644 (file)
@@ -61,7 +61,6 @@ ArmPlatformGetVirtualMemoryMap (
     ResourceAttributes =\r
         EFI_RESOURCE_ATTRIBUTE_PRESENT |\r
         EFI_RESOURCE_ATTRIBUTE_INITIALIZED |\r
-        EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |\r
         EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |\r
         EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |\r
         EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |\r
index 75e6631d7f30152ce4458fa4d94ad8c53254fcc8..2feb11f21d5d3fc1ead27a5434d3fc1e5da8d007 100644 (file)
@@ -89,7 +89,6 @@ MemoryPeim (
   ResourceAttributes = (\r
       EFI_RESOURCE_ATTRIBUTE_PRESENT |\r
       EFI_RESOURCE_ATTRIBUTE_INITIALIZED |\r
-      EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |\r
       EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |\r