summaryrefslogtreecommitdiff
path: root/include/fdt_support.h
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-09-13 21:29:33 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-11-26 00:39:07 +0100
commit9f45aeb937275960405de0f2abca8c665dbb03d4 (patch)
tree682bf81cb76c04cd6a12c5bb888c99165f358392 /include/fdt_support.h
parentd879616e9e64cf5a9c43dedc30677aa2fa463d64 (diff)
spl: fit: implement fdt_record_loadable
During the loading of more complex FIT images (e.g. when the invoked next stage needs to find additional firmware for a power-management core... or if there are multiple images for different privilege levels started in parallel), it is helpful to create a record of what images are loaded where: if a FDT is loaded for one of the next stages, it can be used to convey the status and location of loadables. This adds a fdt_record_loadable() function that can be invoked to record the status of each loadable below the /fit-images path. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r--include/fdt_support.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h
index 2bca4d7889..afaf0e787d 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -133,6 +133,26 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev);
static inline void fdt_fixup_crypto_node(void *blob, int sec_rev) {}
#endif
+#if CONFIG_IS_ENABLED(LOAD_FIT)
+/**
+ * Record information about a processed loadable in /fit-images (creating
+ * /fit-images if necessary).
+ *
+ * @param blob FDT blob to update
+ * @param index index of this loadable
+ * @param name name of the loadable
+ * @param load_addr address the loadable was loaded to
+ * @param size number of bytes loaded
+ * @param entry_point entry point (if specified, otherwise pass -1)
+ * @param type type (if specified, otherwise pass NULL)
+ * @param os os-type (if specified, otherwise pass NULL)
+ * @return 0 if ok, or -1 or -FDT_ERR_... on error
+ */
+int fdt_record_loadable(void *blob, u32 index, const char *name,
+ uintptr_t load_addr, u32 size, uintptr_t entry_point,
+ const char *type, const char *os);
+#endif
+
#ifdef CONFIG_PCI
#include <pci.h>
int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose);