From 347f5c3232e0656482b2cf0f5b67c08741cd1083 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Tue, 21 Jun 2022 12:54:03 +0530 Subject: 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 Change-Id: Ib4865575a44d2c8c6c3a20c2823a546d8f261e52 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65285 Reviewed-by: Eric Lai Reviewed-by: Werner Zeh Tested-by: build bot (Jenkins) --- src/cpu/intel/microcode/microcode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/cpu') 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(); -- cgit v1.2.3