[Top][All Lists]

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

Re: [Qemu-devel] Re: RFC: emulation of system flash

From: Carl-Daniel Hailfinger
Subject: Re: [Qemu-devel] Re: RFC: emulation of system flash
Date: Thu, 10 Mar 2011 23:31:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv: Gecko/20101124 SUSE/2.0.11-0.2.1 SeaMonkey/2.0.11

Auf 10.03.2011 23:14, Jordan Justen schrieb:
> On Thu, Mar 10, 2011 at 13:52, Carl-Daniel Hailfinger
> <address@hidden> wrote:
>> Auf 10.03.2011 19:43, Jordan Justen schrieb:
>>> I thought this might be a case where deviation from real hardware
>>> emulation could better serve the VM's needs.
>> If we have to write the code anyway, and if it can work just fine with
>> current KVM/Qemu, is there a reason not to use the same interface as
>> real hardware?
> If there was a real device emulated by qemu, I would gladly make use
> of it in OVMF.

Nice. So should I dig up my flash emulator code and check which chips
are supported? Porting the code to Qemu shouldn't be too hard.

> I just thought this proposal would be much easier to implement, and
> not be restricted to any particular size.  (Since -bios currently
> supports any size that is a multiple of 64kb.)  A real device is going
> to imply a certain size.

Right, the constant size argument is definitely a point we need to talk

We could sidestep the issue by always using a 16 MByte flash device
which gets filled from the top with the firmware image, but I'm not sure
if that has other side effects.
Another way to solve this would be to emulate multiple flash chips, one
per power-of-two size between 128 kB and 16 MB. Some SPI flash chip
families encode the size into their ID, so determining the size
algorithmically is as simple as calculating
1 << idbyte3
and emulating this is equally simple.



reply via email to

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