soc/intel/xeon_sp: Move microcode loading
Move loading of microcode to pre_mp_init() as found on other Intel CPU drivers. There’s no need to cache the microcode location since intel_microcode_find() already caches it. No function change, thus untested. Change-Id: I05bbb074d189594027916c6a3b04270bd3b6edd1 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90892 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Reviewed-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
08e3ad9e03
commit
ea1a722d2b
4 changed files with 12 additions and 26 deletions
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
#include "chip.h"
|
||||
|
||||
static const void *microcode_patch;
|
||||
|
||||
static const config_t *chip_config = NULL;
|
||||
|
||||
bool cpu_soc_is_in_untrusted_mode(void)
|
||||
|
|
@ -167,6 +165,9 @@ static void set_max_turbo_freq(void)
|
|||
*/
|
||||
static void pre_mp_init(void)
|
||||
{
|
||||
const void *microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
x86_setup_mtrrs_with_detect();
|
||||
x86_mtrr_check();
|
||||
}
|
||||
|
|
@ -195,13 +196,6 @@ static const struct mp_ops mp_ops = {
|
|||
|
||||
void mp_init_cpus(struct bus *bus)
|
||||
{
|
||||
microcode_patch = intel_microcode_find();
|
||||
|
||||
if (!microcode_patch)
|
||||
printk(BIOS_ERR, "microcode not found in CBFS!\n");
|
||||
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
/* TODO: Handle mp_init_with_smm failure? */
|
||||
mp_init_with_smm(bus, &mp_ops);
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@
|
|||
|
||||
#include "chip.h"
|
||||
|
||||
static const void *microcode_patch;
|
||||
|
||||
static const config_t *chip_config = NULL;
|
||||
|
||||
bool cpu_soc_is_in_untrusted_mode(void)
|
||||
|
|
@ -59,6 +57,9 @@ static const struct cpu_driver driver __cpu_driver = {
|
|||
*/
|
||||
static void pre_mp_init(void)
|
||||
{
|
||||
const void *microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
x86_setup_mtrrs_with_detect();
|
||||
x86_mtrr_check();
|
||||
}
|
||||
|
|
@ -89,9 +90,6 @@ void mp_init_cpus(struct bus *bus)
|
|||
*/
|
||||
chip_config = bus->dev->chip_info;
|
||||
|
||||
microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
enum cb_err ret = mp_init_with_smm(bus, &mp_ops);
|
||||
if (ret != CB_SUCCESS)
|
||||
printk(BIOS_ERR, "MP initialization failure %d.\n", ret);
|
||||
|
|
|
|||
|
|
@ -246,6 +246,9 @@ static void pre_mp_init(void)
|
|||
{
|
||||
printk(BIOS_DEBUG, "%s: entry\n", __func__);
|
||||
|
||||
const void *microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
x86_setup_mtrrs_with_detect();
|
||||
x86_mtrr_check();
|
||||
}
|
||||
|
|
@ -279,13 +282,6 @@ void mp_init_cpus(struct bus *bus)
|
|||
{
|
||||
FUNC_ENTER();
|
||||
|
||||
const void *microcode_patch = intel_microcode_find();
|
||||
|
||||
if (!microcode_patch)
|
||||
printk(BIOS_ERR, "microcode not found in CBFS!\n");
|
||||
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
/*
|
||||
* This gets used in cpu device callback. Other than cpu 0,
|
||||
* rest of the CPU devices do not have
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@
|
|||
|
||||
#include "chip.h"
|
||||
|
||||
static const void *microcode_patch;
|
||||
|
||||
static const config_t *chip_config = NULL;
|
||||
|
||||
bool cpu_soc_is_in_untrusted_mode(void)
|
||||
|
|
@ -219,6 +217,9 @@ static void set_max_turbo_freq(void)
|
|||
*/
|
||||
static void pre_mp_init(void)
|
||||
{
|
||||
const void *microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
x86_setup_mtrrs_with_detect();
|
||||
x86_mtrr_check();
|
||||
}
|
||||
|
|
@ -255,9 +256,6 @@ void mp_init_cpus(struct bus *bus)
|
|||
*/
|
||||
chip_config = bus->dev->chip_info;
|
||||
|
||||
microcode_patch = intel_microcode_find();
|
||||
intel_microcode_load_unlocked(microcode_patch);
|
||||
|
||||
enum cb_err ret = mp_init_with_smm(bus, &mp_ops);
|
||||
if (ret != CB_SUCCESS)
|
||||
printk(BIOS_ERR, "MP initialization failure %d.\n", ret);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue