ArmPkg/ArmLib: Add ArmHasTrbe () helper function

Create a helper function to query whether ID_AA64MFR1_EL1 indicates
presence of the Trace Buffer Extension (TRBE). This feature is only
visible in AARCH64 state.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Reviewed-by: Leif Lindholm <quic_llindhol@quicinc.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
This commit is contained in:
Sami Mujawar
2023-09-22 15:35:15 +01:00
committed by mergify[bot]
parent 09fd4e4172
commit 08431081a3
3 changed files with 31 additions and 0 deletions

View File

@@ -780,6 +780,19 @@ EFIAPI
ArmHasVhe (
VOID
);
/**
Checks whether the CPU implements the Trace Buffer Extension.
@retval TRUE FEAT_TRBE is implemented.
@retval FALSE FEAT_TRBE is not mplemented.
**/
BOOLEAN
EFIAPI
ArmHasTrbe (
VOID
);
#endif // MDE_CPU_AARCH64
#ifdef MDE_CPU_ARM