summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2022-06-21 12:54:03 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-06-22 12:50:56 +0000
commit347f5c3232e0656482b2cf0f5b67c08741cd1083 (patch)
tree15997450de763decd51c2aa2e28607edc619fce5
parent7734af81bcdc602b71811343dd8f8d092fc1028f (diff)
microcode: Add error msg in case `intel_microcode_find()` return NULL
This patch adds an error msg if intel_microcode_find() is unable to find a microcode for the CPU SKU. TEST=Able to see the error msg in coreboot serial log in case packed with wrong microcode binary. Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: Ib4865575a44d2c8c6c3a20c2823a546d8f261e52 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65285 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--src/cpu/intel/microcode/microcode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index 4c85a56096..2d3fc2e737 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -94,8 +94,10 @@ void intel_microcode_load_unlocked(const void *microcode_patch)
u32 current_rev;
const struct microcode *m = microcode_patch;
- if (!m)
+ if (!m) {
+ printk(BIOS_ERR, "microcode: failed because no ucode was found\n");
return;
+ }
current_rev = read_microcode_rev();