summaryrefslogtreecommitdiffstats
path: root/util/cbfstool/fit.h
diff options
context:
space:
mode:
authorRizwan Qureshi <rizwan.qureshi@intel.com>2018-06-04 23:02:46 +0530
committerSubrata Banik <subrata.banik@intel.com>2018-06-26 05:59:52 +0000
commitc1072f2fc73926bbe73b507dda2e9346d39e041f (patch)
tree811ab96f0d55d6c0d8fb1d942c4d446cdacfad9d /util/cbfstool/fit.h
parent1dc188fad0c6c209a0185bae6b53d5798e7cf043 (diff)
downloadcoreboot-c1072f2fc73926bbe73b507dda2e9346d39e041f.tar.gz
coreboot-c1072f2fc73926bbe73b507dda2e9346d39e041f.tar.bz2
coreboot-c1072f2fc73926bbe73b507dda2e9346d39e041f.zip
cbfstool: Update FIT entries in the second bootblock
Once a second bootblock has been added using topswap (-j) option, Update the entries in second FIT using -j option with update-fit command. Additionally add a -q option which allows to insert the address of a FMAP region (which should hold a microcode) as the first entry in the second FIT. BUG=None BRANCH=None TEST= Create ROM images with -j options and update FIT using -q option. example: ./build/util/cbfstool/cbfstool coreboot.tmp create \ -M build/fmap.fmap -r COREBOOT,FW_MAIN_A,FW_MAIN_B,RW_LEGACY build/util/cbfstool/cbfstool coreboot.tmp add \ -f build/cbfs/fallback/bootblock.bin -n bootblock -t \ bootblock -b -49152 -j 0x10000 build/util/cbfstool/cbfstool coreboot.tmp add-master-header -j 0x10000 build/util/cbfstool/cbfstool coreboot.tmp add -f build/cpu_microcode_blob.bin \ -n cpu_microcode_blob.bin -t microcode -r COREBOOT -a 16 build/util/cbfstool/cbfstool coreboot.tmp. update-fit \ -n cpu_microcode_blob.bin -x 4 -j 0x10000 -q FW_MAIN_A Also try the failure scenarion by providing invalid topswap size. Change-Id: I9a417031c279038903cdf1761a791f2da0fe8644 Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com> Reviewed-on: https://review.coreboot.org/26836 Reviewed-by: Subrata Banik <subrata.banik@intel.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util/cbfstool/fit.h')
-rw-r--r--util/cbfstool/fit.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/util/cbfstool/fit.h b/util/cbfstool/fit.h
index 5f1b80bf0b4d..42b3b4722a4f 100644
--- a/util/cbfstool/fit.h
+++ b/util/cbfstool/fit.h
@@ -28,7 +28,15 @@
typedef unsigned (*fit_offset_converter_t)(const struct buffer *region,
unsigned offset);
+/*
+ * populate FIT with the MCUs prepsent in the blob provided.
+ *
+ * first_mcu_addr is an address (in ROM) that will point to a
+ * microcode patch. When provided, it will be forced as the first
+ * MCU entry into the FIT located in the topswap bootblock.
+ */
int fit_update_table(struct buffer *bootblock, struct cbfs_image *image,
- const char *microcode_blob_name, int empty_entries,
- fit_offset_converter_t offset_fn);
+ const char *microcode_blob_name, int empty_entries,
+ fit_offset_converter_t offset_fn,
+ uint32_t topswap_size, uint32_t first_mcu_addr);
#endif