[PATCH 01/14] bloblist: Update the tag numbering

Simon Glass sjg at chromium.org
Tue Jul 25 23:36:13 CEST 2023


Align this with the new v0.9 spec. It only has a single area for all
non-standard tags.

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

 common/bloblist.c  |  2 +-
 include/bloblist.h | 37 +++++++++++++------------------------
 test/bloblist.c    |  2 +-
 3 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/common/bloblist.c b/common/bloblist.c
index 2144b10e1d0..ca3e6efa800 100644
--- a/common/bloblist.c
+++ b/common/bloblist.c
@@ -36,7 +36,7 @@ static struct tag_name {
 	enum bloblist_tag_t tag;
 	const char *name;
 } tag_name[] = {
-	{ BLOBLISTT_NONE, "(none)" },
+	{ BLOBLISTT_VOID, "(void)" },
 
 	/* BLOBLISTT_AREA_FIRMWARE_TOP */
 
diff --git a/include/bloblist.h b/include/bloblist.h
index 7ea72c6bd46..bad5fbbb889 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -81,7 +81,7 @@ enum {
 
 /* Supported tags - add new ones to tag_name in bloblist.c */
 enum bloblist_tag_t {
-	BLOBLISTT_NONE = 0,
+	BLOBLISTT_VOID = 0,
 
 	/*
 	 * Standard area to allocate blobs used across firmware components, for
@@ -105,37 +105,26 @@ enum bloblist_tag_t {
 	BLOBLISTT_VBOOT_CTX = 0x106,	/* Chromium OS verified boot context */
 
 	/*
+	 * Tags from here are on reserved for private use within a single
+	 * firmware binary (i.e. a single executable or phase of a project).
+	 * These tags can be passed between binaries within a local
+	 * implementation, but cannot be used in upstream code. Allocate a
+	 * tag in one of the areas above if you want that.
+	 *
 	 * Project-specific tags are permitted here. Projects can be open source
 	 * or not, but the format of the data must be fuily documented in an
 	 * open source project, including all fields, bits, etc. Naming should
 	 * be: BLOBLISTT_<project>_<purpose_here>
-	 */
-	BLOBLISTT_PROJECT_AREA = 0x8000,
-	BLOBLISTT_U_BOOT_SPL_HANDOFF = 0x8000, /* Hand-off info from SPL */
-	BLOBLISTT_VBE		= 0x8001,	/* VBE per-phase state */
-	BLOBLISTT_U_BOOT_VIDEO = 0x8002, /* Video information from SPL */
-
-	/*
-	 * Vendor-specific tags are permitted here. Projects can be open source
+	 *
+	 * Vendor-specific tags are also permitted. Projects can be open source
 	 * or not, but the format of the data must be fuily documented in an
 	 * open source project, including all fields, bits, etc. Naming should
 	 * be BLOBLISTT_<vendor>_<purpose_here>
 	 */
-	BLOBLISTT_VENDOR_AREA = 0xc000,
-
-	/* Tags after this are not allocated for now */
-	BLOBLISTT_EXPANSION = 0x10000,
-
-	/*
-	 * Tags from here are on reserved for private use within a single
-	 * firmware binary (i.e. a single executable or phase of a project).
-	 * These tags can be passed between binaries within a local
-	 * implementation, but cannot be used in upstream code. Allocate a
-	 * tag in one of the areas above if you want that.
-	 *
-	 * This area may move in future.
-	 */
-	BLOBLISTT_PRIVATE_AREA = 0xffff0000,
+	BLOBLISTT_PRIVATE_AREA		= 0xfff000,
+	BLOBLISTT_U_BOOT_SPL_HANDOFF	= 0xfff000, /* Hand-off info from SPL */
+	BLOBLISTT_VBE			= 0xfff001, /* VBE per-phase state */
+	BLOBLISTT_U_BOOT_VIDEO		= 0xfff002, /* Video info from SPL */
 };
 
 /**
diff --git a/test/bloblist.c b/test/bloblist.c
index 720be7e244f..df9a99d7bd2 100644
--- a/test/bloblist.c
+++ b/test/bloblist.c
@@ -291,7 +291,7 @@ static int bloblist_test_cmd_list(struct unit_test_state *uts)
 	console_record_reset();
 	run_command("bloblist list", 0);
 	ut_assert_nextline("Address       Size   Tag Name");
-	ut_assert_nextline("%08lx  %8x  8000 SPL hand-off",
+	ut_assert_nextline("%08lx  %8x  fff000 SPL hand-off",
 			   (ulong)map_to_sysmem(data), TEST_SIZE);
 	ut_assert_nextline("%08lx  %8x   106 Chrome OS vboot context",
 			   (ulong)map_to_sysmem(data2), TEST_SIZE2);
-- 
2.41.0.487.g6d72f3e995-goog



More information about the U-Boot mailing list