update written display diagnostic exit 8 42 processor

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: he same time. The BIOS also refuses to load an update for a processor that does not exist in the system. The calling application should implement a verify function that is run after the update write function successfully completes. This function reads back the update and verifies that the BIOS 8-40 PROCESSOR MANAGEMENT AND INITIALIZATION returned an image identical to the one that was written. The following pseudo-code represents a calling program. INT 15 D042 Calling Program Pseudo-code // // We must be in real mode // If the system is not in Real mode then Exit // // Detect the presence of Genuine Intel processor(s) that can be updated (CPUID) // If no Intel processors exist that can be updated then Exit // // Detect the presence of the Intel microcode update extensions // If the BIOS fails the PresenceTest then Exit // // If the APIC is enabled, see if any other processors are out there // Read APICBaseMSR If APIC enabled { Send Broadcast Message to all processors except self via APIC; Have all processors execute CPUID and record Type, Family, Model, Stepping Have all processors read BBL_CR_OVRD[52:50] and record platform ID bits If current processor is not updatable then Exit } // // Determine the number of unique update slots needed for this system // NumSlots = 0; For each processor { If ((this is a unique processor stepping) and (we have an update in the database for this processor)) { Checksum the update from the database; If Checksum fails then Exit; Increment NumSlots; } } // // Do we have enough update slots for all CPUs? // If there are more unique processor steppings than update slots provided by the BIOS then Exit 8-41 PROCESSOR MANAGEMENT AND INITIALIZATION // // Do we need any update slots at all? If not, then we’re all done // If (NumSlots == 0) then Exit // // Record updates for processors in NVRAM. // For (I=0; I<NumSlots; I++) { // // Load each Update // Issue the WriteUpdate function If (STORAGE_FULL) returned { Display Error -- BIOS is not managing NVRAM appropriately exit } If (INVALID_REVISION) returned { Display Message: More recent update already loaded in NVRAM for this stepping continue; } If any other error returned { Display Diagnostic exit } // // Verify the update was loaded correctly // Issue the ReadUpdate function If an error occurred { Display Diagnostic exit } // // Compare the Update read to that written // if (Update read != Update written) { Display Diagnostic exit } } // 8-42 PROCESSOR MANAGEMENT AND INITIALIZATION // Enable Update Loading, and inform user // Issue the ControlUpdate function with Task=Enable. MICROCODE UPDATE FUNCTIONS Table 8-8 defines the current P6 family Processor microcode update functions. Table 8-8. Microcode Update Functions Microcode Update Function Presence test Write update data Update control Read update data Function Number 00h 01h 02h 03h Description Returns information about the supported functions. Writes one of the update data areas (slots). Globally controls the loading of updates. Reads one of the update data areas (slots). Required/Optional Required Required Required Required INT 15H-BASED INTERFACE Intel recommends that a BIOS interface be provided that allows additional microcode updates to be added to the system flash. The INT15 interface is an Intel-defined method for doing this. The program that calls this interface is responsible for providing three 64-kilobyte RAM areas for BIOS use during calls to the read and write functions. These RAM scratch pads can be used by the BIOS for any purpose, but only for the duration of the function call. The calling routine places real mode segments pointing to the RAM blocks in the CX, DX and SI registers. Calls to functions in this interface must be made with a minimum of 32 kilobytes of stack available to the BIOS. In general, each function returns with CF cleared and AH contains the returned status. The general return codes and other constant definitions are listed in Section, “Return Codes”. The OEM Error (AL) is provided for the OEM to return additional error information specific to the platform. If the BIOS provides no additional information about the error, the OEM Error must be set to SUCCESS. The OEM Error field is undefined if AH contains either SUCCESS (00) or NOT_IMPLEMENTED (86h). In all other cases it must be set with either SUCCESS or a value meaningful to the OEM. The following text details the functions provided by the INT15h-based interface. 8-43 PROCESSOR MANAGEMENT AND INITIALIZATION Function 00h - Presence Test This function verifies that the BIOS has implemented the required microcode update functions. Table 8-3 lists the parameters and return codes for the function. Table 8-9. Parameters for the Presence Test Input: AX BL Output: CF AH AL EBX ECX EDX SI Carry Flag Return Code OEM Error Signature Part 1 Signature Part 2 Loader Version Update Count Additional OEM Information. ’INTE’ - Part one of the signature. ’LPEP’- Part two of the signature. Version nu...
View Full Document

This note was uploaded on 06/07/2013 for the course ECE 1234 taught by Professor Kwhon during the Spring '10 term at Berkeley.

Ask a homework question - tutors are online