/* Returns the maximum cache level implemented by the current CPU. */
UINT8 SmbiosProcessorGetMaxCacheLevel(VOID)
/* Returns the maximum cache level implemented by the current CPU. */
UINT8 SmbiosProcessorGetMaxCacheLevel(VOID)
{
  CLIDR_DATA  Clidr;
  UINT8       CacheLevel;
  UINT8       MaxCacheLevel;
  MaxCacheLevel = 0;
  Clidr.Data = ReadCLIDR ();
  if (CLIDR_GET_CACHE_TYPE (Clidr.Data, 1) == ClidrCacheTypeNone) {
    return 0;
  }
  for (CacheLevel = 1; CacheLevel <= MAX_ARM_CACHE_LEVEL; CacheLevel++) {
    if (CLIDR_GET_CACHE_TYPE (Clidr.Data, CacheLevel) == ClidrCacheTypeNone) {
      MaxCacheLevel = CacheLevel;
      break;
    }
  }
  return MaxCacheLevel;
}