ArmPkg: Add helper to read the Memory Model Features Register 2

Add helper function to read the MMFR2 register. We will need this to
determine CCIDX support.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Rebecca Cran 2021-02-07 17:52:37 -07:00 committed by mergify[bot]
parent 92bdb2a9c6
commit b69566afae
2 changed files with 14 additions and 0 deletions

View File

@ -41,5 +41,16 @@ EFIAPI
ArmReadIdAA64Pfr0 (
VOID
);
/** Reads the ID_AA64MMFR2_EL1 register.
@return The contents of the ID_AA64MMFR2_EL1 register.
**/
UINTN
EFIAPI
ArmReadIdAA64Mmfr2 (
VOID
);
#endif // __AARCH64_LIB_H__

View File

@ -425,6 +425,9 @@ ASM_FUNC(ArmCallWFI)
wfi
ret
ASM_FUNC(ArmReadIdAA64Mmfr2)
mrs x0, ID_AA64MMFR2_EL1 // read EL1 MMFR2
ret
ASM_FUNC(ArmReadMpidr)
mrs x0, mpidr_el1 // read EL1 MPIDR