]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootstd: Add private bootmeth data to the bootflow
authorSimon Glass <sjg@chromium.org>
Sun, 30 Jul 2023 17:16:56 +0000 (11:16 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 11 Aug 2023 00:34:54 +0000 (18:34 -0600)
Some bootmeths need to store their own information related to the
bootflow, in addition to the generic information in struct bootflow.
Add a pointer for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootflow.c
include/bootflow.h

index 81b5829d5b3784fcf4492d0a14084101d3076d19..daf862fac788576be73ea976f219c47bb0280f27 100644 (file)
@@ -432,6 +432,7 @@ void bootflow_free(struct bootflow *bflow)
        free(bflow->buf);
        free(bflow->os_name);
        free(bflow->fdt_fname);
+       free(bflow->bootmeth_priv);
 }
 
 void bootflow_remove(struct bootflow *bflow)
index 4152577afb71836fcc9877567f7804c283406cdc..ff2bddb5151500571b14442cb6290fac4f74949b 100644 (file)
@@ -83,6 +83,7 @@ enum bootflow_flags_t {
  * @flags: Flags for the bootflow (see enum bootflow_flags_t)
  * @cmdline: OS command line, or NULL if not known (allocated)
  * @x86_setup: Pointer to x86 setup block inside @buf, NULL if not present
+ * @bootmeth_priv: Private data for the bootmeth
  */
 struct bootflow {
        struct list_head bm_node;
@@ -108,6 +109,7 @@ struct bootflow {
        int flags;
        char *cmdline;
        char *x86_setup;
+       void *bootmeth_priv;
 };
 
 /**