From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35857) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5kYW-0004Qy-PE for qemu-devel@nongnu.org; Sun, 06 Dec 2015 20:25:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5kYT-0002Gd-LZ for qemu-devel@nongnu.org; Sun, 06 Dec 2015 20:25:32 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:44439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5kYT-0002GI-FF for qemu-devel@nongnu.org; Sun, 06 Dec 2015 20:25:29 -0500 Received: from localhost by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 6 Dec 2015 18:25:27 -0700 From: Stewart Smith In-Reply-To: <565C925F.60306@fr.ibm.com> References: <1447201710-10229-1-git-send-email-benh@kernel.crashing.org> <564290E1.3090205@redhat.com> <1447203387.31884.126.camel@kernel.crashing.org> <5642B59E.2070101@ozlabs.ru> <1447213139.31884.136.camel@kernel.crashing.org> <5642BEF9.90406@ozlabs.ru> <1447215397.31884.140.camel@kernel.crashing.org> <5642C6F0.9040200@ozlabs.ru> <56582EAF.40103@suse.de> <1448697599.3172.1.camel@kernel.crashing.org> <565C925F.60306@fr.ibm.com> Date: Mon, 07 Dec 2015 12:25:19 +1100 Message-ID: <87bna3dp8g.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 00/77] ppc: Add "native" POWER8 platform List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?C=C3=A9dric?= Le Goater , Benjamin Herrenschmidt , Alexander Graf , Alexey Kardashevskiy , Eric Blake , qemu-ppc@nongnu.org Cc: qemu-devel@nongnu.org C=C3=A9dric Le Goater writes: > On 11/28/2015 08:59 AM, Benjamin Herrenschmidt wrote: >> On Fri, 2015-11-27 at 11:21 +0100, Alexander Graf wrote: >>> >>> How does real hardware store petitboot? If it's flash, you could pass it >>> in using -pflash and thus model things even more closely and allow users >>> to just take the ROM image as is. >>=20 >> It is a flash image, we could use an Open Power machine flash image "as-= is" >> provided we taught qemu to extract skiboot (aka OPAL) from it. > > Couldn't we add an offset argument to load_image_targphys() or make that= =20 > an extra routine ? If so, we could then load directly from an openpower=20 > pnor file.=20 > > I gave it a quick (and dirty) try and a powernv guest runs fine up to=20 > petitboot with just : > > qemu-system-ppc64 -m 2G -M powernv -bios ~/work/open-power/images/palme= tto.pnor -nographic -nodefaults -serial stdio > > The pnor file is compiled from github. The patch is below (without the di= rty > cut and paste I did in loader.c). The offset for the PAYLOAD and BOOTKERN= EL > partitions are hard coded but I guess we don't need to read the flash par= tition > table in qemu, not yet. One downside to this is that if we don't fall back to being able to load skiboot.lid it becomes more annoying to boot a gcov enabled skiboot as typical PNOR layout only gives 1MB for skiboot, and gcov builds bloat that a *lot*. We probably don't want NVRAM writes going back to a single system wide PNOR image too, so while using pnor file is great for simulating what hardware does, may not work as the solution for long term model.