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

Problems with init_all_network_interfaces


Hi,


I'm currently writing an ethernet driver for the RealTek 8139 on an Equator Dolphin board (this is an evaluation board for Equator's VLIW RISC/DSP hybrid). To test the driver I have decided to use the test programs in net/common/tests. Unfortunately, all the programs I've tried to use crash somewhere within the function init_all_network_interfaces. My debug output looks like this (this is ping_test):

[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'rltk8139_eth0'
RealTek 8139 init
Looking for RealTek 8139 chip #0
Found 0th RealTek 8139 device on bus 0, devfn 0x50:
 Wired to HAL interrupt vector 10
8139 was successfully reset.
eth0 XXX: driver didn't set ifq_maxlen
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
IFP: 0x80176fb0, next: 0x802f5a58
IFP: 0x802f5a58, next: 0x00000000
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x8017b260)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x8017a220)
New domain route at 0x00000000
[cyg_net_init] Init: cyg_route_init(0x00000000)
[cyg_net_init] Done
Start PING test
eti_dummy_cl_handler(): cl=0, cesr[masked]=0x00000001
 current interrupt nesting level = 1
DTLB miss at PC=0x800bdbf8, vaddr=0x0000000c (cluster 0)

On the hardware I'm using, the last line basically means that an
instruction at 0x800bdf8 attempted to access an unmapped memory
area. 'addr2line' claims this is within the 'ioctl' function.

I'm fairly certain this crash has nothing to do with my own driver,
since the same error occurs without my driver code present (my
driver is currently not an eCos package, but simply a C source file
that is linked with the test program), and all my driver functions
have a 'diag_printf' as the beginning that never show up on my console).

My question is - does anyone know/have an idea what I'm doing wrong
here ? I've manually added the following #defines to my pkgconf/net.h
(since my driver is not a package and does not set these during
configuration):

#define CYGHWR_NET_DRIVERS 1
#define CYGHWR_NET_DRIVERS_1
#define CYGHWR_NET_DRIVER_ETH0 1
#define CYGHWR_NET_DRIVER_ETH0_ADDRS_IP 10.0.2.127
#define CYGHWR_NET_DRIVER_ETH0_ADDRS_NETMASK 255.0.0.0
#define CYGHWR_NET_DRIVER_ETH0_ADDRS_BROADCAST 10.255.255.255
#define CYGHWR_NET_DRIVER_ETH0_ADDRS_GATEWAY 10.0.1.10
#define CYGHWR_NET_DRIVER_ETH0_ADDRS_SERVER 10.0.2.109

Is there something else missing that I have to define in pkgconf or
elsewhere ?

P.S.: The version of eCos I'm using was supplied by Equator (the vendor of our hardware). It seems to be a pre-release 2.0 (the last ChangeLog entry in <>/packages is from 2002-11-25). It would probably
be possible to simply copy the appropriate HAL package to a release
2.0 eCos and test that; however I'd like to avoid this unless there are
known issues in the networking code that have since been resolved.
(A quick diff with the 2.0 release doesn't show any differences in the
networking code, so I don't really think this is the case).
--
--------------------------------------------------------------------
| Eric Doenges | DynaPel Laboratories GmbH |
| Tel: +49 89 962428 23 | Fraunhoferstrasse 9/2 |
| Fax: +49 89 962428 90 | D - 85737 Ismaning, Germany |
--------------------------------------------------------------------



-- Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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