diff mbox

[v1,3/3] xilinx_zynq: set initrd and dtb locations

Message ID bccd4ae95df93fb3018d3c87bd95082d7b388d83.1333343538.git.peter.crosthwaite@petalogix.com
State New
Headers show

Commit Message

Peter A. G. Crosthwaite April 2, 2012, 5:20 a.m. UTC
The xilinx published kernel and linux test binaries expects initrd and dtb to
be at these locations

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
---
 hw/xilinx_zynq.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

John Linn April 10, 2012, 5:53 p.m. UTC | #1
> -----Original Message-----
> From: Peter A. G. Crosthwaite [mailto:peter.crosthwaite@petalogix.com]
> Sent: Sunday, April 01, 2012 10:20 PM
> To: peter.crosthwaite@petalogix.com; qemu-devel@nongnu.org;
> paul@codesourcery.com; peter.maydell@linaro.org;
> edgar.iglesias@gmail.com
> Cc: Duy Le; John Linn; john.williams@petalogix.com
> Subject: [PATCH v1 3/3] xilinx_zynq: set initrd and dtb locations
> 
> The xilinx published kernel and linux test binaries expects initrd and
> dtb to
> be at these locations
> 
> Signed-off-by: Peter A. G. Crosthwaite
> <peter.crosthwaite@petalogix.com>

Signed-off-by: John Linn <john.linn@xilinx.com>

> ---
>  hw/xilinx_zynq.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c
> index 56d0b96..31d9e81 100644
> --- a/hw/xilinx_zynq.c
> +++ b/hw/xilinx_zynq.c
> @@ -174,6 +174,8 @@ static void zynq_init(ram_addr_t ram_size, const
> char *boot_device,
>      zynq_binfo.kernel_filename = kernel_filename;
>      zynq_binfo.kernel_cmdline = kernel_cmdline;
>      zynq_binfo.initrd_filename = initrd_filename;
> +    zynq_binfo.initrd_offset = 0x00800000;
> +    zynq_binfo.dtb_offset = 0x01000000;
>      zynq_binfo.nb_cpus = smp_cpus;
>      zynq_binfo.write_secondary_boot = zynq_write_secondary_boot;
>      zynq_binfo.secondary_cpu_reset_hook = zynq_reset_secondary;
> --
> 1.7.3.2
> 


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
Peter Maydell April 10, 2012, 5:58 p.m. UTC | #2
On 2 April 2012 06:20, Peter A. G. Crosthwaite
<peter.crosthwaite@petalogix.com> wrote:
> The xilinx published kernel and linux test binaries expects initrd and dtb to
> be at these locations

Isn't this just broken? The documented ABI for the bootloader
to kernel interface tells the kernel where to find the initrd
(either via the ATAGS list or inside the device tree blob),
and if you're using a device tree blob then we pass its location
in a register. For device tree in particular it is extremely
clear: "Device tree can be located anywhere in system RAM".

I don't want to add hacky workarounds for broken guests; if
you must run broken guests you can run the whole boot rom
or equivalent that the hardware does...

-- PMM
diff mbox

Patch

diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c
index 56d0b96..31d9e81 100644
--- a/hw/xilinx_zynq.c
+++ b/hw/xilinx_zynq.c
@@ -174,6 +174,8 @@  static void zynq_init(ram_addr_t ram_size, const char *boot_device,
     zynq_binfo.kernel_filename = kernel_filename;
     zynq_binfo.kernel_cmdline = kernel_cmdline;
     zynq_binfo.initrd_filename = initrd_filename;
+    zynq_binfo.initrd_offset = 0x00800000;
+    zynq_binfo.dtb_offset = 0x01000000;
     zynq_binfo.nb_cpus = smp_cpus;
     zynq_binfo.write_secondary_boot = zynq_write_secondary_boot;
     zynq_binfo.secondary_cpu_reset_hook = zynq_reset_secondary;