xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Tyshchenko <oleksandr.tyshchenko@globallogic.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Tim Deegan <tim@xen.org>, Ian Campbell <ian.campbell@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] xen/tools: Introduce QNX IFS loader
Date: Wed, 20 Aug 2014 14:10:09 +0300	[thread overview]
Message-ID: <CAJEb2DGDLDz-PSGPMeg_4_qNhHiWX4Z17HrUm1s6v_hCSzhBjg@mail.gmail.com> (raw)
In-Reply-To: <53F37E51.4050007@linaro.org>

On Tue, Aug 19, 2014 at 7:41 PM, Julien Grall <julien.grall@linaro.org> wrote:
> Hi Oleksandr,

Hi Julien

>
> 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...

There is no commit ID. Version Control Systems are not used for QNX
Board Support Packages.
BSPs for particular board differ from one QNX SDP version to another
and shipped as archive.
What has been changed, for example, between two BSPs you can see in
Release Notes.

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

Yes, there is. Almost all information needed for QNX development I
find in www.qnx.com.
As for current questions there are detailed howto:
1. Writing an IPL Program:
http://www.qnx.com/developers/docs/6.4.1/neutrino/building/load_process.html
2. Building OS and Flash Images:
http://www.qnx.com/developers/docs/6.3.2/ide_en/user_guide/builder.html

Also, you can find IPL code in almost all BSPs you download from:
http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/BSPAndDrivers

Although the current patch based on IPL from TI OMAP5432 EVM BSP,
but IPL code from different BSPs are similar (in parts of code
responsible for load image).
http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/TexasInstrumentsOMAP5432EVM
I only dropped checksum verification during image scan step to improve
boot time. But, I will
be able to restore it if needed.

>
> [..]
>
>> 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.

ok

>
>
>> +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 ( ... )

ok

>
>
>> +    {
>> +        startup_hdr = (struct startup_header *)start_addr;
>
>
> AFAIU, QNX loader is only for 32 bits guest, right?

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.

I got it. I will think about it.

>
> [..]
>
>
>> +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 ( ... )

ok

>
> Regards,
>
> --
> Julien Grall



-- 

Oleksandr Tyshchenko | Embedded Dev
GlobalLogic
www.globallogic.com

  reply	other threads:[~2014-08-20 11:10 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
2014-08-20 11:10   ` Oleksandr Tyshchenko [this message]
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=CAJEb2DGDLDz-PSGPMeg_4_qNhHiWX4Z17HrUm1s6v_hCSzhBjg@mail.gmail.com \
    --to=oleksandr.tyshchenko@globallogic.com \
    --cc=ian.campbell@citrix.com \
    --cc=julien.grall@linaro.org \
    --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).