From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:44098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQ2i-0005sv-Ix for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:35:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RsQ2h-0001a7-F7 for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:35:28 -0500 Received: from mail-pz0-f45.google.com ([209.85.210.45]:37728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RsQ2h-0001a0-AR for qemu-devel@nongnu.org; Tue, 31 Jan 2012 21:35:27 -0500 Received: by dadp14 with SMTP id p14so595547dad.4 for ; Tue, 31 Jan 2012 18:35:25 -0800 (PST) Message-ID: <4F28A4E8.70404@codemonkey.ws> Date: Tue, 31 Jan 2012 20:35:20 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1328055113-30031-1-git-send-email-grant.likely@secretlab.ca> <201202010135.32078.paul@codesourcery.com> In-Reply-To: <201202010135.32078.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] arm: add device tree support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Peter Maydell , Alexander Graf , Rob Herring , qemu-devel@nongnu.org, Grant Likely , "Edgar E. Iglesias" , Jeremy Kerr On 01/31/2012 07:35 PM, Paul Brook wrote: >> We could also just change machine->init() and pass the dtb in there. In a >> QOM world these would become machine device properties anyways. >> >> machine->init(ram_size, boot_devices, >> kernel_filename, kernel_cmdline, initrd_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. All of > which will be rewritten in the near future. > > machine->init is a particularly suckiy interface to start with, we want to be > using it less, not more. It's not like we're going support multiple machine > instanced. At least not before machine->init is removed altogether. The right solution to this problem is to make an arm-kernel-loader device that has a dtb property. It's a very small amount of code and fits with our longer term strategy of killing off machine->init. Regards, Anthony Liguori > > Paul >