[ECOS] Custom network driver for dual processor platform

Reginald Deschrijver reginald.deschrijver@telenet.be
Sat Apr 15 23:17:00 GMT 2006


Hi all,

I'm trying to write a ethernet device driver for eCos, but this isn't a driver in the "traditional" sense;

I'm working on an embedded platform with 2 processors, the main one (ARM9) running eCos, and a subprocessor (ARM7).

The ARM7 is the only processor having access to the network device.
The network device driver for the ARM7 is ready, meaning that it transmits whatever you send it, the ARM7 can signal to the ARM9 that the hardware is receiving a packet, the ARM9 can signal to the ARM7 to start up the network device, etc.

So right now I'm writing a small ethernet driver stub for eCos, so it can talk to the network device via the ARM7.

However, when looking at the "deliver" function, it seems to be working with interrupts, and I'm not sure about the "poll" function..

The ARM9 has a "communication fifo interrupt", which gets triggered when the ARM7 sends a 32bit word to the ARM9.
Because there are more devices running on the ARM7 (such as sound, etc), the communication fifo is not limited to the network device alone.

The ideal structure I have in mind is that when I receive a "network device received a packet" message from the communication fifo, I would let this know to eCos, and eCos can pick it up from there.

I don't know how to do this, or what functios to call to notify eCos that the network device has received a packet..

And also, for example the recv function:

static void
HRDWR_recv(
	struct eth_drv_sc *sc,
	struct eth_drv_sg *sg_list, int sg_len)

uses eth_drv_* structures. How would I fill those in from my communication fifo handler, when I have just received the "network device received a packet" message?

Maybe someone can help me about this?

Thanks in advance,
 Reginald.



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



More information about the Ecos-discuss mailing list