Volume 3A System Programming Guide_ Part 1 (794103), страница 101
Текст из файла (страница 101)
The OEM error field is undefined if AHcontains either SUCCESS (00H) or NOT_IMPLEMENTED (86H). In all other cases, itmust be set with either SUCCESS or a value meaningful to the OEM.The following sections describe functions provided by the INT15H-based interface.9.11.8.5Function 00H—Presence TestThis function verifies that the BIOS has implemented required microcode updatefunctions. Table 9-13 lists the parameters and return codes for the function.Table 9-13. Parameters for the Presence TestInputAXFunction Code0D042HBLSub-function00H - Presence testCarry FlagCarry Set - Failure - AH contains statusOutputCFCarry Clear - All return values validAHReturn CodeALOEM ErrorAdditional OEM information.EBXSignature Part 1'INTE' - Part one of the signatureECXSignature Part 2'LPEP'- Part two of the signatureEDXLoader VersionVersion number of the microcode update loaderSIUpdate CountNumber of 2048 update blocks in NVRAM the BIOSallocated to storing microcode updatesReturn Codes (see Table 9-18 for code definitionsSUCCESSThe function completed successfully.NOT_IMPLEMENTEDThe function is not implemented.In order to assure that the BIOS function is present, the caller must verify the carryflag, the return code, and the 64-bit signature.
The update count reflects the numberof 2048-byte blocks available for storage within one non-volatile RAM.The loader version number refers to the revision of the update loader program that isincluded in the system BIOS image.9-56 Vol. 3PROCESSOR MANAGEMENT AND INITIALIZATION9.11.8.6Function 01H—Write Microcode Update DataThis function integrates a new microcode update into the BIOS storage device. Table9-14 lists the parameters and return codes for the function.Table 9-14. Parameters for the Write Update Data FunctionInputAXFunction Code0D042HBLSub-function01H - Write updateES:DIUpdate AddressReal Mode pointer to the Intel Update structure.
Thisbuffer is 2048 bytes in length if the processor supportsonly fixed-size microcode update or...Real Mode pointer to the Intel Update structure. Thisbuffer is 64 KBytes in length if the processor supports avariable-size microcode update.CXScratch Pad1Real mode segment address of 64 KBytes of RAM blockDXScratch Pad2Real mode segment address of 64 KBytes of RAM blockSIScratch Pad3Real mode segment address of 64 KBytes of RAM blockSS:SPStack pointer32 KBytes of stack minimumCarry FlagCarry Set - Failure - AH Contains statusOutputCFCarry Clear - All return values validAHReturn CodeStatus of the callALOEM ErrorAdditional OEM informationReturn Codes (see Table 9-18 for code definitionsSUCCESSThe function completed successfully.NOT_IMPLEMENTEDThe function is not implemented.WRITE_FAILUREA failure occurred because of the inability to write thestorage device.ERASE_FAILUREA failure occurred because of the inability to erase thestorage device.READ_FAILUREA failure occurred because of the inability to read thestorage device.STORAGE_FULLThe BIOS non-volatile storage area is unable toaccommodate the update because all available updateblocks are filled with updates that are needed forprocessors in the system.Vol.
3 9-57PROCESSOR MANAGEMENT AND INITIALIZATIONTable 9-14. Parameters for the Write Update Data Function (Contd.)InputCPU_NOT_PRESENTThe processor stepping does not currently exist in thesystem.INVALID_HEADERThe update header contains a header or loader versionthat is not recognized by the BIOS.INVALID_HEADER_CSThe update does not checksum correctly.SECURITY_FAILUREThe processor rejected the update.INVALID_REVISIONThe same or more recent revision of the update exists inthe storage device.DescriptionThe BIOS is responsible for selecting an appropriate update block in the non-volatilestorage for storing the new update. This BIOS is also responsible for ensuring theintegrity of the information provided by the caller, including authenticating theproposed update before incorporating it into storage.Before writing the update block into NVRAM, the BIOS should ensure that the updatestructure meets the following criteria in the following order:1.
The update header version should be equal to an update header versionrecognized by the BIOS.2. The update loader version in the update header should be equal to the updateloader version contained within the BIOS image.3. The update block must checksum. This checksum is computed as a 32-bitsummation of all double words in the structure, including the header, data, andprocessor signature table.The BIOS selects update block(s) in non-volatile storage for storing the candidateupdate. The BIOS can select any available update block as long as it guarantees thatonly a single update exists for any given processor stepping in non-volatile storage.If the update block selected already contains an update, the following additionalcriteria apply to overwrite it:•The processor signature in the proposed update must be equal to the processorsignature in the header of the current update in NVRAM (Processor Signature +platform ID bits).•The update revision in the proposed update should be greater than the updaterevision in the header of the current update in NVRAM.If no unused update blocks are available and the above criteria are not met, the BIOScan overwrite update block(s) for a processor stepping that is no longer present inthe system.
This can be done by scanning the update blocks and comparing theprocessor steppings, identified in the MP Specification table, to the processor steppings that currently exist in the system.9-58 Vol. 3PROCESSOR MANAGEMENT AND INITIALIZATIONFinally, before storing the proposed update in NVRAM, the BIOS must verify theauthenticity of the update via the mechanism described in Section 9.11.6, “Microcode Update Loader.” This includes loading the update into the current processor,executing the CPUID instruction, reading MSR 08Bh, and comparing a calculatedvalue with the update revision in the proposed update header for equality.When performing the write update function, the BIOS must record the entire update,including the header, the update data, and the extended processor signature table (ifapplicable). When writing an update, the original contents may be overwritten,assuming the above criteria have been met.
It is the responsibility of the BIOS toensure that more recent updates are not overwritten through the use of this BIOScall, and that only a single update exists within the NVRAM for any processor stepping and platform ID.Figure 9-8 and Figure 9-9 show the process the BIOS follows to choose an updateblock and ensure the integrity of the data when it stores the new microcode update.Vol.
3 9-59PROCESSOR MANAGEMENT AND INITIALIZATIONWrite Microcode UpdateDoes Update Match ACPU in The SystemNoReturnCPU_NOT_PRESENTNoReturnINVALID_HEADERNoReturnINVALID_HEADERNoReturnINVALID_HEADER_CSYesValid UpdateHeader Version?YesLoader Revision MatchBIOS’s Loader?YesDoes UpdateChecksum Correctly?1Figure 9-8. Microcode Update Write Operation Flow [1]9-60 Vol. 3PROCESSOR MANAGEMENT AND INITIALIZATION1Update Matching CPUAlready In NVRAM?NoSpace Available inNVRAM?YesYesUpdate Revision NewerThan NVRAM Update?NoReturnINVALID_REVISIONReplacementNopolicy implemented?NoYesReturnSTORAGE_FULLYesUpdate PassAuthenticity Test?ReturnSECURITY_FAILUREYesUpdate NMRAM RecordReturnSUCCESSFigure 9-9. Microcode Update Write Operation Flow [2]Vol. 3 9-61PROCESSOR MANAGEMENT AND INITIALIZATION9.11.8.7Function 02H—Microcode Update ControlThis function enables loading of binary updates into the processor.
Table 9-15 liststhe parameters and return codes for the function.Table 9-15. Parameters for the Control Update Sub-functionInputAXFunction Code0D042HBLSub-function02H - Control updateBHTaskSee the description below.CXScratch Pad1Real mode segment of 64 KBytes of RAM blockDXScratch Pad2Real mode segment of 64 KBytes of RAM blockSIScratch Pad3Real mode segment of 64 KBytes of RAM blockSS:SPStack pointer32 kilobytes of stack minimumOutputCFCarry FlagCarry Set - Failure - AH contains statusCarry Clear - All return values valid.AHReturn CodeStatus of the callALOEM ErrorAdditional OEM Information.BLUpdate StatusEither enable or disable indicatorReturn Codes (see Table 9-18 for code definitions)SUCCESSFunction completed successfully.READ_FAILUREA failure occurred because of the inability to read thestorage device.This control is provided on a global basis for all updates and processors.
The callercan determine the current status of update loading (enabled or disabled) withoutchanging the state. The function does not allow the caller to disable loading of binaryupdates, as this poses a security risk.The caller specifies the requested operation by placing one of the values from Table9-16 in the BH register. After successfully completing this function, the BL registercontains either the enable or the disable designator. Note that if the function fails, theupdate status return value is undefined.9-62 Vol.
3PROCESSOR MANAGEMENT AND INITIALIZATIONTable 9-16. Mnemonic ValuesMnemonicValueMeaningEnable1Enable the Update loading at initialization time.Query2Determine the current state of the update control withoutchanging its status.The READ_FAILURE error code returned by this function has meaning only if thecontrol function is implemented in the BIOS NVRAM.
The state of this feature(enabled/disabled) can also be implemented using CMOS RAM bits where READfailure errors cannot occur.9.11.8.8Function 03H—Read Microcode Update DataThis function reads a currently installed microcode update from the BIOS storage intoa caller-provided RAM buffer.
Table 9-17 lists the parameters and return codes.Table 9-17. Parameters for the Read Microcode Update Data FunctionInputAXFunction Code0D042HBLSub-function03H - Read UpdateES:DIBuffer AddressReal Mode pointer to the Intel Updatestructure that will be written with thebinary dataECXScratch Pad1Real Mode Segment address of 64KBytes of RAM Block (lower 16 bits)ECXScratch Pad2Real Mode Segment address of 64KBytes of RAM Block (upper 16 bits)DXScratch Pad3Real Mode Segment address of 64KBytes of RAM BlockSS:SPStack pointer32 KBytes of Stack MinimumSIUpdate NumberThis is the index number of the updateblock to be read.