From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 06/21] Add bloblist documentation
Date: Thu, 15 Nov 2018 18:43:54 -0700 [thread overview]
Message-ID: <20181116014409.147279-7-sjg@chromium.org> (raw)
In-Reply-To: <20181116014409.147279-1-sjg@chromium.org>
Add a description of the purpose of bloblist and how to use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3: None
Changes in v2: None
doc/README.bloblist | 82 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 82 insertions(+)
create mode 100644 doc/README.bloblist
diff --git a/doc/README.bloblist b/doc/README.bloblist
new file mode 100644
index 00000000000..b0e787b97db
--- /dev/null
+++ b/doc/README.bloblist
@@ -0,0 +1,82 @@
+# SPDX-License-Identifier: GPL-2.0+
+
+Blob Lists - bloblist
+=====================
+
+Introduction
+------------
+
+A bloblist provides a way to store collections of binary information (blobs) in
+a central structure. Each record of information is assigned a tag so that its
+owner can find it and update it. Each record is generally described by a C
+structure defined by the code that owns it.
+
+
+Passing state through the boot process
+--------------------------------------
+
+The bloblist is created when the first U-Boot component runs (often SPL,
+sometimes TPL). It is passed through to each successive part of the boot and
+can be accessed as needed. This provides a way to transfer state from one part
+to the next. For example, TPL may determine that a watchdog reset occurred by
+reading an SoC register. Reading the register may reset the value, so that it
+cannot be read a second time. So TPL can store that in a bloblist record which
+can be passed through to SPL and U-Boot proper, which can print a message
+indicating that something went wrong and the watchdog fired.
+
+
+Blobs
+-----
+
+While each blob in the bloblist can be of any length, bloblists are designed to
+hold small amounts of data, typically a few KB at most. It is not possible to
+change the length of a blob once it has been written. Each blob is normally
+created from a C structure which can beused to access its fields.
+
+
+Blob tags
+---------
+
+Each blob has a tag which is a 32-bit number. This uniquely identifies the
+owner of the blob. Blob tags are listed in enum blob_tag_t and are named
+with a BLOBT_ prefix.
+
+
+Single structure
+----------------
+
+There is normally only one bloblist in U-Boot. Since a bloblist can store
+multiple blobs it does not seem useful to allow multiple bloblists. Of course
+there could be reasons for this, such as needing to spread the blobs around in
+different memory areas due to fragmented memory, but it is simpler to just have
+a single bloblist.
+
+
+API
+---
+
+Bloblist provides a fairly simple API which allows blobs to be created and
+found. All access is via the blob's tag.
+
+
+Finishing the bloblist
+----------------------
+
+When a part of U-Boot is about to jump to the next part, it can 'finish' the
+bloblist in preparation for the next stage. This involves adding a checksum so
+that the next stage can make sure that the data arrived safely. While the
+bloblist is in use, changes can be made which will affect the checksum, so it
+is easier to calculate the checksum at the end after all changes are made.
+
+
+Future work
+-----------
+
+Bootstage has a mechanism to 'stash' its records for passing to the next part.
+This should move to using bloblist, to avoid having its own mechanism for
+passing information between U-Boot parts.
+
+
+Simon Glass
+sjg at chromium.org
+12-Aug-2018
--
2.19.1.1215.g8438c0b245-goog
next prev parent reply other threads:[~2018-11-16 1:43 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 1:43 [U-Boot] [PATCH v3 00/21] spl: Add features for passing info from SPL to U-Boot proper Simon Glass
2018-11-16 1:43 ` [U-Boot] [PATCH v3 01/21] spl: Add support for logging in SPL and TPL Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 02/21] Add core support for a bloblist to convey data from SPL Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 03/21] spl: Set up the bloblist in SPL Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot,v3,03/21] " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 04/21] bloblist: Locate bloblist in U-Boot Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot,v3,04/21] " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 05/21] test: Add a simple test for bloblist Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` Simon Glass [this message]
2018-11-26 18:43 ` [U-Boot] [U-Boot,v3,06/21] Add bloblist documentation Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 07/21] spl: Support hash, input, pch, pci, rtc, tpm in SPL Simon Glass
2018-11-26 18:43 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 08/21] spl: Add a define for SPL_TPL_PROMPT Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 09/21] spl: Make SPL_DISABLE_BANNER_PRINT a positive option Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 10/21] spl: Add a comment to spl_set_bd() Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot,v3,10/21] " Tom Rini
2018-11-16 1:43 ` [U-Boot] [PATCH v3 11/21] sandbox: Add a memory map to the sandbox README Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 12/21] test/py: Add a way to pass flags to sandbox Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 13/21] sandbox: Add an option to display of-platdata in SPL Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 14/21] sandbox: Drop the deprecated 'sb' command Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 15/21] sandbox: Add a new " Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot,v3,15/21] " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 16/21] sandbox: Allow puts() output before global_data is set up Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 17/21] sandbox: Refactor code to create os_jump_to_file() Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 18/21] sandbox: Use malloc() and free() from os layer Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 19/21] sandbox: Filter arguments when starting U-Boot Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 20/21] sandbox: Boot in U-Boot through the standard call Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-16 1:44 ` [U-Boot] [PATCH v3 21/21] spl: Add support for passing handoff info to U-Boot proper Simon Glass
2018-11-26 18:44 ` [U-Boot] [U-Boot, v3, " Tom Rini
2018-11-27 0:08 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181116014409.147279-7-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox