u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
To: Simon Glass <sjg@chromium.org>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Michal Simek <michal.simek@amd.com>,
	Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH] fdt_support: add optional board_rng_seed() hook
Date: Tue, 23 Aug 2022 16:06:36 +0200	[thread overview]
Message-ID: <4557fbd0-812c-27eb-78b3-b8fc6a1201a8@prevas.dk> (raw)
In-Reply-To: <CAPnjgZ3MiaLb5=czeah4AnOSvSCfTAjT4zYJ39MPx1Q_uguFag@mail.gmail.com>

On 23/08/2022 15.38, Simon Glass wrote:

>> +/**
>> + * board_rng_seed() - Provide a seed to be passed via /chosen/rng-seed
>> + *
>> + * This function is called if CONFIG_BOARD_RNG_SEED is set, and must
>> + * be provided by the board. It should return, via @buf, some suitable
>> + * seed value to pass to the kernel.
>> + *
>> + * @param buf         A struct abuf for returning the seed and its size.
>> + * @return            0 if ok, negative on error.
>> + */
>> +int board_rng_seed(struct abuf *buf);
> 
> Instead of yet another hook, can we use EVT_FT_FIXUP? An even better
> option might be to use EVT_FT_FIXUP and then call a UCLASS_BOARD
> method to obtain the information.

I didn't know there was anything called EVT_FT_FIXUP, and from grepping,
it seems suffer the same problem as ft_board_setup() as I mention,
namely running after the command line (aka /chosen/bootargs) has been
set up.

Also, I can't see how it can actually affect the blob being passed to
the kernel, doesn't

                fixup.tree = oftree_default();
                ret = event_notify(EVT_FT_FIXUP, &fixup, sizeof(fixup));

mean that fixup.tree points at U-Boot's control fdt rather than the blob
that will be passed as the kernel's fdt? That seems wrong.

Rasmus

  reply	other threads:[~2022-08-23 14:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22  7:34 [PATCH] fdt_support: add optional board_rng_seed() hook Rasmus Villemoes
2022-08-23 13:38 ` Simon Glass
2022-08-23 14:06   ` Rasmus Villemoes [this message]
2022-08-23 14:35     ` Simon Glass
2022-08-24  6:57       ` Rasmus Villemoes
2022-08-25  1:25         ` Simon Glass
2022-08-28  1:52           ` Simon Glass
2022-09-01 23:52             ` Simon Glass
2022-09-02  7:00               ` Rasmus Villemoes
2022-09-02 19:59                 ` Simon Glass
2022-09-05 13:03                   ` Rasmus Villemoes
2022-09-12 16:48                   ` Simon Glass

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=4557fbd0-812c-27eb-78b3-b8fc6a1201a8@prevas.dk \
    --to=rasmus.villemoes@prevas.dk \
    --cc=michal.simek@amd.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.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;
as well as URLs for NNTP newsgroup(s).