From: Aurelien Jarno <aurelien@aurel32.net>
To: Guenter Roeck <linux@roeck-us.net>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] sh4: Fix initramfs initialization for endiannes-mismatched targets
Date: Mon, 17 Aug 2015 22:46:57 +0200 [thread overview]
Message-ID: <20150817204657.GB20321@aurel32.net> (raw)
In-Reply-To: <1439389236-22158-1-git-send-email-linux@roeck-us.net>
On 2015-08-12 07:20, Guenter Roeck wrote:
> If host and target endianness does not match, loding an initramfs does not work.
> Fix by writing boot parameters with appropriate endianness conversion.
>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> hw/sh4/r2d.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
> index 5e22ed7..3b0b2ec 100644
> --- a/hw/sh4/r2d.c
> +++ b/hw/sh4/r2d.c
> @@ -338,9 +338,9 @@ static void r2d_init(MachineState *machine)
> }
>
> /* initialization which should be done by firmware */
> - boot_params.loader_type = 1;
> - boot_params.initrd_start = INITRD_LOAD_OFFSET;
> - boot_params.initrd_size = initrd_size;
> + boot_params.loader_type = tswap32(1);
> + boot_params.initrd_start = tswap32(INITRD_LOAD_OFFSET);
> + boot_params.initrd_size = tswap32(initrd_size);
> }
>
> if (kernel_cmdline) {
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Good catch. I have added it to my sh4-next queue:
http://git.aurel32.net/?p=qemu.git;a=shortlog;h=refs/heads/sh4-next
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2015-08-17 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 14:20 [Qemu-devel] [PATCH] sh4: Fix initramfs initialization for endiannes-mismatched targets Guenter Roeck
2015-08-17 20:46 ` Aurelien Jarno [this message]
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=20150817204657.GB20321@aurel32.net \
--to=aurelien@aurel32.net \
--cc=linux@roeck-us.net \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).