Subject: RE: PCI device interface and interrupts
To: 'Manuel Bouyer' <bouyer@antioche.lip6.fr>
From: Marc Lanoue <mlanoue@hyperchip.com>
List: tech-kern
Date: 09/20/2000 16:41:17
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C02343.1FEF2080
Content-Type: text/plain;
	charset="iso-8859-1"

I don't want to port anything.  As a matter of fact, I have the whole IP
stack in hands (IP, UDP, sockets, etc.), so I don't want to use the existing
one from the NetBSD kernel.  So at this point for me, it's a question of
knowing what is the easiest solution to interface with an Ethernet card that
is plugged on the PCI bus.  It's simply a question of being able to use the
PCI card as it is done through the device driver.  Ultimately, there will be
no Ethernet card configured in the kernel once it will be reconfigured,
compiled and started all over again.  But, is that possible to do for what I
want to validate (i.e., interface my own IP stack with an Ethernet PCI
card).  In that case, how can I use the same Ethernet card?  What is the
simplest way to interface with it?  Am I allowed to interface with the DMA,
I/O and PCI bus from what would probably be an application running my own IP
stack?

Thanks a lot for your time and cooperation Manuel, it's appreciated.  I'm
really confused with NetBSD as it doesn't have (unless I'm wrong once again)
any "generic" interface to access the bus, interrupt control and PCI
interface functions in general libraries.  But since I'm a newbie with
NetBSD maybe I'm wrong on that side too.

Marc

-----Original Message-----
From: Manuel Bouyer [mailto:bouyer@antioche.lip6.fr]
Sent: Wednesday, September 20, 2000 4:20 PM
To: Marc Lanoue
Cc: NetBSD Technical Kernel group (E-mail)
Subject: Re: PCI device interface and interrupts


On Wed, Sep 20, 2000 at 03:40:13PM -0400, Marc Lanoue wrote:
> I want to validate some IP stack functions by using a PCI Ethernet card
> plugged into my computer.  So, I don't want to create a new device driver,
> nor do I want to add certain IP protocol functionalities, I just want to
> validate some code that I have and that will talk to another Ethernet
device
> using the PCI Ethernet card I have as the link with the other server.
I've
> looked at the device driver source code to extract the useful functions
that
> I wanted.  But now, since I'm kind of new with NetBSD, is there is simpler
> way to interface with the PCI Ethernet card than looking at the device
> driver source code to extract the I/O functions that I need?   

I don't really understand what you want to do here. Is it about porting a
device driver to another OS than NetBSD, or what ?

The input routines of an ethernet driver are the callbacks set in the
if_start and if_ioctl members of the struct ifnet.

--
Manuel Bouyer <bouyer@antioche.eu.org>
--

------_=_NextPart_001_01C02343.1FEF2080
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: PCI device interface and interrupts</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>I don't want to port anything.&nbsp; As a matter of =
fact, I have the whole IP stack in hands (IP, UDP, sockets, etc.), so I =
don't want to use the existing one from the NetBSD kernel.&nbsp; So at =
this point for me, it's a question of knowing what is the easiest =
solution to interface with an Ethernet card that is plugged on the PCI =
bus.&nbsp; It's simply a question of being able to use the PCI card as =
it is done through the device driver.&nbsp; Ultimately, there will be =
no Ethernet card configured in the kernel once it will be reconfigured, =
compiled and started all over again.&nbsp; But, is that possible to do =
for what I want to validate (i.e., interface my own IP stack with an =
Ethernet PCI card).&nbsp; In that case, how can I use the same Ethernet =
card?&nbsp; What is the simplest way to interface with it?&nbsp; Am I =
allowed to interface with the DMA, I/O and PCI bus from what would =
probably be an application running my own IP stack?</FONT></P>

<P><FONT SIZE=3D2>Thanks a lot for your time and cooperation Manuel, =
it's appreciated.&nbsp; I'm really confused with NetBSD as it doesn't =
have (unless I'm wrong once again) any &quot;generic&quot; interface to =
access the bus, interrupt control and PCI interface functions in =
general libraries.&nbsp; But since I'm a newbie with NetBSD maybe I'm =
wrong on that side too.</FONT></P>

<P><FONT SIZE=3D2>Marc</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Manuel Bouyer [<A =
HREF=3D"mailto:bouyer@antioche.lip6.fr">mailto:bouyer@antioche.lip6.fr</=
A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, September 20, 2000 4:20 PM</FONT>
<BR><FONT SIZE=3D2>To: Marc Lanoue</FONT>
<BR><FONT SIZE=3D2>Cc: NetBSD Technical Kernel group (E-mail)</FONT>
<BR><FONT SIZE=3D2>Subject: Re: PCI device interface and =
interrupts</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>On Wed, Sep 20, 2000 at 03:40:13PM -0400, Marc Lanoue =
wrote:</FONT>
<BR><FONT SIZE=3D2>&gt; I want to validate some IP stack functions by =
using a PCI Ethernet card</FONT>
<BR><FONT SIZE=3D2>&gt; plugged into my computer.&nbsp; So, I don't =
want to create a new device driver,</FONT>
<BR><FONT SIZE=3D2>&gt; nor do I want to add certain IP protocol =
functionalities, I just want to</FONT>
<BR><FONT SIZE=3D2>&gt; validate some code that I have and that will =
talk to another Ethernet device</FONT>
<BR><FONT SIZE=3D2>&gt; using the PCI Ethernet card I have as the link =
with the other server.&nbsp; I've</FONT>
<BR><FONT SIZE=3D2>&gt; looked at the device driver source code to =
extract the useful functions that</FONT>
<BR><FONT SIZE=3D2>&gt; I wanted.&nbsp; But now, since I'm kind of new =
with NetBSD, is there is simpler</FONT>
<BR><FONT SIZE=3D2>&gt; way to interface with the PCI Ethernet card =
than looking at the device</FONT>
<BR><FONT SIZE=3D2>&gt; driver source code to extract the I/O functions =
that I need?&nbsp;&nbsp; </FONT>
</P>

<P><FONT SIZE=3D2>I don't really understand what you want to do here. =
Is it about porting a</FONT>
<BR><FONT SIZE=3D2>device driver to another OS than NetBSD, or what =
?</FONT>
</P>

<P><FONT SIZE=3D2>The input routines of an ethernet driver are the =
callbacks set in the</FONT>
<BR><FONT SIZE=3D2>if_start and if_ioctl members of the struct =
ifnet.</FONT>
</P>

<P><FONT SIZE=3D2>--</FONT>
<BR><FONT SIZE=3D2>Manuel Bouyer &lt;bouyer@antioche.eu.org&gt;</FONT>
<BR><FONT SIZE=3D2>--</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C02343.1FEF2080--