[PATCH 08/18] bootstd: Allow storing x86 setup information

Simon Glass sjg at chromium.org
Fri Apr 28 21:18:08 CEST 2023


On x86 boards Linux uses a block of binary data to provide information
about the command line, memory map, etc. Provide a way to store this in
the bootflow so it can be passed on to the OS.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 cmd/bootflow.c     | 2 ++
 include/bootflow.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index b20d5893632..155c71f83c2 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -336,6 +336,8 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
 	else
 		puts("(none)");
 	putc('\n');
+	if (bflow->x86_setup)
+		printf("X86 setup: %p\n", bflow->x86_setup);
 	printf("Logo:      %s\n", bflow->logo ?
 	       simple_xtoa((ulong)map_to_sysmem(bflow->logo)) : "(none)");
 	if (bflow->logo) {
diff --git a/include/bootflow.h b/include/bootflow.h
index e49f3a24864..9baa8672083 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -82,6 +82,7 @@ enum bootflow_flags_t {
  * @fdt_addr: Address of loaded fdt
  * @flags: Flags for the bootflow (see enum bootflow_flags_t)
  * @cmdline: OS command line, or NULL it not known (allocated)
+ * @x86_setup: Pointer to x86 setup block inside @buf, NULL if not present
  */
 struct bootflow {
 	struct list_head bm_node;
@@ -106,6 +107,7 @@ struct bootflow {
 	ulong fdt_addr;
 	int flags;
 	char *cmdline;
+	char *x86_setup;
 };
 
 /**
-- 
2.40.1.495.gc816e09b53d-goog



More information about the U-Boot mailing list