I'm trying to get the e1000 driver working on my MIPS target... I've
managed to hack it a bit so it works, but at least one of these hacks
looks like a workaround for a toolchain bug.
Attached to this message is the mixed-mode (source and assembly) dump
of one of the driver files.
Specifically, look at the code dealing with the variable
e1000_proc_dir; here is one example:
if(e1000_proc_dir == NULL)
53c: 3c020000 lui v0,0x0
540: 8c420000 lw v0,0(v0)
544: 1440000d bnez v0,57c <e1000_probe+0x44c>
548: 00000000 nop
Is it me, or is that wrong? load-upper-immediate with zero, then
load-word from that address? Clearly, v0 is _supposed_ to contain the
value of e1000_proc_dir based on the branch-compare instruction....
but this code just crashes.
In fact, all the references to e1000_proc_dir seem to use the same
lui/lw pair of instructions.
For reference e1000_proc_dir is an extern struct pointer. No compiler
warnings about it.
Before anyone asks, the assembly doesn't change when linked against
the code that actually declares the variable.
The toolchain I'm using is the one from oss.sgi.com by H.J. Liu
(toolchain-20011020-1). Because of the way the e1000 driver Makefile
works, I'm actually compiling it using the native compiler on-target.
Full source code available on request (I don't want to spam the list),
or directly from Intel. I'm using kernel 2.4.17 from CVS (plus the
patch I sent yesterday) with e1000 driver version 4.0.7
If this is user-error, I'd love to know what I'm doing wrong. If this
is a toolchain bug, who do I report this to?
Matthew D. Dharm Senior Software Designer
Momentum Computer Inc. 1815 Aston Ave. Suite 107
(760) 431-8663 X-115 Carlsbad, CA 92008-7310
Momentum Works For You www.momenco.com
Description: Binary data