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>
This commit is contained in:
Subrata Banik 2022-06-15 21:03:42 +05:30 committed by Felix Held
parent 8cd1dfa4ae
commit 56d3103f6e
1 changed files with 2 additions and 7 deletions

View File

@ -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