From 98ffb426f40593f930388c006f8058c199defff4 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 15 Jan 2013 15:15:32 -0600 Subject: 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 Reviewed-on: http://review.coreboot.org/2778 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/include/cpu/intel/microcode.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/include/cpu/intel') diff --git a/src/include/cpu/intel/microcode.h b/src/include/cpu/intel/microcode.h index e9c13f978c..7a291e2f27 100644 --- a/src/include/cpu/intel/microcode.h +++ b/src/include/cpu/intel/microcode.h @@ -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 -- cgit v1.2.3