Intel 253668-032US User Manual

Page of 806
9-44   Vol. 3
PROCESSOR MANAGEMENT AND INITIALIZATION
}
Else
{
//
// Assume the Data Size has been used to calculate the 
// location of Update.ProcessorSignature[N] and a match
// on Update.ProcessorSignature[N] has already succeeded
//
If (Update.ProcessorFlags[n] & Flag)
{
Load Update
}
}
}
9.11.5 
Microcode Update Checksum
Each microcode update contains a DWORD checksum located in the update header. It 
is software’s responsibility to ensure that a microcode update is not corrupt. To check 
for a corrupt microcode update, software must perform a unsigned DWORD (32-bit) 
checksum of the microcode update. Even though some fields are signed, the 
checksum procedure treats all DWORDs as unsigned. Microcode updates with a 
header version equal to 00000001H must sum all DWORDs that comprise the micro-
code update. A valid checksum check will yield a value of 00000000H. Any other 
value indicates the microcode update is corrupt and should not be loaded.
The checksum algorithm shown by the pseudo code in Example 9-7 treats the micro-
code update as an array of unsigned DWORDs. If the data size DWORD field at byte 
offset 32 equals 00000000H, the size of the encrypted data is 2000 bytes, resulting 
in 500 DWORDs. Otherwise the microcode update size in DWORDs = (Total Size / 4), 
where the total size is a multiple of 1024 bytes (1 KBytes).
Example 9-7.  Pseudo Code Example of Checksum Test
← 512
If (Update.DataSize != 00000000H)
← Update.TotalSize / 4
ChkSum 
← 0 
For (I 
← 0; I < N; I++)
{
ChkSum 
← ChkSum + MicrocodeUpdate[I]
}