From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49151 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pxq4u-0005Z7-56 for qemu-devel@nongnu.org; Thu, 10 Mar 2011 19:19:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pxq4r-0000vF-LG for qemu-devel@nongnu.org; Thu, 10 Mar 2011 19:19:35 -0500 Received: from fmmailgate02.web.de ([217.72.192.227]:56586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxq4r-0000ud-9K for qemu-devel@nongnu.org; Thu, 10 Mar 2011 19:19:33 -0500 Message-ID: <4D796A8E.6000204@web.de> Date: Fri, 11 Mar 2011 01:19:26 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <4D794489.6010903@gmx.net> <4D794C56.6020809@gmx.net> In-Reply-To: <4D794C56.6020809@gmx.net> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA24CCE1F49F56E89C582BB00" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: RFC: emulation of system flash List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Carl-Daniel Hailfinger Cc: Gleb Natapov , Stefan Hajnoczi , qemu-devel , Michal Suchanek , Kevin O'Connor , Avi Kivity , Jordan Justen This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA24CCE1F49F56E89C582BB00 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2011-03-10 23:10, Carl-Daniel Hailfinger wrote: > Auf 10.03.2011 22:55, Jordan Justen schrieb: >> On Thu, Mar 10, 2011 at 13:37, Carl-Daniel Hailfinger >> wrote: >> =20 >>> Auf 10.03.2011 05:51, Jordan Justen schrieb: >>> =20 >>>> I have documented a simple flash-like device which I think could be >>>> useful for qemu/kvm in some cases. (Particularly for allowing >>>> persistent UEFI non-volatile variables.) >>>> >>>> http://wiki.qemu.org/Features/System_Flash >>>> >>>> Let me know if you have any suggestions or concerns. >>>> >>>> =20 >>> Is there any reason why you chose to invent an interface for the flas= h >>> chip which is more complicated than the interface used by common flas= h >>> chips out there? >>> Maybe some EFI requirement? >>> =20 >> 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? >> =20 >=20 > Pseudocode for the real interface most common on x86 before SPI came al= ong: >=20 > 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. Hmm, I may oversee some subtle difference, but this looks pretty much like CFI to me (see hw/pflash_cfi02.c). At least it's an in-band interface, which is the better choice as we currently only have a PIIX3 southbridge for x86, predating even FWHs. Jan --------------enigA24CCE1F49F56E89C582BB00 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAk15apEACgkQitSsb3rl5xTAmwCfbAp6ySuJCYrYOQ256HV19fKB UFcAmQFQVI7AfglXsHqzR5SGANMqZLzy =FwA2 -----END PGP SIGNATURE----- --------------enigA24CCE1F49F56E89C582BB00--