This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: eCos for MPC55xx


As I said before, the IP-addresses(src/dst) has no fixed offset in the several protocol-headers!
That means the IP-addresses in the ARP-Header(14) have a different offset as in the IP-Header(12) and so I can't belive the TCP/IP stack regards this.

The exception is generated by the TCP/IP stack handling a ARP message! So this is ecos code!

Doing my patch(as described before) everything works fine!

And my question was?
Anybody else have/has the same problem using a powerpc?
And their solutions.


Jochen

-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch] 
Sent: Donnerstag, 6. Juli 2006 12:16
To: Gerster Jochen-B01096
Cc: Andrew Lunn
Subject: Re: eCos for MPC55xx

On Thu, Jul 06, 2006 at 09:56:07AM +0200, Gerster Jochen-B01096 wrote:
> Hi Andrew
> 
> Ok so lets start with the memcpy problem, while I take care of the Copyright assignment.
> Perhaps a new thread?
> 
> The problem is:
> The POWERPC gcc compiler (allocated from the ecos site)  optimize 
> memcpy calls with small length, instead it uses its own inline 
> function without taking care of aligned access. This is a very very 
> big problem using the TCP/IP stack because the IP-address is 4byte so 
> the gcc optimize and the offset of the IP-address in the different 
> protocol-headers varies. This ends in a exception :(

The network stack is so setup so that IP addresses in packets are always aligned. So there should not be a problem. Is this user code, or eCos code which is causing problems. If you use char *, not int *, memcpy will be careful and not assume word alignment.

       Andrew


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]