summaryrefslogtreecommitdiff
path: root/src/drivers/intel/fsp2_0/include/fsp
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2022-11-09 16:09:17 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-11-14 18:50:24 +0000
commit79db98764e62f626847bb76952679c27a66bd390 (patch)
treee6ec53fb542f568ec6d38a972d7d47713f36c1aa /src/drivers/intel/fsp2_0/include/fsp
parentfa775b7651e4488f0535c17a5e04974e7d1a40b2 (diff)
drivers/intel/fsp2_0/hand_off_block: add functions to iterate over HOBs
Introduce iterator function to go through the HOBs that will be used in follow-up commits both from the rest of the common FSP HOB access code and from SoC-specific code that needs to access specific HOBs. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: If86dde2a9f41d0ca7941493a92f11b91a77e2ae0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69475 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/intel/fsp2_0/include/fsp')
-rw-r--r--src/drivers/intel/fsp2_0/include/fsp/util.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/drivers/intel/fsp2_0/include/fsp/util.h b/src/drivers/intel/fsp2_0/include/fsp/util.h
index 1cc422e5db..566fad99f4 100644
--- a/src/drivers/intel/fsp2_0/include/fsp/util.h
+++ b/src/drivers/intel/fsp2_0/include/fsp/util.h
@@ -106,6 +106,23 @@ extern const uint8_t fsp_bootloader_tolum_guid[16];
extern const uint8_t fsp_nv_storage_guid[16];
extern const uint8_t fsp_reserved_memory_guid[16];
+/*
+ * Functions to iterate over the HOBs and get resource structs or extension HOB data. It's
+ * required to initialize the hob_iterator struct by a fsp_hob_iterator_init call before
+ * passing the fsp_hob_iterator_get_next_* functions. The fsp_hob_iterator_get_next_* functions
+ * will update the hob_iterator to point to the next HOB header, so the iterators can be called
+ * multiple times to get the data from multiple HOB instances.
+ */
+enum cb_err fsp_hob_iterator_init(const struct hob_header **hob_iterator);
+enum cb_err fsp_hob_iterator_get_next_resource(const struct hob_header **hob_iterator,
+ const struct hob_resource **res);
+enum cb_err fsp_hob_iterator_get_next_guid_resource(const struct hob_header **hob_iterator,
+ const uint8_t guid[16],
+ const struct hob_resource **res);
+enum cb_err fsp_hob_iterator_get_next_guid_extension(const struct hob_header **hob_iterator,
+ const uint8_t guid[16],
+ const void **data, size_t *size);
+
/* Function to extract the FSP timestamp from FPDT Hob and display */
void fsp_display_timestamp(void);
const void *fsp_get_hob_list(void);