mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
a6ec831c10
commit
63dbd62964
|
@ -22,5 +22,11 @@ ArmV7AllDataCachesOperation (
|
|||
IN ARM_V7_CACHE_OPERATION DataCacheOperation
|
||||
);
|
||||
|
||||
UINTN
|
||||
EFIAPI
|
||||
ArmReadIdMmfr0 (
|
||||
VOID
|
||||
);
|
||||
|
||||
#endif // __ARM_V7_LIB_H__
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue