aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/intel/microcode/Makefile.inc
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2012-06-19 08:34:51 -0700
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-07-24 22:18:04 +0200
commit39fea6e2a87aa79e6b156c96f0b2ba3ae9a35ba2 (patch)
tree15597b36c92ba8d75709bc68038185aeea9fe6a1 /src/cpu/intel/microcode/Makefile.inc
parent537b4e09e644107ed644cd88f8a7fd488406b9a2 (diff)
Add microcode blob processing
When microcode storage in CBFS is enabled, the make system is supposed to generate the microcode blob and place it into the generated ROM image as a CBFS component. The microcode source representation does not change: it is still an array of 32 bit constants. This new addition compiles the array into a separate object file and then strips all sections but data. The raw data section is then included into CBFS as a file named 'microcode_blob.bin' of type 0x53, which is assigned to microcode storage. Change-Id: I84ae040be52f520b106e3471c7e391e64d7847d9 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: http://review.coreboot.org/1295 Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu/intel/microcode/Makefile.inc')
-rw-r--r--src/cpu/intel/microcode/Makefile.inc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cpu/intel/microcode/Makefile.inc b/src/cpu/intel/microcode/Makefile.inc
index 6631019f38..f4d01020d1 100644
--- a/src/cpu/intel/microcode/Makefile.inc
+++ b/src/cpu/intel/microcode/Makefile.inc
@@ -1 +1,15 @@
ramstage-y += microcode.c
+
+
+ifeq ($(CONFIG_MICROCODE_IN_CBFS),y)
+
+SRC_PATH = src/cpu/intel/microcode
+FLAGS = -I $(CONFIG_MICROCODE_INCLUDE_PATH) -include $(obj)/config.h
+$(obj)/microcode_blob.o: $(SRC_PATH)/microcode_blob.c
+ $(CC) $(FLAGS) -MMD -c -o $@ $<
+
+$(obj)/microcode_blob.bin: $(obj)/microcode_blob.o
+ objcopy -j .data -O binary $< $@
+
+-include $(obj)/microcode_blob.d
+endif