]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
bloblist: kconfig for mandatory incoming standard passage
authorRaymond Mao <raymond.mao@linaro.org>
Thu, 20 Feb 2025 00:02:20 +0000 (16:02 -0800)
committerTom Rini <trini@konsulko.com>
Thu, 20 Feb 2025 00:49:36 +0000 (18:49 -0600)
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 <raymond.mao@linaro.org>
common/Kconfig
common/bloblist.c
configs/vexpress_fvp_bloblist_defconfig
doc/board/armltd/vexpress64.rst
include/bloblist.h

index 7b2db46ef064f029e918dd4c0df23b653336d572..1d6de8badf754ab6705d7c9b0d113518b2adde10 100644 (file)
@@ -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
index be05f8082ff9c30ccefa8edc2ae73f71f85cad9c..fb0e5af5f3aa807526024222b4a3df716bc27779 100644 (file)
@@ -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 &&
index dcc87db8723dd0273d5bedc0dbb87d4e00f53ee7..4d52b96202b2a007ef43bba6ef9b84c22a60d55b 100644 (file)
@@ -1,5 +1,5 @@
 #include <configs/vexpress_fvp_defconfig>
 
 CONFIG_BLOBLIST=y
-CONFIG_BLOBLIST_PASSAGE=y
+CONFIG_BLOBLIST_PASSAGE_MANDATORY=y
 CONFIG_BLOBLIST_SIZE_RELOC=0x10000
index 4dadadb53dc0a2b86fe50a40aef82910d1f81e85..a732fac899d015263ad2bac9c16da5bdabdf1a1d 100644 (file)
@@ -53,8 +53,8 @@ predefined bloblist at a specified address, dynamically allocating memory for a
 bloblist, or utilizing a standard passage-provided bloblist with automatic size
 detection.
 
-By default, ``vexpress_fvp_bloblist_defconfig`` uses the standard passage method
-(CONFIG_BLOBLIST_PASSAGE) because TF-A provides a Transfer List in non-secure
+By default, ``vexpress_fvp_bloblist_defconfig`` uses the standard passage method mandatorily
+(CONFIG_BLOBLIST_PASSAGE_MANDATORY) because TF-A provides a Transfer List in non-secure
 memory that U-Boot can utilise. This Bloblist, which is referred to as a Transfer List in
 TF-A, contains all necessary data for the handoff process, including DT and ACPI
 tables.
index ff9d55490529e4b209e7ee19909b051ca759518c..414fb9b6e4023d863e62679d96461c58d84d7c5d 100644 (file)
@@ -449,9 +449,8 @@ int bloblist_reloc(void *to, uint to_size);
  * If CONFIG_BLOBLIST_ALLOC is selected, it allocates memory for a bloblist of
  * size CONFIG_BLOBLIST_SIZE.
  *
- * If CONFIG_BLOBLIST_PASSAGE is selected, it uses the bloblist in the incoming
- * standard passage. The size is detected automatically so CONFIG_BLOBLIST_SIZE
- * can be 0.
+ * If CONFIG_BLOBLIST_PASSAGE_MANDATORY is selected, bloblist in the incoming
+ * standard passage is mandatorily required.
  *
  * Sets GD_FLG_BLOBLIST_READY in global_data flags on success
  *