summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-09-24 08:56:36 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-09-26 01:16:54 +0000
commit89c0ef739599d458a4bbac6c5de39023f2f49b2d (patch)
treeabceb1b9dfd3a274b53c341cc092546019d21d3a
parent3de8f8c137f336ec2b96114303cee873ac636762 (diff)
downloadcoreboot-89c0ef739599d458a4bbac6c5de39023f2f49b2d.tar.xz
cpu/intel/: Clean up microcode update from __PRE_RAM__
Change-Id: Ib12985dd9a12495533a82be556405f975a0abe27 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35587 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
-rw-r--r--src/cpu/intel/microcode/microcode.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index ed660a774b..feb73c8b42 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -24,11 +24,9 @@
#include <arch/cpu.h>
#include <cpu/x86/msr.h>
#include <cpu/intel/microcode.h>
-
-#if !defined(__PRE_RAM__)
#include <smp/spinlock.h>
+
DECLARE_SPIN_LOCK(microcode_lock)
-#endif
struct microcode {
u32 hdrver; /* Header Version */
@@ -225,15 +223,11 @@ void intel_update_microcode_from_cbfs(void)
{
const void *patch = intel_microcode_find();
-#if !defined(__ROMCC__) && !defined(__PRE_RAM__)
spin_lock(&microcode_lock);
-#endif
intel_microcode_load_unlocked(patch);
-#if !defined(__ROMCC__) && !defined(__PRE_RAM__)
spin_unlock(&microcode_lock);
-#endif
}
#if ENV_RAMSTAGE