U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mattijs Korpershoek <mkorpershoek@kernel.org>
To: Simon Glass <sjg@chromium.org>, u-boot@lists.denx.de
Cc: Tom Rini <trini@konsulko.com>,
	Peter Robinson <pbrobinson@gmail.com>,
	Simon Glass <sjg@chromium.org>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Andrew Goodbody <andrew.goodbody@linaro.org>,
	Guillaume La Roque <glaroque@baylibre.com>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Martyn Welch <martyn.welch@collabora.com>,
	Mattijs Korpershoek <mkorpershoek@kernel.org>,
	Maximilian Brune <maximilian.brune@9elements.com>,
	Moritz Fischer <moritzf@google.com>,
	Sam Protsenko <semen.protsenko@linaro.org>
Subject: Re: [PATCH v4 1/4] boot: Improve comments related to global bootmeths
Date: Thu, 09 Oct 2025 14:52:59 +0200	[thread overview]
Message-ID: <87347sw82c.fsf@kernel.org> (raw)
In-Reply-To: <20251009092959.260121-2-sjg@chromium.org>

Hi Simon,

Thank you for the patch.

On Thu, Oct 09, 2025 at 03:29, Simon Glass <sjg@chromium.org> wrote:

> Add a few comments about global bootmeths and first_glob_method
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>

> ---
>
> (no changes since v3)
>
> Changes in v3:
> - Drop the spacing changes
>
>  boot/bootflow.c        | 1 +
>  boot/bootmeth-uclass.c | 1 +
>  include/bootflow.h     | 3 ++-
>  test/boot/bootflow.c   | 2 +-
>  4 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/boot/bootflow.c b/boot/bootflow.c
> index d79f303486d..15df7069209 100644
> --- a/boot/bootflow.c
> +++ b/boot/bootflow.c
> @@ -344,6 +344,7 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow)
>  	struct udevice *dev;
>  	int ret;
>  
> +	/* handle global bootmeths if needed */
>  	if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) && iter->doing_global) {
>  		bootflow_iter_set_dev(iter, NULL, 0);
>  		ret = bootmeth_get_bootflow(iter->method, bflow);
> diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c
> index 188f6ea1895..bb2dd8447cf 100644
> --- a/boot/bootmeth-uclass.c
> +++ b/boot/bootmeth-uclass.c
> @@ -204,6 +204,7 @@ int bootmeth_setup_iter_order(struct bootflow_iter *iter, bool include_global)
>  		goto err_order;
>  	}
>  
> +	/* start with the global bootmeths */
>  	if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL) && include_global &&
>  	    iter->first_glob_method != -1 && iter->first_glob_method != count) {
>  		iter->cur_method = iter->first_glob_method;
> diff --git a/include/bootflow.h b/include/bootflow.h
> index 32422067723..2ef6eb25cf5 100644
> --- a/include/bootflow.h
> +++ b/include/bootflow.h
> @@ -250,7 +250,8 @@ enum bootflow_meth_flags_t {
>   * @cur_label: Current label being processed
>   * @num_methods: Number of bootmeth devices in @method_order
>   * @cur_method: Current method number, an index into @method_order
> - * @first_glob_method: First global method, if any, else -1
> + * @first_glob_method: Index of first global method within @method_order[], if
> + * any, else -1
>   * @cur_prio: Current priority being scanned
>   * @method_order: List of bootmeth devices to use, in order. The normal methods
>   *	appear first, then the global ones, if any
> diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
> index 8de5a310add..7cd83dc7443 100644
> --- a/test/boot/bootflow.c
> +++ b/test/boot/bootflow.c
> @@ -401,7 +401,7 @@ static int bootflow_system(struct unit_test_state *uts)
>  	ut_assertok(device_probe(dev));
>  	sandbox_set_fake_efi_mgr_dev(dev, true);
>  
> -	/* We should get a single 'bootmgr' method right at the end */
> +	/* We should get a single 'bootmgr' method at the start */
>  	bootstd_clear_glob();
>  	ut_assertok(run_command("bootflow scan -lH", 0));
>  	ut_assert_skip_to_line(
> -- 
> 2.43.0

  reply	other threads:[~2025-10-09 12:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09  9:29 [PATCH v4 0/4] boot: Precursor series for global bootmeths Simon Glass
2025-10-09  9:29 ` [PATCH v4 1/4] boot: Improve comments related to " Simon Glass
2025-10-09 12:52   ` Mattijs Korpershoek [this message]
2025-10-09 18:34   ` Sam Protsenko
2025-10-09  9:29 ` [PATCH v4 2/4] boot: Move obtaining the label into a common file Simon Glass
2025-10-09 13:13   ` Mattijs Korpershoek
2025-10-09 17:24   ` Tom Rini
2025-10-10 10:35     ` Simon Glass
2025-10-10 14:11       ` Mattijs Korpershoek
2025-10-10 14:39         ` Tom Rini
2025-10-11  7:21           ` Simon Glass
2025-10-11 16:24             ` Tom Rini
2025-10-09  9:29 ` [PATCH v4 3/4] boot: Add more debugging to iter_incr() Simon Glass
2025-10-09 17:30   ` Tom Rini
2025-10-10 10:36     ` Simon Glass
2025-10-10 14:35       ` Tom Rini
2025-10-11  7:19         ` Simon Glass
2025-10-13 14:15           ` Tom Rini
2025-10-13 15:12             ` Simon Glass
2025-10-13 16:57               ` Tom Rini
2025-10-09  9:29 ` [PATCH v4 4/4] boot: Move preparing bootdev into a function Simon Glass
2025-10-09 17:35   ` Tom Rini
2025-10-10 10:36     ` Simon Glass
2025-10-10 14:38       ` Tom Rini
2025-10-11  7:20         ` Simon Glass
2025-10-11 16:45           ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87347sw82c.fsf@kernel.org \
    --to=mkorpershoek@kernel.org \
    --cc=andrew.goodbody@linaro.org \
    --cc=glaroque@baylibre.com \
    --cc=jerome.forissier@linaro.org \
    --cc=martyn.welch@collabora.com \
    --cc=maximilian.brune@9elements.com \
    --cc=moritzf@google.com \
    --cc=pbrobinson@gmail.com \
    --cc=semen.protsenko@linaro.org \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox