On Tue, Oct 4, 2022 at 12:53 PM Peter Maydell <peter.maydell@xxxxxxxxxx> wrote: > > On Tue, 4 Oct 2022 at 11:40, Jason A. Donenfeld <Jason@xxxxxxxxx> wrote: > > > > And just to give you some idea that this truly is possible from firmware > > and I'm not just making it up, consider this patch to U-Boot: > > > > u-boot: > > diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c > > index cab8da4860..27f3ee68c0 100644 > > --- a/arch/mips/lib/bootm.c > > +++ b/arch/mips/lib/bootm.c > > @@ -211,6 +211,8 @@ static void linux_env_legacy(bootm_headers_t *images) > > sprintf(env_buf, "%un8r", gd->baudrate); > > linux_env_set("modetty0", env_buf); > > } > > + > > + linux_env_set("rngseed", "4142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f60"); > > } > > > > > > > So, as you can see, it works perfectly. Thus, setting this in QEMU > > follows *exactly* *the* *same* *pattern* as every other architecture > > that allows for this kind of mechanism. There's nothing weird or unusual > > or out of place happening here. > > I think the unusual thing here is that this patch isn't > "this facility is implemented by u-boot [commit whatever, > docs whatever], and here is the patch adding it to QEMU's > handling of the same interface". That is, for boards like > Malta the general expectation is that we're emulating > a piece of real hardware and the firmware/bootloader > that it would be running, so "this is a patch that > implements an interface that the real bootloader doesn't > have" is a bit odd. Except it's not different from other platforms that get bootloader seeds as such. A bootloader can easily pass this; QEMU most certainly should pass this. (I sincerely hope you're not arguing in favor of holding back progress in this area for yet another decade.) Jason