gen83xx ethernet transmit problem

David Brooke David.Brooke at 3t-ag.com
Fri Jun 5 10:31:20 UTC 2009


Hello,

I'm modifying the gen83xx BSP to suit a board with the MPC8343 CPU.
This board is already used elsewhere to run Linux and so I am
starting with a working U-Boot environment from which to load RTEMS.
Most things are now up and running, with very few changes needed to
the existing BSP, and the serial console is reliable. Ethernet
receive seems to work fine, although it has only had limited testing
due to this transmit problem.

I've spent some time investigating a problem with ethernet
transmitting corrupt data. From the viewpoint of the CPU (debug
prints and RTEMS shell memory dumps) all the data structures appear
to be correct and I'm now fairly sure that the problem is that the
data buffer is not being pushed out from cache to main memory before
the TSEC DMA transfer reads the data. A quick hack to create 2
buffer descriptors pointing to the same data buffer results in a
corrupt packet followed immediately by a correct packet. The corrupt
packet contains mostly the specific data with which I initialised
the heap but with a few bytes set to the correct data.

The TSEC driver sets both of the snoop enable bits (TBDSEN and
TDSEN) in the TSEC DMACTRL register and it seems that the BD are
being read correctly, but the actual data buffer is not correct. My
understanding is that setting these bits should ensure that the
buffer is pushed out of cache before the DMA transfer is allowed to
continue.

The ethernet works fine in U-Boot and I'm network loading the RTEMS
image.

I suspect that something is being misconfigured in the RTEMS BSP
initialisation (although mostly that just uses what U-Boot already
set up) but have not been able to find anything obviously wrong.

I would be grateful for any suggestions and can provide more
information if required.

Regards,

David




More information about the users mailing list