[PATCH 00/35] global_data: Reduce size of struct global_data
Tom Rini
trini at konsulko.com
Thu Jul 25 01:07:53 CEST 2024
On Wed, Jul 24, 2024 at 09:08:47AM -0600, Simon Glass wrote:
> The global data structure has grown quite a lot over the years, being
> the best place to put an important pointer or something that must be
> accessed before and after relocation.
>
> This series attempts to reduce the size a little, by moving some things
> out and shrinking and aligning some fields.
>
> Some fields are needed during init but not afterwards. To deal with this
> a new 'boardf' structure is created, which sits on the stack and is only
> present during board_init_f(). It is possible that more fields could
> move to this struct, but for now only 4 are moved.
>
> An assumption is made that an int is 32-bits wide on all architectures,
> which seems to be true, but maintainers should be able to confirm.
>
> Mostly the code-size impact is neutral, but the patch
> 'Use less space for environment fields' does increase U-Boot's size by
> about 30 bytes on aarch64.
>
> For firefly-rk3399 (64-bit) the size of global reduces from 456 to 368
> bytes. For SPL it reduces from 416 to 272 bytes.
>
> There are other things which could be attempted, for example:
> - Using hlist instead of list for some lists
> - Checking that only necessary fields are present in SPL
This is good, thanks for doing this. I'm planning to grab this in to
-next once I open it.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240724/aeb76c2b/attachment.sig>
More information about the U-Boot
mailing list