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>
This commit is contained in:
Kyösti Mälkki 2019-09-24 08:56:36 +03:00
parent 3de8f8c137
commit 89c0ef7395
1 changed files with 1 additions and 7 deletions

View File

@ -24,11 +24,9 @@
#include <arch/cpu.h> #include <arch/cpu.h>
#include <cpu/x86/msr.h> #include <cpu/x86/msr.h>
#include <cpu/intel/microcode.h> #include <cpu/intel/microcode.h>
#if !defined(__PRE_RAM__)
#include <smp/spinlock.h> #include <smp/spinlock.h>
DECLARE_SPIN_LOCK(microcode_lock) DECLARE_SPIN_LOCK(microcode_lock)
#endif
struct microcode { struct microcode {
u32 hdrver; /* Header Version */ u32 hdrver; /* Header Version */
@ -225,15 +223,11 @@ void intel_update_microcode_from_cbfs(void)
{ {
const void *patch = intel_microcode_find(); const void *patch = intel_microcode_find();
#if !defined(__ROMCC__) && !defined(__PRE_RAM__)
spin_lock(&microcode_lock); spin_lock(&microcode_lock);
#endif
intel_microcode_load_unlocked(patch); intel_microcode_load_unlocked(patch);
#if !defined(__ROMCC__) && !defined(__PRE_RAM__)
spin_unlock(&microcode_lock); spin_unlock(&microcode_lock);
#endif
} }
#if ENV_RAMSTAGE #if ENV_RAMSTAGE