Справочник Пользователя для Intel 253668-032US

Скачать
Страница из 806
Vol. 3   9-53
PROCESSOR MANAGEMENT AND INITIALIZATION
Example 9-12.  INT 15 DO42 Calling Program Pseudo-code
//
//
We must be in real mode
//
If the system is not in Real mode exit
//
// Detect presence of Genuine Intel processor(s) that can be updated 
// using(CPUID)
//
If no Intel processors exist that can be updated exit
//
//
Detect the presence of the Intel microcode update extensions
//
If the BIOS fails the PresenceTestexit
//
//
If the APIC is enabled, see if any other processors are out there
//
Read IA32_APICBASE
If APIC enabled
{
Send Broadcast Message to all processors except self via APIC
Have all processors execute CPUID, record the Processor Signature 
(i.e.,Extended Family, Extended Model, Type, Family, Model, 
Stepping)
Have all processors read IA32_PLATFORM_ID[52:50], record Platform
 
 Id Bits
If current processor cannot be updated
exit
}
//
//
Determine the number of unique update blocks needed for this system
//
NumBlocks = 0
For each processor
{
If ((this is a unique processor stepping) AND
(we have a unique update in the database for this processor))
{
Checksum the update from the database;
If Checksum fails
exit
NumBlocks 
← NumBlocks + size of microcode update / 2048
}
}
//