diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-11-18 15:58:26 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-11-18 15:58:26 +0000 |
commit | 63dbd629649a4c5ccf83243e9482a4e0d092b422 (patch) | |
tree | a4ecbf622840e06550f2d9433ee7a333e681d596 /ArmPkg/Library | |
parent | a6ec831c10d7994098e100b441a96bbe735dda01 (diff) | |
download | edk2-platforms-63dbd629649a4c5ccf83243e9482a4e0d092b422.tar.xz |
ArmPkg/ArmV7Lib: add support for reading the ID_MMFR0 system register
Implement an accessor function for the ID_MMFR0 system register, which
contains information about the VMSA implementation. We will need this
to access the number of shareability levels and the nature of their
implementations.
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@18894 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Library')
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h | 6 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S | 5 | ||||
-rw-r--r-- | ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm | 5 |
3 files changed, 16 insertions, 0 deletions
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h index 50fba38240..df770cf7d7 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Lib.h @@ -22,5 +22,11 @@ ArmV7AllDataCachesOperation ( IN ARM_V7_CACHE_OPERATION DataCacheOperation
);
+UINTN
+EFIAPI
+ArmReadIdMmfr0 (
+ VOID
+ );
+
#endif // __ARM_V7_LIB_H__
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S index 93164b8f0e..7366eee6dc 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.S @@ -51,6 +51,7 @@ GCC_ASM_EXPORT (ArmReadTpidrurw) GCC_ASM_EXPORT (ArmWriteTpidrurw)
GCC_ASM_EXPORT (ArmIsArchTimerImplemented)
GCC_ASM_EXPORT (ArmReadIdPfr1)
+GCC_ASM_EXPORT (ArmReadIdMmfr0)
.set DC_ON, (0x1<<2)
.set IC_ON, (0x1<<12)
@@ -326,4 +327,8 @@ ASM_PFX(ArmReadIdPfr1): mrc p15, 0, r0, c0, c1, 1 @ Read ID_PFR1 Register
bx lr
+ASM_PFX(ArmReadIdMmfr0):
+ mrc p15, 0, r0, c0, c1, 4 @ Read ID_MMFR0 Register
+ bx lr
+
ASM_FUNCTION_REMOVE_IF_UNREFERENCED
diff --git a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm index d6f249038a..78a12e1629 100644 --- a/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm +++ b/ArmPkg/Library/ArmLib/ArmV7/ArmV7Support.asm @@ -48,6 +48,7 @@ EXPORT ArmWriteTpidrurw
EXPORT ArmIsArchTimerImplemented
EXPORT ArmReadIdPfr1
+ EXPORT ArmReadIdMmfr0
AREA ArmV7Support, CODE, READONLY
PRESERVE8
@@ -320,4 +321,8 @@ ArmReadIdPfr1 mrc p15, 0, r0, c0, c1, 1 ; Read ID_PFR1 Register
bx lr
+ArmReadIdMmfr0
+ mrc p15, 0, r0, c0, c1, 4 ; Read ID_MMFR0 Register
+ bx lr
+
END
|