summaryrefslogtreecommitdiff
path: root/include/env_internal.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-08-26 14:06:16 -0600
committerTom Rini <trini@konsulko.com>2024-08-26 14:06:16 -0600
commit02d587a447ccae12618abbfb2b8ddd88ac3c7648 (patch)
tree23acd3b2a0e077ab3a4f8924d132a137ea01ad20 /include/env_internal.h
parent7670200d4b7bbb572290d0fb2ed9cd0fb1f989cc (diff)
parentcafaa1a17f765e684e3a5b52448d495c0e1da83d (diff)
Merge patch series "global_data: Reduce size of struct global_data"
Simon Glass <sjg@chromium.org> says: 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
Diffstat (limited to 'include/env_internal.h')
-rw-r--r--include/env_internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/env_internal.h b/include/env_internal.h
index 0a267e35592..c1c0727e4d0 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -100,6 +100,7 @@ extern const char default_environment[];
#include <env_flags.h>
#include <search.h>
+/* this is stored as bits in gd->env_has_init so is limited to 16 entries */
enum env_location {
ENVL_UNKNOWN,
ENVL_EEPROM,