vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.

4 messages Options
Embed this post
Permalink
Gabi Voiculescu

vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.

Reply Threaded More More options
Print post
Permalink
Hello again.

When using okl4 2.1. vtimer on an arm based platform (armv5, armv6) when running drivers iguana example I saw an overflow in the displayed time, every 6th frame or so.

I traced this back to buld/iguana/include/interfaces/vtimer_serverloop.c where for the handle_virtual_timer_request() and handle_virtual_timer_current_time() the autogenerated code

The magpie_(un)marshal_int32 is used instead of it's 64bit counterpart. Is there an easy fix for the magpie stuff to make it generate magpie_(un)marshal_int64 instead of ..._int32?

For now I will attempt to manually fix after each new build lines 68-70 and 99-101 from:


magpie_marshal_int32((uint32_t)__return, &mr[4]);  -----------> magpie_marshal_int64((uint64_t)__return, &mr[4]);
/* Return number of return MRs used */
*((L4_Word_t *)(void *)(&mr[0])) = 1 + 1;   ----------> *((L4_Word_t *)(void *)(&mr[0])) = 1 + 2;


Thank you,
Gabi Voiculescu




_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Josh Matthews

Re: vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.

Reply Threaded More More options
Print post
Permalink
Hi Gabi,

On Mon, January 19, 2009 4:17 pm, Gabi Voiculescu wrote:

> When using okl4 2.1. vtimer on an arm based platform (armv5, armv6) when
> running drivers iguana example I saw an overflow in the displayed time,
> every 6th frame or so.
>
> I traced this back to buld/iguana/include/interfaces/vtimer_serverloop.c
> where for the handle_virtual_timer_request() and
> handle_virtual_timer_current_time() the autogenerated code
>
> The magpie_(un)marshal_int32 is used instead of it's 64bit counterpart. Is
> there an easy fix for the magpie stuff to make it generate
> magpie_(un)marshal_int64 instead of ..._int32?

Are you using the original release of 2.1, or the later-released
2.1.1-fix.7 (available at http://wiki.ok-labs.com/PreviousReleases)?

There was a known problem with Magpie and 64-bit data types, but it was
fixed in that version - I think this may be related.

> For now I will attempt to manually fix after each new build lines 68-70
> and 99-101 from:
>
>
> magpie_marshal_int32((uint32_t)__return, &mr[4]);  ----------->
> magpie_marshal_int64((uint64_t)__return, &mr[4]);
> /* Return number of return MRs used */
> *((L4_Word_t *)(void *)(&mr[0])) = 1 + 1;   ---------->  *((L4_Word_t
> *)(void *)(&mr[0])) = 1 + 2;
>

Best regards,
Josh


_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Gabi Voiculescu

Re: vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.

Reply Threaded More More options
Print post
Permalink
Hi.

I am using the original okl4 2.1.

I will see what are the changes in the fixed version.

Thank you,
Gabi

--- On Tue, 1/20/09, Josh Matthews <[hidden email]> wrote:
From: Josh Matthews <[hidden email]>
Subject: Re: [okl4-developer] vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.
To: "Gabi Voiculescu" <[hidden email]>
Cc: [hidden email]
Date: Tuesday, January 20, 2009, 1:01 AM

Hi Gabi,

On Mon, January 19, 2009 4:17 pm, Gabi Voiculescu wrote:

> When using okl4 2.1. vtimer on an arm based platform (armv5, armv6) when
> running drivers iguana example I saw an overflow in the displayed time,
> every 6th frame or so.
>
> I traced this back to buld/iguana/include/interfaces/vtimer_serverloop.c
> where for the handle_virtual_timer_request() and
> handle_virtual_timer_current_time() the autogenerated code
>
> The magpie_(un)marshal_int32 is used instead of it's 64bit
counterpart. Is
> there an easy fix for the magpie stuff to make it generate
> magpie_(un)marshal_int64 instead of ..._int32?

Are you using the original release of 2.1, or the later-released
2.1.1-fix.7 (available at http://wiki.ok-labs.com/PreviousReleases)?

There was a known problem with Magpie and 64-bit data types, but it was
fixed in that version - I think this may be related.

> For now I will attempt to manually fix after each new build lines 68-70
> and 99-101 from:
>
>
> magpie_marshal_int32((uint32_t)__return, &mr[4]);  ----------->
> magpie_marshal_int64((uint64_t)__return, &mr[4]);
> /* Return number of return MRs used */
> *((L4_Word_t *)(void *)(&mr[0])) = 1 + 1;   ---------->
*((L4_Word_t
> *)(void *)(&mr[0])) = 1 + 2;
>

Best regards,
Josh



_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer
Joshua Root

Re: vserial_serverloop.c generates bad code for (u)int64_t variables in okl4 2.1.

Reply Threaded More More options
Print post
Permalink
Gabi Voiculescu wrote:
> Hi.
>
> I am using the original okl4 2.1.
>
> I will see what are the changes in the fixed version.

You probably want 2.1.1-patch.9 BTW, which has some more fixes compared
to 2.1.1-fix.7.

<http://wiki.ok-labs.com/downloads/release-2.1.1-patch.9/>

- Josh

_______________________________________________
Developer mailing list
[hidden email]
https://lists.okl4.org/mailman/listinfo/developer