This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Send function segment buf address is invalid
- From: mkhoyila at uci dot edu
- To: ecos-discuss at sources dot redhat dot com
- Date: Tue, 2 Aug 2005 18:42:44 -0700 (PDT)
- Subject: [ECOS] Send function segment buf address is invalid
Upon completing the eth0 initialization, eCos calls my send function. This
is partial code of my mips send function. memcpy fails because the address
of sg_list->buf passed is invalid. I checked it and it is
Hex: FFFF FFFF 8007 98D6
Can someone help me to see why such invalid address is passed. Thanks.
Michael
for (last_sg = &sg_list[sg_len]; sg_list < last_sg; sg_list++) {
cyg_uint8 *from_p;
int l;
from_p = (cyg_uint8 *)(sg_list->buf); //invalid address here
l = sg_list->len;
if (l > total_len)
l = total_len;
memcpy((unsigned char *)to_p, from_p, l);
to_p += l;
total_len -= l;
if (total_len < 0)
continue; // Should exit via sg_last normally
}
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss