/** @file
Header file for CpuPlatform Lib.
Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _CPU_PLATFORM_LIB_H_
#define _CPU_PLATFORM_LIB_H_
#include
#include
/**
Check CPU Type of the platform
@retval CPU_FAMILY CPU type
**/
CPU_FAMILY
EFIAPI
GetCpuFamily (
VOID
);
/**
Return Cpu stepping type
@retval CPU_STEPPING Cpu stepping type
**/
CPU_STEPPING
EFIAPI
GetCpuStepping (
VOID
);
/**
Return CPU Sku
@retval UINT8 CPU Sku
**/
UINT8
EFIAPI
GetCpuSku (
VOID
);
/**
Returns the processor microcode revision of the processor installed in the system.
@retval Processor Microcode Revision
**/
UINT32
GetCpuUcodeRevision (
VOID
);
/**
Check if this microcode is correct one for processor
@param[in] Cpuid - processor CPUID
@param[in] MicrocodeEntryPoint - entry point of microcode
@param[in] Revision - revision of microcode
@retval CorrectMicrocode if this microcode is correct
**/
BOOLEAN
CheckMicrocode (
IN UINT32 Cpuid,
IN CPU_MICROCODE_HEADER *MicrocodeEntryPoint,
IN UINT32 *Revision
);
/**
Check on the processor if SGX is supported.
@retval True if SGX supported or FALSE if not
**/
BOOLEAN
IsSgxSupported (
VOID
);
/**
Get processor generation
@retval EnumSklCpu Executing thread is Skylake
@retval EnumKblCpu Executing thread is Kabylake
**/
CPU_GENERATION
GetCpuGeneration (
VOID
);
#endif