aboutsummaryrefslogtreecommitdiffstats
path: root/include/bloblist.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-12 19:26:19 -0700
committerSimon Glass <sjg@chromium.org>2022-01-13 09:13:41 -0700
commitf16ec77784b4a2ffdba82bc4044581131aea44e4 (patch)
tree7bbf6a2e323f2684e74b2d54bfb1a679a45a758a /include/bloblist.h
parentf9abc1cac1130279b486c51056b2e6fba99633b1 (diff)
downloadu-boot-f16ec77784b4a2ffdba82bc4044581131aea44e4.tar.gz
bloblist: Use explicit numbering for the tags
At present if someone adds a tag in the middle of the list it works well enough within a U-Boot build. But if these tags are used in another project, or with an older version of SPL, the numbers make become inconsistent. Use explicit tag numbers that never change, to resolve this problem. Allocate areas for existing U-Boot tags and set up an area for use by projects and vendors, as well as for private use. Keep tags above 0x10000 unallocated for now. Update bloblist_tag_name() and the tests to work with this new setup. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bloblist.h')
-rw-r--r--include/bloblist.h58
1 files changed, 47 insertions, 11 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index fac25907c07..5de4545160e 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -25,21 +25,57 @@ enum {
enum bloblist_tag_t {
BLOBLISTT_NONE = 0,
- /* Vendor-specific tags are permitted here */
- BLOBLISTT_U_BOOT_SPL_HANDOFF, /* Hand-off info from SPL */
- BLOBLISTT_VBOOT_CTX, /* Chromium OS verified boot context */
+ /*
+ * Standard area to allocate blobs used across firmware components, for
+ * things that are very commonly used, particularly in multiple
+ * projects.
+ */
+ BLOBLISTT_AREA_FIRMWARE_TOP = 0x1,
+
+ /* Standard area to allocate blobs used across firmware components */
+ BLOBLISTT_AREA_FIRMWARE = 0x100,
/*
* Advanced Configuration and Power Interface Global Non-Volatile
* Sleeping table. This forms part of the ACPI tables passed to Linux.
*/
- BLOBLISTT_ACPI_GNVS,
- BLOBLISTT_INTEL_VBT, /* Intel Video-BIOS table */
- BLOBLISTT_TPM2_TCG_LOG, /* TPM v2 log space */
- BLOBLISTT_TCPA_LOG, /* TPM log space */
- BLOBLISTT_ACPI_TABLES, /* ACPI tables for x86 */
- BLOBLISTT_SMBIOS_TABLES, /* SMBIOS tables for x86 */
-
- BLOBLISTT_COUNT
+ BLOBLISTT_ACPI_GNVS = 0x100,
+ BLOBLISTT_INTEL_VBT = 0x101, /* Intel Video-BIOS table */
+ BLOBLISTT_TPM2_TCG_LOG = 0x102, /* TPM v2 log space */
+ BLOBLISTT_TCPA_LOG = 0x103, /* TPM log space */
+ BLOBLISTT_ACPI_TABLES = 0x104, /* ACPI tables for x86 */
+ BLOBLISTT_SMBIOS_TABLES = 0x105, /* SMBIOS tables for x86 */
+ BLOBLISTT_VBOOT_CTX = 0x106, /* Chromium OS verified boot context */
+
+ /*
+ * 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 */
+
+ /*
+ * Vendor-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_<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,
};
/**