NetBSD device driver for the NVIDIA nForce MCP Networking Adapter
Copyright (c) 2003,2004 - Quinton Dolan firstname.lastname@example.org
Copyright (c) 2005 - William S. Morgart email@example.com
This document describes the NetBSD port of the FreeBSD nvnet device
driver written by Quinton Dolan. The home page for the FreeBSD nvnet
device driver is: FreeBSD nvnet.
This driver has been modified to fit both the NetBSD loadable kernel
modules (and is one of the first network device lkm's) and to conform
to NetBSD kernel organization which although similiar to FreeBSD due
to their common parentage is different and modifications to the driver
organization were required.
NB: This driver is only useable on i386 NetBSD systems. It has been reported to
work on amd64 NVidia platforms, but I myself can't confirm this --
1. Obtaining the NetBSD driver.
The latest version is available at
In order to use this device driver you must have:
- An NVIDIA nForce or nForce2 based motherboard with the onboard MAC enabled.
- The following NetBSD versions:
- The NetBSD kernel sources installed and the NVIDIA nForce
Linux driver source distribution extracted when compiling the module
from source. I used the NFORCE-Linux-x86-1.0-0301-pkg1.run version in doing the NetBSD port. Other versions are available for download from NVIDIA's website.
3.1 Support for the Realtek 8139 PHY used in the nForce MCP adapter
The nForce driver requires support for the Realtek 8139 PHY
module. This is not included in the NetBSD source as of the 3.99.2
version. Following are the steps to add support for the Realtek 8139 PHY:
- Copy rlphy.c from the rlphy directory to the kernel src directory
- Apply the files.mii.patch to files.mii in sys/dev/mii.
- Apply the miidevs.patch to miidevs in sys/dev/mii.
- Apply the generic.rtk8139.patch to the GENERIC kernel config file
in sys/arch/i386/conf. This will create a new kernel config file
GENERICRTK. You may rename it to GENERIC since the only
difference is the addition of the Realtek 8139 PHY interface.
- Config and build a new NetBSD kernel following the standard
steps, found in the The NetBSD Guide, Chapter Compiling the kernel.
- You need to install the new kernel and reboot the system.
3.2 Building the NetBSD loadable nForce MCP adapter driver module
- First create a directory for the nvnet driver, I've used nv in
this example ...
# mkdir nv
- Extract the NVIDIA Linux source distribution
# cd nv
# sh ../NFORCE-Linux-x86-1.0-0301-pkg1.run -x
- Extract the driver source into the same directory.
# tar -zxf ../nvnet-netbsd-src-2005nnnn.tar.gz
- Then build and install the module.
# make NFORCE=../NFORCE-Linux-x86-1.0-0301-pkg1
# make install
4. Loading and Configuring the driver
Before you can use the module it must be loaded by the kernel. This can be
done initially by hand using the command 'modload /usr/lkm/nv.o' to test
compatibility, however in order to make the network interface available
during the bootup sequence it is necessary to preload the module.
By default the driver has been installed in /usr/lkm. If you need networking
available before /usr is mounted move or copy the driver (nv.o) to the
/lkm directory and modify the path appropriatly, i.e. /usr/lkm => /lkm, in the following sections.
4.1.1 Loading via modload
NB: You should do this to test your build of the driver and the
# modload /usr/lkm/nv.o
You should see both the nv device and the rlphy device
recognized and configured by the kernel
# ifconfig -l
you should see something like:
- try and configure an IP address and netmask - use your own values.
# ifconfig nv0 192.168.1.2 netmask 0xffffff00
- try to ping a local machine
# ping some-ip-address on the same subnet
64 bytes from some-ip-address: icmp_seq=0 ttl=255 time=0.135 ms
- If all is well you can proceed to loading the module at boot
4.1.2 Loading at boottime using rc.conf
- Add to your /etc/rc.conf file:
- Add to your /etc/lkm.conf
/usr/lkm/nv.o - - - - BEFORENET
5. Known Issues
- Detaching (and unloading) followed by reloading of the driver
is questionable - it has some problems. I wanted to get the driver out
for others to use, so I haven't fully tested this path.
- BPF code is now fixed thanks to a patch from Dave Huang in the
- Multicast is now supported by the 4/25/2005 version of the
driver - thanks to advice from Jason Thorpe.
7. Reporting Problems
If you discover any bugs please collect as much detail as possible and
send me, firstname.lastname@example.org, all the information that you can about it. Also, if you have any suggestions on ways to make the port or code cleaner please let me know.
William S. Morgart
Last modified: Mon Jun 20 23:08:45 2005