intel microcode: split up microcode loading stages

This patch only applies to CONFIG_MICROCODE_IN_CBFS. The intel microcode
update routine would always walk the CBFS for the microcode file. Then
it would loop through the whole file looking for a match then load the
microcode. This process was maintained for intel_update_microcode_from_cbfs(),
however 2 new functions were exported:
	1.  const void *intel_microcode_find(void)
	2.  void intel_microcode_load_unlocked(const void *microcode_patch)

The first locates a matching microcode while the second loads that
mircocode. These new functions can then be used to cache the found
microcode blob w/o having to re-walk the CBFS.

Booted baskingridge board to Linux and noted that all microcode
revisions match on all the CPUs.

Change-Id: Ifde3f3e5c100911c4f984dd56d36664a8acdf7d5
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/2778
Tested-by: build bot (Jenkins)
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Aaron Durbin
2013-01-15 15:15:32 -06:00
committed by Ronald G. Minnich
parent 3c734bb355
commit 98ffb426f4
2 changed files with 117 additions and 18 deletions

View File

@@ -23,6 +23,13 @@
#ifndef __PRE_RAM__
#if CONFIG_CPU_MICROCODE_IN_CBFS
void intel_update_microcode_from_cbfs(void);
/* Find a microcode that matches the revision and platform family returning
* NULL if none found. */
const void *intel_microcode_find(void);
/* It is up to the caller to determine if parallel loading is possible as
* well as ensuring the micrcode matches the family and revision (i.e. with
* intel_microcode_find()). */
void intel_microcode_load_unlocked(const void *microcode_patch);
#else
void intel_update_microcode(const void *microcode_updates);
#endif