From 56d3103f6e0cc2bd0968ed5c34fe9b0d7b6ddc04 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 15 Jun 2022 21:03:42 +0530 Subject: cpu/intel/microcode: Fix `device enumeration` boot regression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior commit hash 0310d34c2 (cpu/intel/microcode: Have provision to re-load microcode patch) introduces an option to reload the microcode based on SoC selecting RELOAD_MICROCODE_PATCH config. This patch might potentially introduce a boot time regression (~30ms) when RELOAD_MICROCODE_PATCH kconfig is enabled as all cores might end up reloading the microcode without the proper need. Note: RELOAD_MICROCODE_PATCH kconfig is not yet selected by any SoC hence, it doesn't impact any coreboot project. The idea is reloading microcode depends on specific use case (for example: Skip FSP doing MP Init from Alder Lake onwards) hence, a follow up patch will create a newer API to allow reloading of microcode when RELOAD_MICROCODE_PATCH config is enabled. BUG=b:233199592 TEST=Build and boot google/kano to ChromeOS. Signed-off-by: Subrata Banik Change-Id: Ie320153d25cefe153fc8a67db447384f1f20f31f Reviewed-on: https://review.coreboot.org/c/coreboot/+/65155 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan --- src/cpu/intel/microcode/microcode.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c index beadb489de..469bd25496 100644 --- a/src/cpu/intel/microcode/microcode.c +++ b/src/cpu/intel/microcode/microcode.c @@ -79,15 +79,10 @@ void intel_microcode_load_unlocked(const void *microcode_patch) current_rev = read_microcode_rev(); - /* - * No use loading the same revision unless RELOAD_MICROCODE_PATCH - * config is selected. - */ - if (!CONFIG(RELOAD_MICROCODE_PATCH) && (current_rev == m->rev)) { + /* No use loading the same revision. */ + if (current_rev == m->rev) { printk(BIOS_INFO, "microcode: Update skipped, already up-to-date\n"); return; - } else { - printk(BIOS_INFO, "microcode: Re-load microcode patch\n"); } #if ENV_RAMSTAGE -- cgit v1.2.3