cpu/intel/microcode: Fix `device enumeration` boot regression
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 <subratabanik@google.com>
Change-Id: Ie320153d25cefe153fc8a67db447384f1f20f31f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65155
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index beadb48..469bd25 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -79,15 +79,10 @@
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