qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* vof-nvram.bin: what it is and how it is used?
@ 2025-03-19 10:26 Michael Tokarev
  2025-03-19 13:14 ` BALATON Zoltan
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2025-03-19 10:26 UTC (permalink / raw)
  To: qemu-devel, qemu-PowerPC, Alexey Kardashevskiy

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?

Should it be shipped in a downstream distribution?

Thanks,

/mjt


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vof-nvram.bin: what it is and how it is used?
  2025-03-19 10:26 vof-nvram.bin: what it is and how it is used? Michael Tokarev
@ 2025-03-19 13:14 ` BALATON Zoltan
  2025-03-21  5:42   ` Alexey Kardashevskiy
  0 siblings, 1 reply; 3+ messages in thread
From: BALATON Zoltan @ 2025-03-19 13:14 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: qemu-devel, qemu-PowerPC, Alexey Kardashevskiy

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.

> 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.

Regards,
BALATON Zoltan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: vof-nvram.bin: what it is and how it is used?
  2025-03-19 13:14 ` BALATON Zoltan
@ 2025-03-21  5:42   ` Alexey Kardashevskiy
  0 siblings, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2025-03-21  5:42 UTC (permalink / raw)
  To: BALATON Zoltan, Michael Tokarev; +Cc: qemu-devel, qemu-PowerPC



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
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-21 12:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-19 10:26 vof-nvram.bin: what it is and how it is used? Michael Tokarev
2025-03-19 13:14 ` BALATON Zoltan
2025-03-21  5:42   ` Alexey Kardashevskiy

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).