xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>,
	xen-devel@lists.xen.org, ian.campbell@citrix.com,
	stefano.stabellini@eu.citrix.com, tim@xen.org
Subject: Re: [PATCH] xen/tools: Introduce QNX IFS loader
Date: Tue, 19 Aug 2014 11:41:53 -0500	[thread overview]
Message-ID: <53F37E51.4050007@linaro.org> (raw)
In-Reply-To: <1408463462-19568-1-git-send-email-oleksandr.tyshchenko@globallogic.com>

Hi Oleksandr,

Thank you for your patch.

On 19/08/14 10:51, Oleksandr Tyshchenko wrote:
> Add ability to load QNX IFS image. Based on IPL code (U-Boot for QNX).

Do you have any link to the IPL code? Such as commit ID...

Also, is there any website to explain the QNX IFS image?

[..]

> diff --git a/tools/libxc/xc_dom_qnxifsloader.c b/tools/libxc/xc_dom_qnxifsloader.c

[..]

> +static uint32_t image_addr;

All the below functions can be called concurrently for different 
domains. I would add a new field in xc_dom_image.

> +static uint32_t image_scan(uint32_t start_addr, uint32_t end_addr)
> +{
> +    struct startup_header *startup_hdr;
> +    uint32_t last_addr = 0xffffffff;
> +
> +    for (; start_addr < end_addr; start_addr += 4)

Coding style:

for ( ... )

> +    {
> +        startup_hdr = (struct startup_header *)start_addr;

AFAIU, QNX loader is only for 32 bits guest, right?

You are casting on multiple place 32 bits address to a pointer. This 
won't work on ARM64. Even though you are targeting 32 bits, you still 
have to make this code working on ARM64.

[..]

> +static int xc_dom_probe_qnx_ifs(struct xc_dom_image *dom)
> +{
> +    struct startup_header *startup_hdr;
> +
> +    if ( dom->kernel_blob == NULL )
> +    {
> +        xc_dom_panic(dom->xch, XC_INTERNAL_ERROR,
> +                     "%s: no QNX IFS loaded", __FUNCTION__);
> +        return -EINVAL;
> +    }
> +
> +    image_addr = *(uint32_t *)&dom->kernel_blob;
> +    image_addr = image_scan(image_addr, image_addr + 0x200);
> +    if (image_addr == 0xffffffff)

Coding style:

if ( ... )

Regards,

-- 
Julien Grall

  parent reply	other threads:[~2014-08-19 16:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 15:51 [PATCH] xen/tools: Introduce QNX IFS loader Oleksandr Tyshchenko
2014-08-19 16:13 ` Andrew Cooper
2014-08-19 16:26   ` Dario Faggioli
2014-08-20  4:09     ` Lars Kurth
2014-08-20 10:07       ` Artem Mygaiev
2014-08-20 10:11         ` Dario Faggioli
2014-08-20 13:56           ` Artem Mygaiev
2014-08-20 14:00             ` Dario Faggioli
2014-08-26 21:09             ` Ian Campbell
2014-08-27  7:53               ` Andrii Tseglytskyi
2014-08-20 10:20       ` Oleksandr Tyshchenko
2014-08-19 16:41 ` Julien Grall [this message]
2014-08-20 11:10   ` Oleksandr Tyshchenko
2014-08-20 13:00   ` Oleksandr Tyshchenko
2014-08-20 14:55     ` Julien Grall
2014-08-20 16:35       ` Oleksandr Tyshchenko

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=53F37E51.4050007@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=oleksandr.tyshchenko@globallogic.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.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).