Zynq BSP progress
claus at slac.stanford.edu
Fri Apr 12 02:43:22 UTC 2013
On Apr 11, 2013, at 12:49 PM, Claus, Ric wrote:
> I am getting close to being comfortable with letting my RTEMS 4.11 BSP for Xilinx Zynq-based boards out into the wild. However, I am still facing a few problems.
> The first is that the network driver continues to be unstable. The latest issue seems to be due to the fact that the DMA engine absconds with the lower two bits of the buffer address to indicate ownership and the ring buffer wrap point, so the minimum buffer alignment granularity is a longword. Because an ethernet header is 14 bytes long, this forces the data payload of a received buffer to be word (16 bit) aligned. For reasons I have yet to understand, this is not a problem for small payloads, but for larger ones (~500+ bytes, I think) I get alignment exceptions in udp_input(). Has anyone encountered this and know what to do about it?
> The second is that neither DHCP nor NFS seems to work. Still have to figure out why. This is based on results with the network-demos package.
The above issues appear to be due to the same problem. The specific code where the problem occurs is in udp_input at the line (159 in the git head of udp_usrreq.c):
* Save a copy of the IP header in case we want restore it
* for sending an ICMP error message in response.
save_ip = *ip;
ip doesn't point to the 14 byte ethernet header, but just past it because the the arguments given to ether_input() provide the frame as per the ether_input() man page comment: "The frame is in the mbuf chain without the ether_header structure, which is provided separately." If one comments this line out or subtracts iphlen from the ip pointer, things seem to work correctly.
Does anyone have any comments or suggestions on the proper way to fix this?
More information about the devel