diff options
| author | Raymond Mao <[email protected]> | 2025-02-19 16:02:20 -0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-02-19 18:49:36 -0600 |
| commit | 03a76b1a737fc9cf511aa7520999968ec3d2fd78 (patch) | |
| tree | 5830ed56ee2bfdab347108c90fe0144bb806a08c /common | |
| parent | 6799f09069f402a33c9cb202b71e144497bd9b7a (diff) | |
bloblist: kconfig for mandatory incoming standard passage
In previous commit, incoming standard passage is used by default
when initializing the bloblist, so explicitly BLOBLIST_PASSAGE is
no more needed.
Rename it as BLOBLIST_PASSAGE_MANDATORY to determine the behaviors
when an incoming transfer list does not exist or is invalid.
When it is selected, incoming standard passage is mandatory and
U-Boot will report an error when a valid incoming transfer list is
missing.
Signed-off-by: Raymond Mao <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/Kconfig | 14 | ||||
| -rw-r--r-- | common/bloblist.c | 7 |
2 files changed, 16 insertions, 5 deletions
diff --git a/common/Kconfig b/common/Kconfig index 7b2db46ef06..1d6de8badf7 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -1066,11 +1066,15 @@ config BLOBLIST_ALLOC specify a fixed address on systems where this is unknown or can change at runtime. -config BLOBLIST_PASSAGE - bool "Use bloblist in-place" +config BLOBLIST_PASSAGE_MANDATORY + bool "Use bloblist in-place mandatorily" help - Use a bloblist in the incoming standard passage. The size is detected - automatically so CONFIG_BLOBLIST_SIZE can be 0. + By default U-Boot will use a bloblist in the incoming standard passage. + This option controls whether U-Boot tries to load a static bloblist or + allocate one if a valid incoming bloblist does not exist. + Select this option to mark incoming standard passage as mandatory and + U-Boot will report an error when a valid incoming bloblist does not + exist. endchoice @@ -1086,7 +1090,7 @@ config BLOBLIST_ADDR config BLOBLIST_SIZE hex "Size of bloblist" - default 0x0 if BLOBLIST_PASSAGE + default 0x0 if BLOBLIST_PASSAGE_MANDATORY default 0x400 help Sets the size of the bloblist in bytes. This must include all diff --git a/common/bloblist.c b/common/bloblist.c index be05f8082ff..fb0e5af5f3a 100644 --- a/common/bloblist.c +++ b/common/bloblist.c @@ -513,6 +513,13 @@ int bloblist_init(void) */ bool from_addr = fixed && !xpl_is_first_phase(); + /* + * If Firmware Handoff is mandatory but no transfer list is + * observed, report it as an error. + */ + if (IS_ENABLED(CONFIG_BLOBLIST_PASSAGE_MANDATORY)) + return -ENOENT; + ret = -ENOENT; if (xpl_prev_phase() == PHASE_TPL && |
