From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44900) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQ7o-0007gE-Bp for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:40:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsQ7m-00023Z-9I for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:40:44 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:62035) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQ7m-00023S-6l for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:40:42 -0500 Received: by vbal1 with SMTP id l1so657818vba.4 for ; Tue, 31 Jan 2012 18:40:41 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <4F28A554.4090000@codemonkey.ws> References: <1328055113-30031-1-git-send-email-grant.likely@secretlab.ca> <201202010135.32078.paul@codesourcery.com> <1CB9FDC2-00A7-45BF-9693-21EB23FB47B1@suse.de> <4F28A554.4090000@codemonkey.ws> From: John Williams Date: Wed, 1 Feb 2012 12:40:21 +1000 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] arm: add device tree support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , Alexander Graf , Rob Herring , qemu-devel@nongnu.org, Grant Likely , Paul Brook , "Edgar E. Iglesias" , Jeremy Kerr On Wed, Feb 1, 2012 at 12:37 PM, Anthony Liguori wr= ote: > On 01/31/2012 07:44 PM, Alexander Graf wrote: >> >> >> On 01.02.2012, at 02:35, Paul Brook wrote: >> >>>> We could also just change machine->init() and pass the dtb in there. I= n >>>> a >>>> QOM world these would become machine device properties anyways. >>>> >>>> =A0 =A0machine->init(ram_size, boot_devices, >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0kernel_filename, kernel_cmdline, in= itrd_filename, >>>> cpu_model); >>>> >>>> Essentially we shouldn't treat -dtb any different than -kernel or >>>> -initrd. >>>> It's also useful for more than ARM, namely embedded ppc systems. But I >>>> can >>>> easily post a follow-up patch for those. >>> >>> >>> Changing machine->init means you have to touch every single board file, >>> and >>> clone the exact same code for every machine that uses arm_boot.c. =A0Al= l of >>> which will be rewritten in the near future. >> >> >> Well, the dt file name would have to be passed into the generic arm_boot= .c >> function, yes. But that's something that we need to do at one point in t= ime >> either way, because machines will want to have default dtb file names. >> >>> machine->init is a particularly suckiy interface to start with, we want >>> to be >>> using it less, not more. =A0It's not like we're going support multiple >>> machine >>> instanced. =A0At least not before machine->init is removed altogether. >> >> >> I do see your point on not extending legacy interfaces though and not >> bloating up the patch. In fact, I'm indifferent enough on the actual >> implementation atm, as long as the command line interface (or whatever t= he >> user sees) is reasonably sane. And it is IMHO. So if it makes everything >> easier, do it using a global, but keep in mind that this will need >> refactoring. > > > Globals are even worse! > > Can't you hear the kernel loader begging to be turned into a device? =A0I= t's > pleading with us to stop abusing other parts of QEMU and make it a first > class citizen of QEMU. Is there some kind of initialisation phase where such a device can do its t= hing? Unless I'm missing something a "loader" device will be racing the rest of the VM after reset to populate the memory with the desired contents, no? John --=20 John Williams, PhD, B. Eng, B. IT PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com=A0=A0p: +61-7-30090663=A0 f: +61-7-30090663