qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] turn firmware image filename into a machine opt


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] turn firmware image filename into a machine option
Date: Tue, 01 Oct 2013 17:05:13 +0200

On Di, 2013-10-01 at 22:00 +0900, Peter Maydell wrote:
> On 1 October 2013 21:16, Gerd Hoffmann <address@hidden> wrote:
> >   Hi,
> >
> >> -bios we're stuck with because it's a legacy
> >> option,
> >
> > What is legacy about it?
> 
> The fact that we've had it since forever, it was introduced for
> a specific x86 use case and has since accreted behaviour
> rather than being designed.

The x86 use case is where the x86 centric name comes from.  But that's
it.  Almost every machine has some kind of firmware which does the
initialization, that certainly isn't a x86-only / legacy concept ...

> >> >> Why is this a machine option rather than a property of
> >> >> the ROM/flash device?
> >> >
> >> > Not all machines have a flash device.
> >>
> >> No, but they must have *something* that the firmware code lives in...
> >
> > Some don't.  They just memcpy the firmware into guest ram instead.
> 
> ...is that a good thing? What does the real hardware do? Should we
> be doing that instead? Isn't this awkward on reset?

Isn't ideal of course.  But it is how it is, for whatever reasons, and
I'm not going to implement proper rom/flash emulation for each and every
qemu machine type.

I just need some way to have different default firmware images for
different pc machine type versions.  Requests to considering other
firmware loading needs (such as the two images needed for sPAPR) when
doing this is reasonable.  Blaming me for how inconistent qemu's
firmware loading is today is not ok.

> > Given that pflash operates on a blockdev I don't see a obvious way to
> > change that ...
> 
> We could make pflash accept a plain file which is then used as the
> read-only initialization for a blockdev which isn't backed by anything,
> for example.

Magically creating something for users convenience (blkdev in this case)
isn't without problems.  I did that with usb-storage, which creates a
second device (scsi-disk) automatically.  Caused all sorts of trouble
later on.  Don't feel like repeating that mistake.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]