[ECOS] RedBoot and eCos sharing Ethernet?

Grant Edwards grante@visi.com
Thu Mar 8 09:00:00 GMT 2001


On Thu, Mar 08, 2001 at 04:00:42PM +0000, Hugo 'NOx' Tyson wrote:
> 
> Grant Edwards <grante@visi.com> writes:
> > I'm still thinking about trying network debugging via RedBoot
> > .........
> > What I don't understand is how the Ethenet controller context
> > gets saved and restored in 4) and 5).
> 
> It doesn't do save/restore of ether controller contexts.
> 
> RedBoot uses the new instantiation of the driver, the one in the
> application, by means of intercalling vectors.  

Ah, _That's_ the bit I didn't understand.

> All that is hidden in the generic driver layer
> (io/eth/.../src/net/eth_drv.c and
> io/eth/.../src/stand_alone/eth_drv.c) sort of area.
> 
> Two things you might have missed:
> 
> a) RedBoot calls the poll() entry to the ether driver with
>    interrupts off.

I knew RedBoot called poll() -- what I didn't realize was that
RedBoot called poll() in the eCos application's copy of the
driver.

> b) Your driver *must* call back into the generic driver via
>    function pointers that are in the interface.  Not directly into
>    the generic eth_drv routine.  That's the only way RedBoot and
>    the app can share the driver.

That's something I will have to change if I want to do network
debugging.  I currently call eth_drv_recv() and
eth_drv_tx_done() directly.

> That's all I know about it.... ie. the driver writer's perspective.

Thanks. You've provided the missing piece.  I'm pretty sure I
can get network debugging working once I resolve the IP
problem.  For now, I'm going to have to switch back to eCos
application mode for a few weeks.

-- 
Grant Edwards
grante@visi.com



More information about the Ecos-discuss mailing list