[PATCH 00/14] bloblist: Align to firmware handoff

Michal Simek michal.simek at amd.com
Mon Oct 30 08:53:17 CET 2023



On 10/28/23 07:35, Simon Glass wrote:
> Hi Michal,
> 
> On Wed, 6 Sept 2023 at 12:22, Michal Simek <monstr at monstr.eu> wrote:
>>
>> Hi Simon,
>>
>> út 25. 7. 2023 v 23:36 odesílatel Simon Glass <sjg at chromium.org> napsal:
>>>
>>> In moving from v0.8 to v0.9 the Firmware Handoff specification made some
>>> changes, including:
>>>
>>>     - Use a packed format for headers to reduce space
>>>     - Add an explicit alignment field in the header
>>>     - Renumber all the tags and reduce their size to 24 bits
>>>     - Drop use of the blob header to specify alignment, in favour of a
>>>       'void' blob type
>>>
>>> This series attempts to align to that specification, including updating
>>> the API and tests. It is likely that refinements will be made as other
>>> projects implement the spec too.
>>>
>>> As before the code is dual-licensed, to permit use in projects with a
>>> permissive license.
>>>
>>>
>>> Simon Glass (14):
>>>    bloblist: Update the tag numbering
>>>    bloblist: Adjust API to align in powers of 2
>>>    bloblist: Change the magic value
>>>    bloblist: Set version to 1
>>>    bloblist: Access record hdr_size and tag via a function
>>>    bloblist: Drop the flags value
>>>    bloblist: Drop the spare values
>>>    bloblist: Change the checksum algorithm
>>>    bloblist: Checksum the entire bloblist
>>>    bloblist: Handle alignment with a void entry
>>>    bloblist: Reduce blob-header size
>>>    bloblist: Reduce bloblist header size
>>>    bloblist: Add alignment to bloblist_new()
>>>    bloblist: Update documentation and header comment
>>>
>>>   arch/x86/lib/tables.c    |   3 +-
>>>   common/bloblist.c        | 102 ++++++++++++++++++++-------------
>>>   doc/develop/bloblist.rst |   4 +-
>>>   include/bloblist.h       | 121 +++++++++++++++++++--------------------
>>>   test/bloblist.c          |  53 +++++++++--------
>>>   5 files changed, 152 insertions(+), 131 deletions(-)
>>>
>>> --
>>> 2.41.0.487.g6d72f3e995-goog
>>>
>>
>> Would it be also possible to align names in the bloblist_hdr structure?
>> magic->signature
>> align_log2->alignment
>> alloced->size
>> size->max_size
>>
>> The same is for bloblist_rec.
> 
> OK. I am not sure I like the size/max_size thing so I filed an issue for that.

Fine for me. At the end they should match with spec. Update in spec is fine.

>>
>> I don't know the history but spec is about transfer list and transfer entry.
>> Do you plan to rename it to avoid confusion?
> 
> I don't really like transfer_list_xxx as an API. It is too
> long-winded. We used that name since it is unique and descriptive as
> to its purpose. But I think that 'bloblist' is a better name in the
> code base. Perhaps we could use xferlist instead of bloblist?

xferlist sounds good to me.

M


More information about the U-Boot mailing list