This is the mail archive of the ecos-discuss@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]

Send function segment buf address is invalid]


Let me clarify, ingore my previous values. I made mistake on values
supplied. A sample run values are as follows:

sg_list->buf address is at: 0x80079956 (assigned to from_p)
sg_list->len is 42 (decimal)
txBufds address is at: 0x9f838 (this is a physical address, assigned to to_p)

This line "memcpy((unsigned char *)to_p, from_p, l);" is failing and does
not proceed to next instruction.

I used kmalloc to acquire memory space for rx and tx dma buffers. Any help
is appreciated. Thanks.

Michael

BTW: Thanks for earlier prompt respones. Your help has gotton my project
further ahead.

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


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