44 for (CacheLevel = 1; CacheLevel <= MAX_ARM_CACHE_LEVEL; CacheLevel++) {
46 MaxCacheLevel = CacheLevel;
67 BOOLEAN SeparateCaches;
69 SeparateCaches =
FALSE;
73 CacheType = CLIDR_GET_CACHE_TYPE (Clidr.
Data, CacheLevel - 1);
76 SeparateCaches =
TRUE;
79 return SeparateCaches;
92 BOOLEAN Arm64SocIdSupported;
95 Arm64SocIdSupported =
FALSE;
99 if ((SmcCallStatus < 0) || ((SmcCallStatus >> 16) >= 1)) {
100 SmcParam = SMCCC_ARCH_SOC_ID;
102 if (SmcCallStatus >= 0) {
103 Arm64SocIdSupported =
TRUE;
107 return Arm64SocIdSupported;
120 OUT INT32 *Jep106Code,
121 OUT INT32 *SocRevision
133 if (SmcCallStatus >= 0) {
134 *Jep106Code = SmcCallStatus;
136 Status = EFI_UNSUPPORTED;
142 if (SmcCallStatus >= 0) {
143 *SocRevision = SmcCallStatus;
145 Status = EFI_UNSUPPORTED;
167 ProcessorId = ((UINT64)SocRevision << 32) | Jep106Code;
169 ProcessorId = ArmReadMidr ();
184 return ArmReadCntFrq ();
196 return ProcessorFamilyIndicatorFamily2;
208 UINTN MainIdRegister;
209 UINT16 ProcessorFamily2;
211 MainIdRegister = ArmReadMidr ();
213 if (((MainIdRegister >> 16) & 0xF) < 8) {
214 ProcessorFamily2 = ProcessorFamilyARM;
216 if (
sizeof (VOID *) == 4) {
217 ProcessorFamily2 = ProcessorFamilyARMv7;
219 ProcessorFamily2 = ProcessorFamilyARMv8;
223 return ProcessorFamily2;
237 ZeroMem (&Characteristics,
sizeof (Characteristics));
241 return Characteristics;
CLIDR_CACHE_TYPE
The cache types reported in the CLIDR register.
@ ClidrCacheTypeSeparate
There are separate data and instruction caches.
@ ClidrCacheTypeNone
No cache is present.
UINTN ArmCallSmc1(IN UINTN Function, IN OUT UINTN *Arg1 OPTIONAL, OUT UINTN *Arg2 OPTIONAL, OUT UINTN *Arg3 OPTIONAL)
UINTN ArmCallSmc0(IN UINTN Function, OUT UINTN *Arg1 OPTIONAL, OUT UINTN *Arg2 OPTIONAL, OUT UINTN *Arg3 OPTIONAL)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
UINT8 SmbiosProcessorGetMaxCacheLevel(VOID)
UINTN SmbiosGetExternalClockFrequency(VOID)
UINT8 SmbiosGetProcessorFamily(VOID)
EFI_STATUS SmbiosGetSmcArm64SocId(OUT INT32 *Jep106Code, OUT INT32 *SocRevision)
BOOLEAN SmbiosProcessorHasSeparateCaches(UINT8 CacheLevel)
UINT16 SmbiosGetProcessorFamily2(VOID)
UINT64 SmbiosGetProcessorId(VOID)
BOOLEAN HasSmcArm64SocId(VOID)
PROCESSOR_CHARACTERISTIC_FLAGS SmbiosGetProcessorCharacteristics(VOID)
UINT32 Data
The entire 32-bit value.