Re: Aligned operations mismatch

2018-09-03 Thread Chris Johns
On 24/8/18 4:32 am, Mikhail Svetkin wrote:
> Yes, I use the legacy network stack (I did not know it is legacy, Do you have
> any plans to remove it from source?).

There are no concrete plans however Joel and I have discussed moving the legacy
stack to a separate repo to provide long term support. We understand we have
slow moving users.

We also understand the complexity separate repos brings to our users and to the
development of RTEMS. I think our ecosystem will need to address this after
RTEMS 5 is released.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Aligned operations mismatch

2018-08-23 Thread Mikhail Svetkin
Yes, I use the legacy network stack (I did not know it is legacy, Do you
have any plans to remove it from source?).

I will create the ticket and I will send the patch.

Best regards,
Mikhail


On Thu, 23 Aug 2018 at 07:33, Sebastian Huber <
sebastian.hu...@embedded-brains.de> wrote:

> On 23/08/18 07:29, Sebastian Huber wrote:
> > Hello,
> >
> > On 22/08/18 16:49, Mikhail Svetkin wrote:
> >> Hi all,
> >>
> >> I have found a problem with assembler code generation in network
> >> stack on ARM processor (aligment fault).
> >>
> >> I am using:
> >> arm-rtems5-gcc (GCC) 7.2.0 20170814 (RTEMS 5, RSB
> >> a6d011e028a0776cedf0823940eb882e917a44e5, Newlib 2.5.0.20170922)
> >>
> >> The compiler generates invalid instruction 'ldmia' here
> >> (
> https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/udp_usrreq.c#n160
> ).
> >>
> >> The instruction does not support unaligned accesses.
> >>
> >> Also i have found the bug fix in FreeBSD repository
> >> (
> https://github.com/freebsd/freebsd/commit/6cc0e8d2a0b583db5707f811d4ebfbe1ad05e628
> )
> >
> > this is a three year old commit. Which libbsd version do you use? This
> > fix is included in the libbsd 4.11 and master branch.
> >
>
> Oh, I should have read the URL more carefully. You use the legacy
> network stack. Please open a ticket for this.
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax : +49 89 189 47 41-09
> E-Mail  : sebastian.hu...@embedded-brains.de
> PGP : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Aligned operations mismatch

2018-08-22 Thread Sebastian Huber

On 23/08/18 07:29, Sebastian Huber wrote:

Hello,

On 22/08/18 16:49, Mikhail Svetkin wrote:

Hi all,

I have found a problem with assembler code generation in network 
stack on ARM processor (aligment fault).


I am using:
arm-rtems5-gcc (GCC) 7.2.0 20170814 (RTEMS 5, RSB 
a6d011e028a0776cedf0823940eb882e917a44e5, Newlib 2.5.0.20170922)


The compiler generates invalid instruction 'ldmia' here 
(https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/udp_usrreq.c#n160).


The instruction does not support unaligned accesses.

Also i have found the bug fix in FreeBSD repository 
(https://github.com/freebsd/freebsd/commit/6cc0e8d2a0b583db5707f811d4ebfbe1ad05e628)


this is a three year old commit. Which libbsd version do you use? This 
fix is included in the libbsd 4.11 and master branch.




Oh, I should have read the URL more carefully. You use the legacy 
network stack. Please open a ticket for this.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: Aligned operations mismatch

2018-08-22 Thread Amaan Cheval
On Wed, Aug 22, 2018 at 8:20 PM Mikhail Svetkin
 wrote:
>
> Hi all,
>
> I have found a problem with assembler code generation in network stack on ARM 
> processor (aligment fault).
>
> I am using:
> arm-rtems5-gcc (GCC) 7.2.0 20170814 (RTEMS 5, RSB 
> a6d011e028a0776cedf0823940eb882e917a44e5, Newlib 2.5.0.20170922)
>
> The compiler generates invalid instruction 'ldmia' here 
> (https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/udp_usrreq.c#n160).
>
> The instruction does not support unaligned accesses.
>
> Also i have found the bug fix in FreeBSD repository 
> (https://github.com/freebsd/freebsd/commit/6cc0e8d2a0b583db5707f811d4ebfbe1ad05e628)
>
> I tried their solution and it works.
>

Do you mean you changed the alignment to 2 in RTEMS'
cpukit/libnetworking/netinet/ip.h:85?
https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/ip.h#n85

If yes, and if you could confirm it worked / tests passed, feel free
to submit a patch: https://devel.rtems.org/wiki/Developer/Contributing

If not, a ticket with all the information is highly appreciated too!

P.S. - I believe this is a part of the "old" networking stack for
RTEMS - the "new" stack uses rtems-libbsd, which already includes the
FreeBSD patch you mentioned:
https://github.com/RTEMS/rtems-libbsd/blob/master/freebsd/sys/netinet/ip.h#L70

Perhaps someone can shed some light on when the old stack can be used
vs. the new one, and how - I haven't seen much documentation on it.
Patch fixes for the old stack should likely still be accepted while
there are still BSPs using it.

> Should I create a ticket for that?
>
> Best regards,
> Mikhail
> ___
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Aligned operations mismatch

2018-08-22 Thread Sebastian Huber

Hello,

On 22/08/18 16:49, Mikhail Svetkin wrote:

Hi all,

I have found a problem with assembler code generation in network stack 
on ARM processor (aligment fault).


I am using:
arm-rtems5-gcc (GCC) 7.2.0 20170814 (RTEMS 5, RSB 
a6d011e028a0776cedf0823940eb882e917a44e5, Newlib 2.5.0.20170922)


The compiler generates invalid instruction 'ldmia' here 
(https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/udp_usrreq.c#n160).


The instruction does not support unaligned accesses.

Also i have found the bug fix in FreeBSD repository 
(https://github.com/freebsd/freebsd/commit/6cc0e8d2a0b583db5707f811d4ebfbe1ad05e628)


this is a three year old commit. Which libbsd version do you use? This 
fix is included in the libbsd 4.11 and master branch.


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Aligned operations mismatch

2018-08-22 Thread Mikhail Svetkin
Hi all,

I have found a problem with assembler code generation in network stack on
ARM processor (aligment fault).

I am using:
arm-rtems5-gcc (GCC) 7.2.0 20170814 (RTEMS 5, RSB
a6d011e028a0776cedf0823940eb882e917a44e5, Newlib 2.5.0.20170922)

The compiler generates invalid instruction 'ldmia' here (
https://git.rtems.org/rtems/tree/cpukit/libnetworking/netinet/udp_usrreq.c#n160
).

The instruction does not support unaligned accesses.

Also i have found the bug fix in FreeBSD repository (
https://github.com/freebsd/freebsd/commit/6cc0e8d2a0b583db5707f811d4ebfbe1ad05e628
)

I tried their solution and it works.

Should I create a ticket for that?

Best regards,
Mikhail
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel