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:
parent
3de8f8c137
commit
89c0ef7395
|
@ -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(µcode_lock);
|
spin_lock(µcode_lock);
|
||||||
#endif
|
|
||||||
|
|
||||||
intel_microcode_load_unlocked(patch);
|
intel_microcode_load_unlocked(patch);
|
||||||
|
|
||||||
#if !defined(__ROMCC__) && !defined(__PRE_RAM__)
|
|
||||||
spin_unlock(µcode_lock);
|
spin_unlock(µcode_lock);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENV_RAMSTAGE
|
#if ENV_RAMSTAGE
|
||||||
|
|
Loading…
Reference in New Issue