[U-Boot-Users] Ethner RxBd init problem

Hi All: I have 8260 based board and am using u-boot for that. I boot kernel from the flash. All works fine however sometimes Linux Kernel does not boot after uncompressing, further investigation found that as the kernel entry point is address 0, and that is also address of netRxPackets, if a packet is received after the kernel is unzipped by u-boot, ethernet driver corrupts data at address 0 thinking it as its buffer pointer. Hence kernel does not boot up in that case. My first question is that why we dont initialize netRxPackets in net.c?? (these are only initialized once a network related operation (like ping) is done). Is this the corect behaviour?? has anyone observed this problem??
Thanks
Dave.
__________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html

Dear Dave,
in message 20040412213638.57633.qmail@web21412.mail.yahoo.com you wrote:
I have 8260 based board and am using u-boot for that. I boot kernel from the flash. All works fine however sometimes Linux Kernel does not boot after uncompressing, further investigation found that as the kernel entry point is address 0, and that is also address of netRxPackets, if a packet is received after
You are wrong here. NetRxPackets[] is definitely NOT located at address 0.
the kernel is unzipped by u-boot, ethernet driver corrupts data at address 0 thinking it as its buffer pointer. Hence kernel does not boot up in that case.
No, no, no.
My first question is that why we dont initialize netRxPackets in net.c?? (these are only initialized once a network related operation (like ping) is done).
U-Boot uses the network only when a network related operation is in progress, so why should we waste memory for buffers when they are not needed?
Is this the corect behaviour?? has anyone observed this problem??
This is correct behaviour. It works perfectly find on all boards I was able to test.
You are on the wrong track.
Best regards,
Wolfgang Denk

Wolf: Thanks. All 4 entries in the array of netRxPackets are ponting to address 0.
Here is what happens: Normal data at addr 0 after unzipping/uncompressing kernel: 00000000 : 60000000 60000000 60000000 7f9f42a6 `...`...`.....B. 00000010 : 3fa08081 63bd1014 7c1ce800 4082001c ?...c...|...@...
At this point netRxPacket is pointing to addr 0, all four rxbd are pointing to buaddr of 0.
Data at addr 0, becuase of corruption by ether driver:
00000000 : ffffffff ffff00b0 d0e19595 08060001 ................ 00000010 : 08000604 000100b0 d0e19595 ac100854 ...............T 00000020 : 00000000 0000ac10 08190000 00000000 ................
From this it is clear that addr 0 is used as RXBD by
ethernet dirver.
If I do a ping, all netRxPackets are inited to proper values, and everything works fine.
Thanks Dave.
--- Wolfgang Denk wd@denx.de wrote:
Dear Dave,
in message 20040412213638.57633.qmail@web21412.mail.yahoo.com you wrote:
I have 8260 based board and am using u-boot for
that.
I boot kernel from the flash. All works fine
however
sometimes Linux Kernel does not boot after uncompressing, further investigation found that as
the
kernel entry point is address 0, and that is also address of netRxPackets, if a packet is received
after
You are wrong here. NetRxPackets[] is definitely NOT located at address 0.
the kernel is unzipped by u-boot, ethernet driver corrupts data at address 0 thinking it as its
buffer
pointer. Hence kernel does not boot up in that
case.
No, no, no.
My first question is that why we dont initialize netRxPackets in net.c?? (these are only
initialized
once a network related operation (like ping) is
done).
U-Boot uses the network only when a network related operation is in progress, so why should we waste memory for buffers when they are not needed?
Is this the corect behaviour?? has anyone
observed
this problem??
This is correct behaviour. It works perfectly find on all boards I was able to test.
You are on the wrong track.
Best regards,
Wolfgang Denk
-- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de You got to learn three things. What's real, what's not real, and what's the difference." - Terry Pratchett, _Witches Abroad_
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
__________________________________ Do you Yahoo!? Yahoo! Tax Center - File online by April 15th http://taxes.yahoo.com/filing.html

In message 20040412220906.81551.qmail@web21407.mail.yahoo.com you wrote:
All 4 entries in the array of netRxPackets are ponting to address 0.
When are you looking at them? They are only valid (and used) when a network transfer is running.
At this point netRxPacket is pointing to addr 0, all four rxbd are pointing to buaddr of 0.
If you don't use the network at all, or after completing the network activity the ethernet interface should be disabled (see fec_halt() resp. eth_halt()).
Best regards,
Wolfgang Denk
participants (2)
-
Dave Johnson
-
Wolfgang Denk