summaryrefslogtreecommitdiff
path: root/util/cbfstool/fit.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/cbfstool/fit.h')
-rw-r--r--util/cbfstool/fit.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/util/cbfstool/fit.h b/util/cbfstool/fit.h
index 3f3185c758..51e3c0feca 100644
--- a/util/cbfstool/fit.h
+++ b/util/cbfstool/fit.h
@@ -20,6 +20,19 @@
#ifndef __CBFSTOOL_FIT_H
#define __CBFSTOOL_FIT_H
-int fit_update_table(struct cbfs_image *image,
- int empty_entries, const char *microcode_blob_name);
+#include "cbfs_image.h"
+#include "common.h"
+
+/*
+ * Converts between offsets from the start of the specified image region and
+ * "top-aligned" offsets from the top of the entire flash image. Should work in
+ * both directions: accepts either type of offset and produces the other type.
+ * The implementation must have some notion of the flash image's total size.
+ */
+typedef unsigned (*fit_offset_converter_t)(const struct buffer *region,
+ unsigned offset);
+
+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);
#endif