qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC PATCH 5/7] vl.c: added -kerndtb option
Date: Sun, 29 Jan 2012 20:11:45 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15

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

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 address@hidden

-- 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 address@hidden --initrd address@hidden

and so on

The '@' symbol will need to be escaped by it's a pretty natural syntax.

John




reply via email to

[Prev in Thread] Current Thread [Next in Thread]