qemu-devel
[Top][All Lists]
Advanced

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

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


From: Jordan Justen
Subject: Re: [Qemu-devel] RFC: emulation of system flash
Date: Thu, 10 Mar 2011 14:29:20 -0800

On Thu, Mar 10, 2011 at 14:10, Carl-Daniel Hailfinger
<address@hidden> wrote:
> Auf 10.03.2011 22:55, Jordan Justen schrieb:
>> On Thu, Mar 10, 2011 at 13:37, Carl-Daniel Hailfinger
>> <address@hidden> wrote:
>>> Is there any reason why you chose to invent an interface for the flash
>>> chip which is more complicated than the interface used by common flash
>>> chips out there?
>>> Maybe some EFI requirement?
>>>
>> This is a simpler version than the flash devices I'm used to dealing
>> with for x86/x86-64 UEFI systems.  Can you suggest an alternative real
>> interface that is simpler?
>>
>
> Pseudocode for the real interface most common on x86 before SPI came along:
>
> Write a page (256 bytes) or a few bytes:
> chip_writeb(0xAA, bios_base + 0x5555);
> chip_writeb(0x55, bios_base + 0x2AAA);
> chip_writeb(0xA0, bios_base + 0x5555);
> chip_writeb(databyte0, bios_base + addr);
> chip_writeb(databyte1, bios_base + addr + 1);
> chip_writeb(databyte2, bios_base + addr + 2);
> chip_writeb(databyte3, bios_base + addr + 3);
> ... up to 256 databytes.
> chip_readb(bios_base);
> The last chip_readb(bios_base) is repeated until the result does not
> change anymore.
>
> For me, that looks pretty simple and straightforward, especially
> compared to other more exotic flash chip interfaces.

I disagree that you think my proposal is more complicated than this example.

But, I would agree, that all other things being equal, emulating a
real device would be preferable.

I would like to know what people's thoughts are regarding supporting
various devices sizes.  I think that right now -bios should support
files sizes that are multiples of 64kb up to ~16MB.  (Perhaps even
larger.)

A large -bios file can be interesting for embedding an OS image into
the rom/flash device...

Carl-Daniel, do you think we can address this while still supporting
real hardware emulation?

-Jordan



reply via email to

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