NetBSD device driver for the NVIDIA nForce MCP Networking Adapter

Copyright (c) 2003,2004 - Quinton Dolan

Copyright (c) 2005 - William S. Morgart

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

2. Requirements.

In order to use this device driver you must have:

3. Installation

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:
  1. Copy rlphy.c from the rlphy directory to the kernel src directory sys/dev/mii.
  2. Apply the files.mii.patch to files.mii in sys/dev/mii.
  3. Apply the miidevs.patch to miidevs in sys/dev/mii.
  4. 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.
  5. Config and build a new NetBSD kernel following the standard steps, found in the The NetBSD Guide, Chapter Compiling the kernel.
  6. You need to install the new kernel and reboot the system.
3.2 Building the NetBSD loadable nForce MCP adapter driver module
  1. First create a directory for the nvnet driver, I've used nv in this example ...
    # mkdir nv
  2. Extract the NVIDIA Linux source distribution
    # cd nv
    # sh ../ -x
  3. Extract the driver source into the same directory.
    # tar -zxf ../nvnet-netbsd-src-2005nnnn.tar.gz
  4. 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 kernel
    # 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:

    lo0 nv0

- try and configure an IP address and netmask - use your own values.

    # ifconfig nv0 netmask 0xffffff00
- try to ping a local machine
    # ping some-ip-address on the same subnet
    PING some-ip-address
    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 time.
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

6. History

7. Reporting Problems

If you discover any bugs please collect as much detail as possible and send me,, 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