On Thu, 20 Mar 2025, at 00:14, BALATON Zoltan wrote:
> On Wed, 19 Mar 2025, Michael Tokarev wrote:
> > Hi!
> >
> > Commit fc8c745d50150a63f6c "spapr: Implement Open Firmware client interface"
> > in Jun-2021 added a new file, pc-bios/vof-nvram.bin, to qemu sources.
> >
> > But there's nothing in the sources which refers to this file, and there's
> > no mentions about its contents and how it has been generated.
> >
> > What's the procedure to create this image? It would be great if such
> > procedure can be run during package build time to generate this image anew.
> >
> > How it is supposed to be used?
>
> See hw/ppc/spapr.c::spapr_create_nvram(). Looks like it would add a drive
> give with -drive if=pflash,index=0 as the nvram backing file. I don't know
> if it generates the default if an empty file is passed or maybe SLOF would
> do that which then could be used for VOF too and that's how it was made?
> So you could try running -machine spapr with an empty nvram with slof then
> compare that to the default for VOF.
I booted with SLOF and -drive if=pflash,index=0 and let SLOF initialize it, and
then use the result with VOF.
> > Should it be shipped in a downstream distribution?
>
> If is't not auto-created with the default values and not easy to create
> then maybe more convenient for users to get an example.
At the time I wanted to keep hw/ppc/spapr_vof.c and pc-bios/vof.bin as small as
possible so avoided formatting. And a VM would still work even without this
pc-bios/vof-nvram.bin (but it would annoyingly complain), hence the image.
http://wiki.raptorcs.com/w/images/c/c5/LoPAPR_DRAFT_v11_24March2016_cmt1.pdf
chapter 8 "Non-Volatile Memory" has the format if anyone feels bored :)
Thanks,
>
> Regards,
> BALATON Zoltan
>