summaryrefslogtreecommitdiff
path: root/include/bloblist.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/bloblist.h')
-rw-r--r--include/bloblist.h34
1 files changed, 33 insertions, 1 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index f32faf78560..e67b2a76358 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -73,6 +73,7 @@
#define __BLOBLIST_H
#include <mapmem.h>
+#include <linux/errno.h>
enum {
BLOBLIST_VERSION = 1,
@@ -110,7 +111,8 @@ enum bloblist_tag_t {
BLOBLISTT_ACPI_TABLES = 4,
BLOBLISTT_TPM_EVLOG = 5,
BLOBLISTT_TPM_CRB_BASE = 6,
- BLOBLISTT_ACPI_PP = 7,
+ BLOBLISTT_FDT_OVERLAY = 7,
+ BLOBLISTT_ACPI_PP = 8,
/* Standard area to allocate blobs used across firmware components */
BLOBLISTT_AREA_FIRMWARE = 0x10,
@@ -231,6 +233,16 @@ enum {
BLOBLIST_REC_HDR_SIZE = sizeof(struct bloblist_rec),
};
+/*
+ * struct dto_blob_hdr - Blob inline header for BLOBLISTT_FDT_OVERLAY
+ *
+ * @subtype: IMP-DEF per the agreement between the DT overlay producer and
+ * consumer. Default value is 0.
+ */
+struct dto_blob_hdr {
+ u64 subtype;
+};
+
/**
* bloblist_check_magic() - return a bloblist if the magic matches
*
@@ -268,6 +280,26 @@ static inline void *bloblist_get_blob(uint tag, int *sizep)
}
#endif
+#if CONFIG_IS_ENABLED(BLOBLIST)
+/**
+ * bloblist_apply_blobs() - Apply the data of blobs by tag
+ *
+ * Scan the bloblist, find the blobs with the matching tag and apply the data
+ * of blobs
+ *
+ * @tag: Tag to search for (enum bloblist_tag_t)
+ * @func: Function to apply the data of blobs
+ * Return: 0 if OK, otherwise error.
+ */
+int bloblist_apply_blobs(uint tag, int (*func)(void **data, int size));
+#else
+static inline int bloblist_apply_blobs(uint tag,
+ int (*func)(void **data, int size))
+{
+ return -EPERM;
+}
+#endif
+
/**
* bloblist_find() - Find a blob
*