49 ASSERT (MicrocodeCpuId !=
NULL);
79 ASSERT (Microcode !=
NULL);
82 if (Microcode->DataSize != 0) {
83 TotalSize = Microcode->TotalSize;
102 ASSERT (Microcode !=
NULL);
123 IN UINT32 ProcessorSignature,
124 IN UINT32 ProcessorFlags,
131 if (MicrocodeCpuIdCount == 0) {
135 for (Index = 0; Index < MicrocodeCpuIdCount; Index++) {
136 if ((ProcessorSignature == MicrocodeCpuId[Index].ProcessorSignature) &&
137 ((ProcessorFlags & (1 << MicrocodeCpuId[Index].PlatformId)) != 0))
189 IN UINT32 MinimumRevision,
200 UINT32 ExtendedTableLength;
204 ASSERT (Microcode !=
NULL);
218 if ((Microcode->HeaderVersion != 1) || (Microcode->LoaderRevision != 1)) {
225 if (Microcode->UpdateRevision <= MinimumRevision) {
229 DataSize = Microcode->DataSize;
237 if ((DataSize % 4) != 0) {
247 if (((TotalSize % SIZE_1KB) != 0) || (TotalSize > MicrocodeLength)) {
258 Sum32 = Microcode->ProcessorSignature.Uint32 + Microcode->ProcessorFlags + Microcode->Checksum;
264 Microcode->ProcessorSignature.Uint32,
265 Microcode->ProcessorFlags,
302 (ExtendedTable[Index].ProcessorSignature.Uint32 + ExtendedTable[Index].
ProcessorFlag
303 + ExtendedTable[Index].
Checksum != Sum32))
320 ExtendedTable[Index].ProcessorSignature.Uint32,
BOOLEAN EFIAPI VerifyChecksum(IN BOOLEAN Log, IN UINT8 *Ptr, IN UINT32 Length)
UINT32 EFIAPI CalculateSum32(IN CONST UINT32 *Buffer, IN UINTN Length)
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
UINT64 EFIAPI AsmWriteMsr64(IN UINT32 Index, IN UINT64 Value)
#define MSR_IA32_BIOS_UPDT_TRIG
#define MSR_IA32_PLATFORM_ID
#define MSR_IA32_BIOS_SIGN_ID
#define CPUID_VERSION_INFO
UINT32 EFIAPI AsmCpuid(IN UINT32 Index, OUT UINT32 *RegisterEax OPTIONAL, OUT UINT32 *RegisterEbx OPTIONAL, OUT UINT32 *RegisterEcx OPTIONAL, OUT UINT32 *RegisterEdx OPTIONAL)
BOOLEAN EFIAPI IsValidMicrocode(IN CPU_MICROCODE_HEADER *Microcode, IN UINTN MicrocodeLength, IN UINT32 MinimumRevision, IN EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuIds, IN UINTN MicrocodeCpuIdCount, IN BOOLEAN VerifyChecksum)
BOOLEAN IsProcessorMatchedMicrocode(IN UINT32 ProcessorSignature, IN UINT32 ProcessorFlags, IN EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuId, IN UINTN MicrocodeCpuIdCount)
VOID EFIAPI GetProcessorMicrocodeCpuId(EDKII_PEI_MICROCODE_CPU_ID *MicrocodeCpuId)
VOID EFIAPI LoadMicrocode(IN CPU_MICROCODE_HEADER *Microcode)
UINT32 EFIAPI GetMicrocodeLength(IN CPU_MICROCODE_HEADER *Microcode)
UINT32 EFIAPI GetProcessorMicrocodeSignature(VOID)
STATIC BOOLEAN Match(IN CONST CHAR16 *Translated, IN UINTN TranslatedLength, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath)
UINT32 ExtendedSignatureCount
struct MSR_IA32_BIOS_SIGN_ID_REGISTER::@629 Bits
UINT32 MicrocodeUpdateSignature
struct MSR_IA32_PLATFORM_ID_REGISTER::@626 Bits