From 2c38f50b4ad8850676a70427bf1e2e9e9aab82a4 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Fri, 6 Dec 2013 23:14:54 -0600 Subject: cpu/intel: Make all Intel CPUs load microcode from CBFS The sequence to inject microcode updates is virtually the same for all Intel CPUs. The same function is used to inject the update in both CBFS and hardcoded cases, and in both of these cases, the microcode resides in the ROM. This should be a safe change across the board. The function which loaded compiled-in microcode is also removed here in order to prevent it from being used in the future. The dummy terminators from microcode need to be removed if this change is to work when generating microcode from several microcode_blob.c files, as is the case for older socketed CPUs. Removal of dummy terminators is done in a subsequent patch. Change-Id: I2cc8220cc4cd4a87aa7fc750e6c60ccdfa9986e9 Signed-off-by: Alexandru Gagniuc Reviewed-on: http://review.coreboot.org/4495 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/cpu/intel/model_6dx/Kconfig | 1 + src/cpu/intel/model_6dx/Makefile.inc | 2 ++ src/cpu/intel/model_6dx/microcode_blob.c | 9 +++++++++ src/cpu/intel/model_6dx/model_6dx_init.c | 12 +----------- 4 files changed, 13 insertions(+), 11 deletions(-) create mode 100644 src/cpu/intel/model_6dx/microcode_blob.c (limited to 'src/cpu/intel/model_6dx') diff --git a/src/cpu/intel/model_6dx/Kconfig b/src/cpu/intel/model_6dx/Kconfig index 5e70f59117..546d9ece2e 100644 --- a/src/cpu/intel/model_6dx/Kconfig +++ b/src/cpu/intel/model_6dx/Kconfig @@ -1,3 +1,4 @@ config CPU_INTEL_MODEL_6DX bool select SMP + select SUPPORT_CPU_UCODE_IN_CBFS diff --git a/src/cpu/intel/model_6dx/Makefile.inc b/src/cpu/intel/model_6dx/Makefile.inc index cc88a2c513..4731de3858 100644 --- a/src/cpu/intel/model_6dx/Makefile.inc +++ b/src/cpu/intel/model_6dx/Makefile.inc @@ -1 +1,3 @@ ramstage-y += model_6dx_init.c + +cpu_microcode-$(CONFIG_CPU_MICROCODE_CBFS_GENERATE) += microcode_blob.c diff --git a/src/cpu/intel/model_6dx/microcode_blob.c b/src/cpu/intel/model_6dx/microcode_blob.c new file mode 100644 index 0000000000..52489e4c7c --- /dev/null +++ b/src/cpu/intel/model_6dx/microcode_blob.c @@ -0,0 +1,9 @@ +unsigned microcode_updates_6dx[] = { + #include "microcode-1355-m206d618.h" + + /* Dummy terminator */ + 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, + 0x0, 0x0, 0x0, 0x0, +}; diff --git a/src/cpu/intel/model_6dx/model_6dx_init.c b/src/cpu/intel/model_6dx/model_6dx_init.c index 19b351dd1c..06236a3b3b 100644 --- a/src/cpu/intel/model_6dx/model_6dx_init.c +++ b/src/cpu/intel/model_6dx/model_6dx_init.c @@ -9,16 +9,6 @@ #include #include -static uint32_t microcode_updates[] = { - #include "microcode-1355-m206d618.h" - - /* Dummy terminator */ - 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, -}; - static void model_6dx_init(device_t dev) { /* Turn on caching if we haven't already */ @@ -27,7 +17,7 @@ static void model_6dx_init(device_t dev) x86_mtrr_check(); /* Update the microcode */ - intel_update_microcode(microcode_updates); + intel_update_microcode_from_cbfs(); /* Enable the local cpu apics */ setup_lapic(); -- cgit v1.2.3