Matching the Image to a Processor

CPUID Enhanced to Supply Update Signature

A CPUID request type 1 returns the processor family, model and stepping in the EAX register (see Figure 25-2 on page 635). In addition to returning this information, the CPUID instruction was enhanced (starting with the Pentium® Pro processor) to provide an indication as to whether or not an update was previously been loaded into the processor. In addition to returning the processor family, model and stepping in EAX, the execution of a CPUID request type 1 also causes the processor to store the ID (referred to as the signature) of the Microcode Update image (if one was previously loaded into the processor) in the Microcode Signature MSR. If no update has been loaded into the processor, the contents of the Microcode Signature MSR remains unmodified. The format of the signature stored in this MSR is identical to that of the Update Revision field in the header data structure (see Figure 25-1 on page 633). The following code fragment illustrates the method used to obtain the signature of the currently-loaded update (if any):

mov   ecx,08Bh   ;set ecx = address of Update Signature MSR
xor   eax,eax    ;clear eax
xor   edx,edx    ;clear edx
wrmsr            ;write all zeros into Update Signature MSR
mov   eax,1      ;set up request for CPUID request type 1
cpuid            ;execute CPUID request type 1
mov   ecx,08Bh   ;set ecx = address of Update Signature MSR
rdmsr            ;read Update Signature MSR into edx

If the value returned in EDX from the Update Signature MSR is still all zeros, then no update has been successfully loaded into the processor.

Processor/Image Match Determination

A Microcode Update image is appropriate to be uploaded into a processor if both of the following conditions are met:

  1. The processor type, family, model, stepping returned by a CPUID request type 1 is the same as the type, family, model, stepping in the Microcode Image's type, family, model and stepping fields.

  2. The bit in the header's Processor Flag field identified by the IA32_Platform_ID MSR Platform ID bit field = 1.

In order to perform the check specified in step 2, the programmer uses the RDMSR instruction to obtain the contents of the IA32_PlatformID MSR. The BCD value specified in the 3-bit Platform ID field is used to select a bit in the header's 8-bit Processor Flag field. If the selected bit is set to one and the processor type, family, model and stepping fields returned by the CPUID request type 1 are the same as those fields in the image's header, then the image is meant for the processor.

Figure 25-3. IA32_Platform ID MSR Register


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.53.209