Date: Sun, 24 Apr 2005 20:21:22 +0000 (UTC) From: Bill Paul <wpaul@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/modules Makefile src/sys/compat/ndis kern_ndis.c kern_windrv.c ntoskrnl_var.h subr_hal.c subr_ndis.c subr_ntoskrnl.c src/sys/dev/if_ndis if_ndis.c if_ndis_pccard.c... Message-ID: <200504242021.j3OKLN6r013958@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
wpaul 2005-04-24 20:21:22 UTC FreeBSD src repository Modified files: sys/modules Makefile sys/compat/ndis kern_ndis.c kern_windrv.c ntoskrnl_var.h subr_hal.c subr_ndis.c subr_ntoskrnl.c sys/dev/if_ndis if_ndis.c if_ndis_pccard.c if_ndis_pci.c if_ndis_usb.c if_ndisvar.h sys/modules/if_ndis Makefile sys/conf files.amd64 files.i386 usr.sbin/ndiscvt Makefile Added files: usr.sbin/ndiscvt ndisgen.8 ndisgen.sh windrv_stub.c Log: Throw the switch on the new driver generation/loading mechanism. From here on in, if_ndis.ko will be pre-built as a module, and can be built into a static kernel (though it's not part of GENERIC). Drivers are created using the new ndisgen(8) script, which uses ndiscvt(8) under the covers, along with a few other tools. The result is a driver module that can be kldloaded into the kernel. A driver with foo.inf and foo.sys files will be converted into foo_sys.ko (and foo_sys.o, for those who want/need to make static kernels). This module contains all of the necessary info from the .INF file and the driver binary image, converted into an ELF module. You can kldload this module (or add it to /boot/loader.conf) to have it loaded automatically. Any required firmware files can be bundled into the module as well (or converted/loaded separately). Also, add a workaround for a problem in NdisMSleep(). During system bootstrap (cold == 1), msleep() always returns 0 without actually sleeping. The Intel 2200BG driver uses NdisMSleep() to wait for the NIC's firmware to come to life, and fails to load if NdisMSleep() doesn't actually delay. As a workaround, if msleep() (and hence ndis_thsuspend()) returns 0, use a hard DELAY() to sleep instead). This is not really the right thing to do, but we can't really do much else. At the very least, this makes the Intel driver happy. There are probably other drivers that fail in this way during bootstrap. Unfortunately, the only workaround for those is to avoid pre-loading them and kldload them once the system is running instead. Revision Changes Path 1.78 +1 -1 src/sys/compat/ndis/kern_ndis.c 1.8 +80 -28 src/sys/compat/ndis/kern_windrv.c 1.33 +12 -1 src/sys/compat/ndis/ntoskrnl_var.h 1.21 +2 -0 src/sys/compat/ndis/subr_hal.c 1.85 +13 -6 src/sys/compat/ndis/subr_ndis.c 1.65 +2 -3 src/sys/compat/ndis/subr_ntoskrnl.c 1.64 +1 -0 src/sys/conf/files.amd64 1.530 +1 -0 src/sys/conf/files.i386 1.89 +7 -23 src/sys/dev/if_ndis/if_ndis.c 1.11 +40 -51 src/sys/dev/if_ndis/if_ndis_pccard.c 1.15 +38 -52 src/sys/dev/if_ndis/if_ndis_pci.c 1.5 +6 -23 src/sys/dev/if_ndis/if_ndis_usb.c 1.20 +1 -0 src/sys/dev/if_ndis/if_ndisvar.h 1.444 +3 -0 src/sys/modules/Makefile 1.5 +2 -1 src/sys/modules/if_ndis/Makefile 1.7 +7 -0 src/usr.sbin/ndiscvt/Makefile 1.1 +82 -0 src/usr.sbin/ndiscvt/ndisgen.8 (new) 1.1 +500 -0 src/usr.sbin/ndiscvt/ndisgen.sh (new) 1.1 +245 -0 src/usr.sbin/ndiscvt/windrv_stub.c (new)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200504242021.j3OKLN6r013958>