From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2q16-0004xr-2l for qemu-devel@nongnu.org; Sat, 28 Nov 2015 19:39:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2q12-0003LO-Qf for qemu-devel@nongnu.org; Sat, 28 Nov 2015 19:39:00 -0500 Message-ID: <1448757529.3172.6.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Sun, 29 Nov 2015 11:38:49 +1100 In-Reply-To: <6108B6A6-2828-433D-AE1A-F59B226F5264@suse.de> 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> <6108B6A6-2828-433D-AE1A-F59B226F5264@suse.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Alexander Graf Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, qemu-devel@nongnu.org On Sat, 2015-11-28 at 11:53 +0100, Alexander Graf wrote: > > > Am 28.11.2015 um 08:59 schrieb Benjamin Herrenschmidt > crashing.org>: > > > > > 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. > > > > 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. > > That's probably the best way. If it's memory mapped, you might not > even have to extract anything - just jump to its location ;). It's not memory mapped sadly (well not on P8...) The way a real P8 boots is first a little internal uC executes code from a i2c seeprom to initialize a core and some cache. It then copies a payload from flash into that cache. That payload is HostBoot, which is a huge thing that initializes a pile of stuff such as the internal busses, SMP links, links to memory buffers, trains memory etc... it then constructs an embryo device-tree and loads & run OPAL (aka skiboot). The model I chose for powernv is to simulate a boot at the hostboot -> skiboot transition point. > The -kernel syntax is useful to have, but should really be something > "on top" of the normal system boot rather than its primary boot > interface. I know, I'm just not keen on committing a 16M "BIOS" to qemu tree ;-) In any case, this is easy to change / fix. There's a lot more work on the rest of the series first. Cheers, Ben.