TianoCore EDK2 master
Loading...
Searching...
No Matches
AArch64Lib.c
Go to the documentation of this file.
1
11#include <Base.h>
12
13#include <Library/ArmLib.h>
14#include <Library/DebugLib.h>
15
16#include <AArch64/AArch64.h>
17
18#include "AArch64Lib.h"
19#include "ArmLibPrivate.h"
20
27BOOLEAN
28EFIAPI
30 VOID
31 )
32{
33 return ((ArmReadIdAA64Pfr0 () & AARCH64_PFR0_GIC) != 0);
34}
35
41BOOLEAN
42EFIAPI
44 VOID
45 )
46{
47 UINTN Mmfr2;
48
49 Mmfr2 = ArmReadIdAA64Mmfr2 ();
50 return (((Mmfr2 >> 20) & 0xF) == 1) ? TRUE : FALSE;
51}
52
59BOOLEAN
60EFIAPI
62 VOID
63 )
64{
65 return ((ArmReadIdAA64Mmfr1 () & AARCH64_MMFR1_VH) != 0);
66}
67
74BOOLEAN
75EFIAPI
77 VOID
78 )
79{
80 return ((ArmReadIdAA64Dfr0 () & AARCH64_DFR0_TRBE) != 0);
81}
82
89BOOLEAN
90EFIAPI
92 VOID
93 )
94{
95 // The ID_AA64DFR0_EL1.TraceVer field identifies the presence of FEAT_ETE.
96 return ((ArmReadIdAA64Dfr0 () & AARCH64_DFR0_TRACEVER) != 0);
97}
UINT64 UINTN
BOOLEAN EFIAPI ArmHasGicSystemRegisters(VOID)
Definition: AArch64Lib.c:29
BOOLEAN EFIAPI ArmHasCcidx(VOID)
Definition: AArch64Lib.c:43
BOOLEAN EFIAPI ArmHasVhe(VOID)
Definition: AArch64Lib.c:61
BOOLEAN EFIAPI ArmHasTrbe(VOID)
Definition: AArch64Lib.c:76
BOOLEAN EFIAPI ArmHasEte(VOID)
Definition: AArch64Lib.c:91
UINTN EFIAPI ArmReadIdAA64Mmfr2(VOID)
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307