Subject: PCI device interface and interrupts
To: NetBSD Technical Kernel group (E-mail) <tech-kern@netbsd.org>
From: Marc Lanoue <mlanoue@hyperchip.com>
List: tech-kern
Date: 09/20/2000 15:40:13
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_01C0233A.98705D70
Content-Type: text/plain;
	charset="iso-8859-1"

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?   

For me (up to now at least), I think that there is no "generic" way of
communicating with an Ethernet device of that type.  Am I wrong?   Are there
generic functions that are part of some libraries that can be used to access
the PCI bus, and the I/O memory space?

And last, if I have to copy and paste some of the device driver source code
to be able to use the Ethernet device to validate my code, then, how to I
insert an interrupt handler into the kernel?  Once again, are there any
"generic" functions that can be used to link my own interrupt handling
routine to the existing ones?

Thanks a lot for the time you'll take to answer my questions, it's
appreciated.

Marc Lanoue 


------_=_NextPart_001_01C0233A.98705D70
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>PCI device interface and interrupts</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I want to validate some IP stack =
functions by using a PCI Ethernet card plugged into my computer.&nbsp; =
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.&nbsp; I've =
looked at the device driver source code to extract the useful functions =
that I wanted.&nbsp; 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?&nbsp;&nbsp; </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">For me (up to now at least), I think =
that there is no &quot;generic&quot; way of communicating with an =
Ethernet device of that type.&nbsp; Am I wrong?&nbsp;&nbsp; Are there =
generic functions that are part of some libraries that can be used to =
access the PCI bus, and the I/O memory space?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">And last, if I have to copy and paste =
some of the device driver source code to be able to use the Ethernet =
device to validate my code, then, how to I insert an interrupt handler =
into the kernel?&nbsp; Once again, are there any &quot;generic&quot; =
functions that can be used to link my own interrupt handling routine to =
the existing ones?</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Thanks a lot for the time you'll take =
to answer my questions, it's appreciated.</FONT>
</P>

<P><B><FONT SIZE=3D4 FACE=3D"Times New Roman">Marc Lanoue<BR>
</FONT></B>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C0233A.98705D70--