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:
committed by
mergify[bot]
parent
09fd4e4172
commit
08431081a3
@@ -119,3 +119,18 @@ ArmHasVhe (
|
||||
{
|
||||
return ((ArmReadIdAA64Mmfr1 () & AARCH64_MMFR1_VH) != 0);
|
||||
}
|
||||
|
||||
/**
|
||||
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
|
||||
)
|
||||
{
|
||||
return ((ArmReadIdAA64Dfr0 () & AARCH64_DFR0_TRBE) != 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user