summaryrefslogtreecommitdiff
path: root/include/image.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-21 03:23:04 +0300
committerTom Rini <trini@konsulko.com>2022-10-31 18:02:45 +0300
commitbbe285c305e26d2944c38ea17c44c605b3289e25 (patch)
tree120c08d0bcd646f0991c3c52826216e270a07794 /include/image.h
parent44ad35a0f699b0b49ef6efaa1405b6f99c703ea8 (diff)
downloadu-boot-bbe285c305e26d2944c38ea17c44c605b3289e25.tar.xz
image: Allow loading a FIT image for a particular phase
Add support for filtering out FIT images by phase. Rather than adding yet another argument to this already overloaded function, use a composite value, where the phase is only added in if needed. The FIT config is still selected (and verified) as normal, but the images are selected based on the phase. Tests for this come in a little later, as part of the updated VPL test. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/image.h')
-rw-r--r--include/image.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/image.h b/include/image.h
index 7c3dcc407c..65d0d4f438 100644
--- a/include/image.h
+++ b/include/image.h
@@ -691,9 +691,10 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
* name (e.g. "conf-1") or NULL to use the default. On
* exit points to the selected configuration name.
* @param arch Expected architecture (IH_ARCH_...)
- * @param image_type Required image type (IH_TYPE_...). If this is
+ * @param image_ph_type Required image type (IH_TYPE_...). If this is
* IH_TYPE_KERNEL then we allow IH_TYPE_KERNEL_NOLOAD
- * also.
+ * also. If a phase is required, this is included also,
+ * see image_phase_and_type()
* @param bootstage_id ID of starting bootstage to use for progress updates.
* This will be added to the BOOTSTAGE_SUB values when
* calling bootstage_mark()
@@ -704,7 +705,7 @@ int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
*/
int fit_image_load(struct bootm_headers *images, ulong addr,
const char **fit_unamep, const char **fit_uname_configp,
- int arch, int image_type, int bootstage_id,
+ int arch, int image_ph_type, int bootstage_id,
enum fit_load_op load_op, ulong *datap, ulong *lenp);
/**
@@ -1349,14 +1350,15 @@ int fit_conf_get_prop_node_index(const void *fit, int noffset,
* @fit: FIT to check
* @noffset: Offset of conf@xxx node to check
* @prop_name: Property to read from the conf node
+ * @phase: Image phase to use, IH_PHASE_NONE for any
*
* The conf- nodes contain references to other nodes, using properties
* like 'kernel = "kernel"'. Given such a property name (e.g. "kernel"),
* return the offset of the node referred to (e.g. offset of node
* "/images/kernel".
*/
-int fit_conf_get_prop_node(const void *fit, int noffset,
- const char *prop_name);
+int fit_conf_get_prop_node(const void *fit, int noffset, const char *prop_name,
+ enum image_phase_t phase);
int fit_check_ramdisk(const void *fit, int os_noffset,
uint8_t arch, int verify);