From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrgio-0008NX-FW for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:11:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rrgij-00018y-1T for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:11:54 -0500 Received: from mail-yx0-f173.google.com ([209.85.213.173]:50214) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rrgii-00018t-U2 for qemu-devel@nongnu.org; Sun, 29 Jan 2012 21:11:49 -0500 Received: by yenl8 with SMTP id l8so1991527yen.4 for ; Sun, 29 Jan 2012 18:11:48 -0800 (PST) Message-ID: <4F25FC61.6030301@codemonkey.ws> Date: Sun, 29 Jan 2012 20:11:45 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <75020d27a76d9b884a9c40d8c6ec81b525ab96a9.1327302677.git.peter.crosthwaite@petalogix.com> <4F1E5C49.4030604@suse.de> <4F1EF705.30900@weilnetz.de> <4F21AAAC.1020209@freescale.com> <4F21C55F.6020802@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Williams Cc: Peter Maydell , monstr@monstr.eu, edgar.iglesias@petalogix.com, Stefan Weil , Markus Armbruster , qemu-devel@nongnu.org, Peter Crosthwaite , Scott Wood , duyl@xilinx.com, linnj@xilinx.com, Eric Blake , =?ISO-8859-1?Q?Andreas_F=E4rber?= On 01/29/2012 06:28 PM, John Williams wrote: > On Sun, Jan 29, 2012 at 4:51 PM, Peter Crosthwaite > wrote: >> Hi All, >> >> So on the topic of these command line arguments for initrd, dtb and friends, >> another related issue we have encountered (and have hacked around in our >> tree) is not being able to relocate the initrd or kernel. Currently these >> memory locations are hardcoded in arm_boot.c: >> >> #define KERNEL_ARGS_ADDR 0x100 >> #define KERNEL_LOAD_ADDR 0x00010000 >> #define INITRD_LOAD_ADDR 0x00d00000 >> >> If you see patch 6/7 in this same series I put in place a hack to override >> the initrd location in memory, but I wonder if instead this should go up to >> the command line interface as a parameter. Currently the machine model (or >> arm_boot.c) defines exactly where kernels/initrds/command-line-args line in >> memory, but since these are software properties should perhaps they go up to >> the command line as -kernel,foo=bar options? E.G: >> >> qemu-system-arm >> -kernel,kernel-image=/foo/zImage,kernel-addr=0x00010000,initrd=/foo/initrd,initrd_addr=0x00d00000 > > There's an opportunity here - QEMU needs the cmdline ability to load > random binaries/elfs anyway, such as > > --load file@address Make an elf loader device if you desire this ability but I'm skeptical that it really is all that useful. No special syntax though, we have a way to parameterize options as Markus rightly points out. Regards, Anthony Liguori > > e.g. --load image.bin@0xa4000000 > > -- load file.elf > > (no address required) > > This option or one like it would make it much easier and less > hard-coded to assemble any sort of initial memory state. > > Extending this, kernels, initrds and DTBs all can have > machine-specific preferred addresses but can be overriden in the same > way: > > --kernel zImage@0x20000000 --initrd fs.img@0x40000000 > > and so on > > The '@' symbol will need to be escaped by it's a pretty natural syntax. > > John