]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/ArmV7Mmu: fix write-through translation table accesses
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 18 Nov 2015 15:58:03 +0000 (15:58 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Wed, 18 Nov 2015 15:58:03 +0000 (15:58 +0000)
The definition TTBR_WRITE_THROUGH_NO_ALLOC makes little sense, since
a) its meaning is unclear in the context of TTBRx, since write through
   always implies Read-Allocate and no Write-Allocate
b) its definition equals the definition of TTBR_WRITE_BACK_ALLOC

So instead, rename it to TTBR_WRITE_THROUGH and update the definition
to reflect the name.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18893 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Include/Chipset/ArmV7Mmu.h
ArmPkg/Library/ArmLib/ArmV7/ArmV7Mmu.c

index e38c5f7b055d0a2e1c997f062920842aa4643141..2545864775cf230464f714f7acc1ae49926e6115 100644 (file)
@@ -29,7 +29,7 @@
 #define TTBR_RGN_INNER_WRITE_THROUGH         BIT0\r
 #define TTBR_RGN_INNER_WRITE_BACK_NO_ALLOC   (BIT0|BIT6)\r
 \r
-#define TTBR_WRITE_THROUGH_NO_ALLOC     ( TTBR_RGN_OUTER_WRITE_BACK_ALLOC | TTBR_RGN_INNER_WRITE_BACK_ALLOC )\r
+#define TTBR_WRITE_THROUGH              ( TTBR_RGN_OUTER_WRITE_THROUGH | TTBR_RGN_INNER_WRITE_THROUGH )\r
 #define TTBR_WRITE_BACK_NO_ALLOC        ( TTBR_RGN_OUTER_WRITE_BACK_NO_ALLOC | TTBR_RGN_INNER_WRITE_BACK_NO_ALLOC )\r
 #define TTBR_NON_CACHEABLE              ( TTBR_RGN_OUTER_NON_CACHEABLE | TTBR_RGN_INNER_NON_CACHEABLE )\r
 #define TTBR_WRITE_BACK_ALLOC           ( TTBR_RGN_OUTER_WRITE_BACK_ALLOC | TTBR_RGN_INNER_WRITE_BACK_ALLOC )\r
index e05a51e0d901c978a646429289225878690eebb5..8ed763cc8265c6948f9b8e6a8be5bd97b2f3e6ae 100644 (file)
@@ -259,7 +259,7 @@ ArmConfigureMmu (
     TTBRAttributes = TTBR_WRITE_BACK_ALLOC;\r
   } else if ((TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_WRITE_THROUGH) ||\r
       (TranslationTableAttribute == ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_THROUGH)) {\r
-    TTBRAttributes = TTBR_WRITE_THROUGH_NO_ALLOC;\r
+    TTBRAttributes = TTBR_WRITE_THROUGH;\r
   } else {\r
     ASSERT (0); // No support has been found for the attributes of the memory region that the translation table belongs to.\r
     return RETURN_UNSUPPORTED;\r