RFI: Ethernet driver ported from Linux

Alan Garfield alan at fromorbit.com
Mon Apr 9 05:55:08 UTC 2007


Hello all!

I've got a couple of Sun Fire V20z (re-badged NewISys E2100) which have
little dedicated Service Processor on-board running Linux. The "SP" can
communicate via IPMI and also by Ethernet. It talks Ethernet to the SP
by using two small fifo buffers in the PRS via the LPC.

I have the GPL Linux source for the so-called 'jnet' Ethernet device. By
my reading of the code and the comments it's basically a small
Ethernet-looking driver that wraps around these 256 byte PRS buffers and
a single interrupt for events from each side of the PRS buffers.

-- FROM THE GPL DRIVER COMMENTS
 
Jnet is a ethernet adapter driver.  As such, it provides what appears
to be a typical ethernet adapter interface which the platform can use
to send/receive IP traffic to the SP.  The actual physical medium is
the PRS, which resides on the LPC bus, and provides two 256 byte fifo's
along with an interrupt and a status register.

When an interrupt is received, the status register can be read, which
will indicate either a Data Available (DAV), or a Data Acknowledge
(DAK). We can then choose to read or write data to the fifo, and thus
facilitate communication between the SP and Platform.

Because the fifo's provided by the PRS are only 256 bytes, our packet
size is limited.  As a result, the only feature we can't support is
DHCP, since a DHCP packet is 313 bytes.

--

I'd like to port/re-write this driver for FreeBSD but I cannot find
enough documentation and examples of a basic Ethernet driver for
FreeBSD. (if_wlan and if_ef look like good candidates but if_clone and
the miibus confuse me a bit and there isn't any clear docs on them)

Can someone point me in the direction of an example or the relevant man
pages I should be reading to help with this.

The device driver for Linux seems quite simple.

Any help would be gratefully appreciated.

Many thanks,

Alan Garfield.



More information about the freebsd-hackers mailing list