Skip to contentSkip to conversation

Ethner RxBd init problem

U-Boot-Users Dave Johnson 2 participants 4 messages Apr 12, 2004

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

Dear Dave,

Quoted 7 lines · in message <[email protected]> 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.

Quoted 3 lines

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.

Quoted 3 lines

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?

Quoted 2 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
You got to learn three things. What's  real,  what's  not  real,  and
what's the difference."           - Terry Pratchett, _Witches Abroad_
#2 lore raw

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 ...

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
................

#3 lore raw
Quoted 3 lines · In message <[email protected]> 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.

Quoted 2 lines

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

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"'Tis true, 'tis pity, and pity 'tis 'tis true."
    - Poloniouius, in Willie the Shake's _Hamlet, Prince of Darkness_