Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34929 )
Change subject: intel/microcode: Remove uses of __PRE_RAM__ ......................................................................
intel/microcode: Remove uses of __PRE_RAM__
Include file <smp/spinlock.h> has the required logic to define empty stubs for spinlocks.
Change-Id: I00da5c2b0570c26f2e3bb464274485cc2c08c8f0 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/microcode/microcode.c 1 file changed, 2 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/34929/1
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c index 44f7f1f..7bd072f 100644 --- a/src/cpu/intel/microcode/microcode.c +++ b/src/cpu/intel/microcode/microcode.c @@ -27,11 +27,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 */ @@ -152,7 +150,7 @@ unsigned int x86_model, x86_family; msr_t msr;
-#ifdef __ROMCC__ +#if defined(__ROMCC__) struct cbfs_file *microcode_file;
microcode_file = walkcbfs_head((char *) MICROCODE_CBFS_FILE); @@ -228,15 +226,11 @@ { const void *patch = intel_microcode_find();
-#if !defined(__ROMCC__) && !defined(__PRE_RAM__) spin_lock(µcode_lock); -#endif
intel_microcode_load_unlocked(patch);
-#if !defined(__ROMCC__) && !defined(__PRE_RAM__) spin_unlock(µcode_lock); -#endif }
#if ENV_RAMSTAGE