qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
To: Jordan Justen <jljusten@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Michal Suchanek <hramrach@centrum.cz>,
	Kevin O'Connor <kevin@koconnor.net>, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] RFC: emulation of system flash
Date: Fri, 11 Mar 2011 00:53:26 +0100	[thread overview]
Message-ID: <4D796476.6010607@gmx.net> (raw)
In-Reply-To: <AANLkTi=PMX803_J=9bp=GSLGJE9Yj8jytnwGHv+4QJuf@mail.gmail.com>

Hi Jordan,

thanks for your insights.

Auf 10.03.2011 23:29, Jordan Justen schrieb:
> On Thu, Mar 10, 2011 at 14:10, Carl-Daniel Hailfinger
> <c-d.hailfinger.devel.2006@gmx.net> wrote:
>   
>> Auf 10.03.2011 22:55, Jordan Justen schrieb:
>>     
>>> On Thu, Mar 10, 2011 at 13:37, Carl-Daniel Hailfinger
>>> <c-d.hailfinger.devel.2006@gmx.net> 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.
>   

Upon rereading your proposal, I think the unfamiliarity of the proposed
interface and the index/data design triggered my "complicated" reflex.


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

On recent Intel chipsets you are limited to 16 MB mapped to the top of
the 32bit address space. The same limitation exists for most other x86
chipsets as well. That said, some people may want bigger images, but for
x86 this may cause conflicts with the HPET region.


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

I've seen people embed coreboot+Linux+X.org into a 4 MB image on x86, so
I think 16 MB are plenty (flash bigger than that is either NAND or
expensive or slow, and would require significant effort to emulate
correctly (NAND) or simply not exist in consumer equipment for
speed/money reasons).


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

If we restrict ourselves to the 128kB-16MB range, I think I can find a
flash chip family which has the criteria we want. 64 kByte flash chips
still exist, but usually not as part of a family which reaches 16 MByte.

We should decide first if we want SPI flash or Parallel flash, and then
I can try to find a matching flash chip family.

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/

  reply	other threads:[~2011-03-10 23:52 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-10  4:51 [Qemu-devel] RFC: emulation of system flash Jordan Justen
2011-03-10  9:10 ` [Qemu-devel] " Avi Kivity
2011-03-10 18:43   ` Jordan Justen
2011-03-10 21:52     ` Carl-Daniel Hailfinger
2011-03-10 22:14       ` Jordan Justen
2011-03-10 22:31         ` Carl-Daniel Hailfinger
2011-03-10 22:58           ` Jordan Justen
2011-03-10 23:41             ` Carl-Daniel Hailfinger
2011-03-11  2:12               ` Jordan Justen
2011-03-10  9:47 ` Gleb Natapov
2011-03-10 11:27   ` Jan Kiszka
2011-03-10 11:46     ` Jan Kiszka
2011-03-10 11:53       ` Paolo Bonzini
2011-03-10 12:07         ` Jan Kiszka
2011-03-10 19:03       ` Jordan Justen
2011-03-10 19:23         ` Anthony Liguori
2011-03-10 20:05           ` Jordan Justen
2011-03-10 11:48     ` Gleb Natapov
2011-03-10 12:06       ` Jan Kiszka
2011-03-10 12:17         ` Gleb Natapov
2011-03-10 12:27           ` Jan Kiszka
2011-03-10 19:08             ` Jordan Justen
2011-03-10 19:13               ` Gleb Natapov
2011-03-10 21:46         ` Carl-Daniel Hailfinger
2011-03-10 22:11           ` Scott Wood
2011-03-10 21:41       ` Carl-Daniel Hailfinger
2011-03-10 22:05         ` Jordan Justen
2011-03-10 18:59   ` Jordan Justen
2011-03-10 19:12     ` Gleb Natapov
2011-03-10 19:50       ` Jordan Justen
2011-03-10 20:08         ` Антон Кочков
2011-03-10 20:21         ` Gleb Natapov
2011-03-11 21:41           ` Jordan Justen
2011-03-14 14:29             ` Gleb Natapov
2011-03-10 21:37 ` [Qemu-devel] " Carl-Daniel Hailfinger
2011-03-10 21:55   ` Jordan Justen
2011-03-10 22:10     ` Carl-Daniel Hailfinger
2011-03-10 22:29       ` Jordan Justen
2011-03-10 23:53         ` Carl-Daniel Hailfinger [this message]
2011-03-11  0:19       ` [Qemu-devel] " Jan Kiszka
2011-03-11  0:27         ` Carl-Daniel Hailfinger
2011-03-11 19:09           ` Jordan Justen
2011-03-11 23:10             ` Michal Suchanek
2011-03-12  9:24             ` Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D796476.6010607@gmx.net \
    --to=c-d.hailfinger.devel.2006@gmx.net \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=hramrach@centrum.cz \
    --cc=jljusten@gmail.com \
    --cc=kevin@koconnor.net \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).