All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: John Williams <john.williams@petalogix.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	monstr@monstr.eu, edgar.iglesias@petalogix.com,
	"Stefan Weil" <sw@weilnetz.de>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org,
	"Peter Crosthwaite" <peter.crosthwaite@petalogix.com>,
	"Scott Wood" <scottwood@freescale.com>,
	duyl@xilinx.com, linnj@xilinx.com,
	"Eric Blake" <eblake@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option
Date: Sun, 29 Jan 2012 20:11:45 -0600	[thread overview]
Message-ID: <4F25FC61.6030301@codemonkey.ws> (raw)
In-Reply-To: <CACPZLaVLu_+PYe0qsLcp+wj+RqgQR_mK+_LqEeJTHbWM=Aaf3A@mail.gmail.com>

On 01/29/2012 06:28 PM, John Williams wrote:
> On Sun, Jan 29, 2012 at 4:51 PM, Peter Crosthwaite
> <peter.crosthwaite@petalogix.com>  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

  parent reply	other threads:[~2012-01-30  2:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23  7:20 [Qemu-devel] [RFC PATCH 0/7] Zynq-7000 EPP platform model Peter A. G. Crosthwaite
     [not found] ` <cover.1327302677.git.peter.crosthwaite@petalogix.com>
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 1/7] cadence_uart: first revision Peter A. G. Crosthwaite
2012-01-24  2:02     ` John Linn
2012-01-24  8:07     ` Andreas Färber
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 2/7] cadence ttc: " Peter A. G. Crosthwaite
2012-01-24  2:03     ` John Linn
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 3/7] cadence_wdt: " Peter A. G. Crosthwaite
2012-01-24  2:03     ` John Linn
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 4/7] cadence_gem: " Peter A. G. Crosthwaite
2012-01-24  2:05     ` John Linn
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option Peter A. G. Crosthwaite
2012-01-24  7:22     ` Andreas Färber
2012-01-24  7:35       ` Peter Crosthwaite
2012-01-24  7:50         ` Andreas Färber
2012-01-24 18:23       ` Stefan Weil
2012-01-26 19:34         ` Scott Wood
2012-01-26 21:27           ` Eric Blake
2012-01-27  8:25             ` Markus Armbruster
2012-01-29  6:51               ` Peter Crosthwaite
2012-01-30  0:28                 ` John Williams
2012-01-30  0:33                   ` John Williams
2012-01-30  2:11                   ` Anthony Liguori [this message]
2012-01-30  2:19                     ` John Williams
2012-01-30  2:28                       ` Anthony Liguori
2012-01-30  2:41                         ` John Williams
2012-01-30  2:48                           ` Anthony Liguori
2012-02-01  2:06                             ` John Williams
2012-01-30  2:10         ` Anthony Liguori
2012-01-26 19:40     ` Peter Maydell
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 6/7] arm_boot: added initrd address override Peter A. G. Crosthwaite
2012-01-23  7:20   ` [Qemu-devel] [RFC PATCH 7/7] xilinx_zynq: machine model first revision Peter A. G. Crosthwaite
2012-01-23  8:00     ` Michal Simek
2012-01-23  8:22       ` Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F25FC61.6030301@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=afaerber@suse.de \
    --cc=armbru@redhat.com \
    --cc=duyl@xilinx.com \
    --cc=eblake@redhat.com \
    --cc=edgar.iglesias@petalogix.com \
    --cc=john.williams@petalogix.com \
    --cc=linnj@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=peter.crosthwaite@petalogix.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=scottwood@freescale.com \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.