summaryrefslogtreecommitdiffstats
path: root/src/include/cbfs.h
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2014-12-25 15:07:22 -0800
committerPatrick Georgi <pgeorgi@google.com>2015-04-17 09:54:40 +0200
commit6bfabce33b698571be73a47f62fe733f18e69f66 (patch)
tree9fc265ea3e3552cb0e0ad0b414bebdb4bdf1c0b2 /src/include/cbfs.h
parent7271e23ec296b09420b72861e0d272ecbb94d2ca (diff)
downloadcoreboot-6bfabce33b698571be73a47f62fe733f18e69f66.tar.gz
coreboot-6bfabce33b698571be73a47f62fe733f18e69f66.tar.bz2
coreboot-6bfabce33b698571be73a47f62fe733f18e69f66.zip
cbfs: look for CBFS header in a predefined place
This patch introduces a new option (CONFIG_MULTIPLE_CBFS_INSTANCES) to allow multiple CBFS instances in the bootrom. When the new option is enabled, the code running on the target controls which CBFS instance is used. Since all other then header CBFS structures use relative addressing, the only value which needs explicit setting is the offset of the CBFS header in the bootrom. This patch adds a facility to set the CBFS header offset. The offset value of zero means default. i.e. the CBFS initialization code still discovers the offset through the value saved at the top of the ROM. BRANCH=storm BUG=chrome-os-partner:34161, chromium:445938 TEST=with the rest patches in, storm target successfully boots from RW section A. Change-Id: Id8333c9373e61597f0c653c727dcee4ef6a58cd2 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: e57a3a15bba7cdcca4a5d684ed78f8ac6dbbc95e Original-Change-Id: I4c026389ec4fbaa19bd11b2160202282d2f9283c Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/237569 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9747 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Edward O'Callaghan <edward.ocallaghan@koparo.com>
Diffstat (limited to 'src/include/cbfs.h')
-rw-r--r--src/include/cbfs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index c46d2a0be3a9..086fa19eb646 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -84,5 +84,10 @@ void *cbfs_simple_buffer_unmap(struct cbfs_simple_buffer *buffer,
*/
int init_default_cbfs_media(struct cbfs_media *media);
+#if (IS_ENABLED(CONFIG_MULTIPLE_CBFS_INSTANCES))
+void cbfs_set_header_offset(size_t offset);
+#else
+static inline void cbfs_set_header_offset(size_t offset) {}
+#endif
#endif