summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Include/Library/ArmLib.h
diff options
context:
space:
mode:
authorPeicong Li <lipeicong@huawei.com>2017-11-07 20:56:51 +0800
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-07 13:29:46 +0000
commit829633e3a82dee6f7f2541a0193331f6b8566dec (patch)
tree5bf31900e4083b39eea63296f59c25ad5391b1ff /ArmPkg/Include/Library/ArmLib.h
parent050763db0730a0bb46235cec87e3716632dc532c (diff)
downloadedk2-829633e3a82dee6f7f2541a0193331f6b8566dec.tar.gz
edk2-829633e3a82dee6f7f2541a0193331f6b8566dec.tar.bz2
edk2-829633e3a82dee6f7f2541a0193331f6b8566dec.zip
ArmPkg/ArmMmuLib: Add new attribute WRITE_BACK_NONSHAREABLE
Flash region needs to be set as cacheable (write back) to increase performance, if PEI is still XIP on flash or DXE FV is decompressed from flash FV. However some ARM platforms do not support to set flash as inner shareable since flash is not normal DDR memory and it will not respond to cache snoop request, which will causes system hang after MMU is enabled. So we need a new ARM memory region attribute WRITE_BACK_NONSHAREABLE for flash region on these platforms specifically. This attribute will set the region as write back but not inner shared. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Peicong Li <lipeicong@huawei.com> Signed-off-by: Heyi Guo <heyi.guo@linaro.org> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'ArmPkg/Include/Library/ArmLib.h')
-rw-r--r--ArmPkg/Include/Library/ArmLib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ArmPkg/Include/Library/ArmLib.h b/ArmPkg/Include/Library/ArmLib.h
index 24ffe9f1aa..24e84c7a19 100644
--- a/ArmPkg/Include/Library/ArmLib.h
+++ b/ArmPkg/Include/Library/ArmLib.h
@@ -41,6 +41,14 @@ typedef enum {
ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_UNCACHED_UNBUFFERED,
ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK,
ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK,
+
+ // On some platforms, memory mapped flash region is designed as not supporting
+ // shareable attribute, so WRITE_BACK_NONSHAREABLE is added for such special
+ // need.
+ // Do NOT use below two attributes if you are not sure.
+ ARM_MEMORY_REGION_ATTRIBUTE_WRITE_BACK_NONSHAREABLE,
+ ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_BACK_NONSHAREABLE,
+
ARM_MEMORY_REGION_ATTRIBUTE_WRITE_THROUGH,
ARM_MEMORY_REGION_ATTRIBUTE_NONSECURE_WRITE_THROUGH,
ARM_MEMORY_REGION_ATTRIBUTE_DEVICE,