background image

9-40 Vol. 3A

PROCESSOR MANAGEMENT AND INITIALIZATION

older version. The update header contains information about version and processor specifics for the calling 
program to make an intelligent decision about loading.

There can be no ambiguous updates. The BIOS must refuse to allow multiple updates for the same CPU to exist 
at the same time; it also must refuse to load updates for processors that don’t exist on the system.

The calling application should implement a verify function that is run after the update write function success-
fully completes. This function reads back the update and verifies that the BIOS returned an image identical to 
the one that was written. 

Example 9-12 represents a calling program.

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

}

}

//

//

Do we have enough update slots for all CPUs?

//