From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VQysg-00057t-1G for qemu-devel@nongnu.org; Tue, 01 Oct 2013 08:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VQysX-0004jw-Ou for qemu-devel@nongnu.org; Tue, 01 Oct 2013 08:16:45 -0400 Message-ID: <1380629771.5280.40.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 01 Oct 2013 14:16:11 +0200 In-Reply-To: References: <1380620399-9907-1-git-send-email-kraxel@redhat.com> <1380626523.5280.27.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] turn firmware image filename into a machine option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Mark Langsdorf , QEMU Developers , Fabien Chouteau , Alexander Graf , Blue Swirl , Michael Walle , =?ISO-8859-1?Q?Herv=E9?= Poussineau , Paul Brook , Anthony Liguori , "open list:New World" , Andreas =?ISO-8859-1?Q?F=E4rber?= , Aurelien Jarno , Richard Henderson Hi, > -bios we're stuck with because it's a legacy > option, What is legacy about it? Well, the x86-centric name of course. Thats why the machine option is named 'firmware' instead. It also doesn't use QemuOpts, which is fixed by this patch. Anything else? > >> 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. Most have a memory region for the firmware which gets mapped into guest address space. Sometimes pulled out of thin air, sometimes modeled as proper device. > > Also flash drives don't want a > > simple (readonly) image file but a (writable) blockdev as backing > > storage, at least the pflash device emulation I've briefly looked at. > > ...so how does this work for machines where the firmware lives in > a flash device? pc: In case '-pflash $blockdev' is present '-bios $image' is ignored. My patch doesn't change that behavior, i.e. -machine firmware=$image is ignored too in case -plflash is present on the command line. Given that pflash operates on a blockdev I don't see a obvious way to change that ... cheers, Gerd