summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/intel/microcode/microcode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index 0f362d4b35..9d6d28b3e6 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -119,13 +119,16 @@ uint32_t get_microcode_checksum(const void *microcode)
const void *intel_microcode_find(void)
{
- const struct microcode *ucode_updates;
+ static const struct microcode *ucode_updates;
size_t microcode_len;
u32 eax;
u32 pf, rev, sig, update_size;
unsigned int x86_model, x86_family;
msr_t msr;
+ if (ucode_updates)
+ return ucode_updates;
+
ucode_updates = cbfs_map(MICROCODE_CBFS_FILE, &microcode_len);
if (ucode_updates == NULL)
return NULL;
@@ -173,6 +176,8 @@ const void *intel_microcode_find(void)
microcode_len -= update_size;
}
+ ucode_updates = NULL;
+
return NULL;
}