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]

Re: Problems with init_all_network_interfaces


On Thu, Jul 10, 2003 at 05:21:33PM +0200, Eric Doenges wrote:
> 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.

vaddr=0x0000000c

I guess this is the address its trying to access. This looks like its
trying to dereference a pointer to a structure and the pointer is
NULL.

You say its in ioctl. Hum...

io.cxx:

__externC int ioctl( int fd, CYG_ADDRWORD com, CYG_ADDRWORD data )
{
    FILEIO_ENTRY();
 
    int ret;
    cyg_file *fp;
    
    fp = cyg_fp_get( fd );
 
    if( fp == NULL )
        FILEIO_RETURN(EBADF);
 
    LOCK_FILE( fp );
    
    ret = fp->f_ops->fo_ioctl( fp, com, data );


fileio.h:

struct CYG_FILEOPS_TAG
{
    cyg_fileop_read     *fo_read;
    cyg_fileop_write    *fo_write;
    cyg_fileop_lseek    *fo_lseek;
    cyg_fileop_ioctl    *fo_ioctl;

so fo_ioctl will be at offset 0x0c in f_ops.

So you need to work out why this fd does not have an ioctl handler. I
would put some diag_printf's into init_all_network_interfaces() and
work out which ioctl is failing. You can then work out how the fd was
created and what its supposed to be. Then work out why it does not
have an ioctl handler.  

     Andrew

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