[coreboot-gerrit] Patch set updated for coreboot: cpu: create an empty file when no microcode files are given
Alexander Couzens (lynxis@fe80.eu)
gerrit at coreboot.org
Thu Oct 22 03:46:56 CEST 2015
Alexander Couzens (lynxis at fe80.eu) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12109
-gerrit
commit 9dd465a7427aa9284509f68718f53e551efe780f
Author: Alexander Couzens <lynxis at fe80.eu>
Date: Wed Oct 21 12:02:39 2015 +0200
cpu: create an empty file when no microcode files are given
Having an empty microcode file makes it more easy to debug
in comparison to a not existing file in cbfs. There are some
platforms (e.g. ep80579) which support microcode updates but
not having any microcode updates yet in our tree.
These platform hang the build because `cat` is called with no
parameters.
Change-Id: I2699bde0c62ae62ca888686f8b496e845c36d970
Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
src/cpu/Makefile.inc | 2 +-
src/cpu/intel/microcode/microcode.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/cpu/Makefile.inc b/src/cpu/Makefile.inc
index d939061..52b58f7 100644
--- a/src/cpu/Makefile.inc
+++ b/src/cpu/Makefile.inc
@@ -40,7 +40,7 @@ endif
$(obj)/cpu_microcode_blob.bin: $$(cpu_microcode_bins)
@printf " MICROCODE $(subst $(obj)/,,$(@))\n"
@echo $(cpu_microcode_bins)
- cat $+ > $@
+ cat /dev/null $+ > $@
cbfs-files-$(cbfs_include_ucode) += cpu_microcode_blob.bin
cpu_microcode_blob.bin-file := $(cpu_ucode_cbfs_file)
diff --git a/src/cpu/intel/microcode/microcode.c b/src/cpu/intel/microcode/microcode.c
index 8791a2e..76d9e10 100644
--- a/src/cpu/intel/microcode/microcode.c
+++ b/src/cpu/intel/microcode/microcode.c
@@ -141,6 +141,8 @@ const void *intel_microcode_find(void)
if (ucode_updates == NULL)
return NULL;
#endif
+ if (microcode_len == 0)
+ return NULL;
/* CPUID sets MSR 0x8B iff a microcode update has been loaded. */
msr.lo = 0;
More information about the coreboot-gerrit
mailing list