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

Re: [Xen-devel] [PATCH] xen/tools: Introduce QNX IFS loader



On Tue, Aug 19, 2014 at 7:41 PM, Julien Grall <julien.grall@xxxxxxxxxx> 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

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.