bloblist: Support allocating the bloblist

Typically the bloblist is positioned at a fixed address in memory until
relocation. This is convenient when it is set up in SPL or before
relocation.

But for EFI we want to set it up only when U-Boot proper is running. Add
a way to allocate it using malloc() and update the documentation to cover
this aspect of bloblist.

Note there are no tests of this feature at present, nor any direct testing
of bloblist_init().

This can be added, e.g. by making this option controllable at runtime.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2021-11-03 21:09:20 -06:00
parent e2f0474b05
commit d5b6e91ba2
4 changed files with 50 additions and 5 deletions

View file

@ -59,6 +59,22 @@ Bloblist provides a fairly simple API which allows blobs to be created and
found. All access is via the blob's tag. Blob records are zeroed when added.
Placing the bloblist
--------------------
The bloblist is typically positioned at a fixed address by TPL, or SPL. This
is controlled by `CONFIG_BLOBLIST_ADDR`. But in some cases it is preferable to
allocate the bloblist in the malloc() space. Use the `CONFIG_BLOBLIST_ALLOC`
option to enable this.
The bloblist is automatically relocated as part of U-Boot relocation. Sometimes
it is useful to expand the bloblist in U-Boot proper, since it may want to add
information for use by Linux. Note that this does not mean that Linux needs to
know anything about the bloblist format, just that it is convenient to use
bloblist to place things contiguously in memory. Set
`CONFIG_BLOBLIST_SIZE_RELOC` to define the expanded size, if needed.
Finishing the bloblist
----------------------