aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass2020-09-19 18:49:26 -0600
committerSimon Glass2020-10-06 09:07:54 -0600
commit4aed22762303755f8f26d14f0ad2608d63550e72 (patch)
tree8dd4859918fb4b6a1311cbf9ddb722505dfdb23b /include
parent9c22adb8f979ce1386b600a13f5abc37ec92d696 (diff)
bloblist: Add a command
It is helpful to be able to see basic statistics about the bloblist and also to list its contents. Add a 'bloblist' command to handle this. Put the display functions in the bloblist modules rather than in the command code itself. That allows showing a list from SPL, where commands are not available. Also make bloblist_first/next_blob() static as they are not used outside this file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/bloblist.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index 5784c2226e7..6c37cd2a639 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -19,6 +19,7 @@ enum {
BLOBLIST_ALIGN = 16,
};
+/* Supported tags - add new ones to tag_name in bloblist.c */
enum bloblist_tag_t {
BLOBLISTT_NONE = 0,
@@ -35,6 +36,8 @@ enum bloblist_tag_t {
BLOBLISTT_INTEL_VBT, /* Intel Video-BIOS table */
BLOBLISTT_TPM2_TCG_LOG, /* TPM v2 log space */
BLOBLISTT_TCPA_LOG, /* TPM log space */
+
+ BLOBLISTT_COUNT
};
/**
@@ -207,6 +210,35 @@ int bloblist_check(ulong addr, uint size);
int bloblist_finish(void);
/**
+ * bloblist_get_stats() - Get information about the bloblist
+ *
+ * This returns useful information about the bloblist
+ */
+void bloblist_get_stats(ulong *basep, ulong *sizep, ulong *allocedp);
+
+/**
+ * bloblist_show_stats() - Show information about the bloblist
+ *
+ * This shows useful information about the bloblist on the console
+ */
+void bloblist_show_stats(void);
+
+/**
+ * bloblist_show_list() - Show a list of blobs in the bloblist
+ *
+ * This shows a list of blobs, showing their address, size and tag.
+ */
+void bloblist_show_list(void);
+
+/**
+ * bloblist_tag_name() - Get the name for a tag
+ *
+ * @tag: Tag to check
+ * @return name of tag, or "invalid" if an invalid tag is provided
+ */
+const char *bloblist_tag_name(enum bloblist_tag_t tag);
+
+/**
* bloblist_init() - Init the bloblist system with a single bloblist
*
* This uses CONFIG_BLOBLIST_ADDR and CONFIG_BLOBLIST_SIZE to set up a bloblist