summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2015-07-14 17:15:24 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-07-14 22:37:10 +0200
commitf61b35d5b0b25ca766f6d207c4b354407862b973 (patch)
tree6649b9dc23400677e7aca24fce755c0593b92bb1 /payloads/libpayload/include
parentfb5d5b16eef66d37dc20cdf0769c9049bf47d6be (diff)
libpayload: store boot media information in sysinfo
Write boot media information in sysinfo, if it exists. This allows picking the right CBFS for further files in case there are several. Change-Id: I75a8ee6b93f349b9f2fab1e82826aba675949c0a Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/10869 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/coreboot_tables.h11
-rw-r--r--payloads/libpayload/include/sysinfo.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/payloads/libpayload/include/coreboot_tables.h b/payloads/libpayload/include/coreboot_tables.h
index 0c516b1e49..24cbf453eb 100644
--- a/payloads/libpayload/include/coreboot_tables.h
+++ b/payloads/libpayload/include/coreboot_tables.h
@@ -257,6 +257,17 @@ struct cb_spi_flash {
uint32_t erase_cmd;
};
+#define CB_TAG_BOOT_MEDIA_PARAMS 0x0030
+struct cb_boot_media_params {
+ uint32_t tag;
+ uint32_t size;
+ /* offsets are relative to start of boot media */
+ uint64_t fmap_offset;
+ uint64_t cbfs_offset;
+ uint64_t cbfs_size;
+ uint64_t boot_media_size;
+};
+
#define CB_TAG_SERIALNO 0x002a
#define CB_MAX_SERIALNO_LENGTH 32
diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h
index c407c3d16b..b97ae14771 100644
--- a/payloads/libpayload/include/sysinfo.h
+++ b/payloads/libpayload/include/sysinfo.h
@@ -124,6 +124,10 @@ struct sysinfo_t {
uint32_t sector_size;
uint32_t erase_cmd;
} spi_flash;
+ uint64_t fmap_offset;
+ uint64_t cbfs_offset;
+ uint64_t cbfs_size;
+ uint64_t boot_media_size;
uint64_t mtc_start;
uint32_t mtc_size;
};