freebsd-skq/sys/dev
Bill Paul c854fc1092 Commit the first cut of Project Evil, also known as the NDISulator.
Yes, it's what you think it is. Yes, you should run away now.

This is a special compatibility module for allowing Windows NDIS
miniport network drivers to be used with FreeBSD/x86. This provides
_binary_ NDIS compatibility (not source): you can run NDIS driver
code, but you can't build it. There are three main parts:

sys/compat/ndis: the NDIS compat API, which provides binary
compatibility functions for many routines in NDIS.SYS, HAL.dll
and ntoskrnl.exe in Windows (these are the three modules that
most NDIS miniport drivers use). The compat module also contains
a small PE relocator/dynalinker which relocates the Windows .SYS
image and then patches in our native routines.

sys/dev/if_ndis: the if_ndis driver wrapper. This module makes
use of the ndis compat API and can be compiled with a specially
prepared binary image file (ndis_driver_data.h) containing the
Windows .SYS image and registry key information parsed out of the
accompanying .INF file. Once if_ndis.ko is built, it can be loaded
and unloaded just like a native FreeBSD kenrel module.

usr.sbin/ndiscvt: a special utility that converts foo.sys and foo.inf
into an ndis_driver_data.h file that can be compiled into if_ndis.o.
Contains an .inf file parser graciously provided by Matt Dodd (and
mercilessly hacked upon by me) that strips out device ID info and
registry key info from a .INF file and packages it up with a binary
image array. The ndiscvt(8) utility also does some manipulation of
the segments within the .sys file to make life easier for the kernel
loader. (Doing the manipulation here saves the kernel code from having
to move things around later, which would waste memory.)

ndiscvt is only built for the i386 arch. Only files.i386 has been
updated, and none of this is turned on in GENERIC. It should probably
work on pc98. I have no idea about amd64 or ia64 at this point.

This is still a work in progress. I estimate it's about %85 done, but
I want it under CVS control so I can track subsequent changes. It has
been tested with exactly three drivers: the LinkSys LNE100TX v4 driver
(Lne100v4.sys), the sample Intel 82559 driver from the Windows DDK
(e100bex.sys) and the Broadcom BCM43xx wireless driver (bcmwl5.sys). It
still needs to have a net80211 stuff added to it. To use it, you would
do something like this:

# cd /sys/modules/ndis
# make; make load
# cd /sys/modules/if_ndis
# ndiscvt -i /path/to/foo.inf -s /path/to/foo.sys -o ndis_driver_data.h
# make; make load
# sysctl -a | grep ndis

All registry keys are mapped to sysctl nodes. Sometimes drivers refer
to registry keys that aren't mentioned in foo.inf. If this happens,
the NDIS API module creates sysctl nodes for these keys on the fly so
you can tweak them.

An example usage of the Broadcom wireless driver would be:

# sysctl hw.ndis0.EnableAutoConnect=1
# sysctl hw.ndis0.SSID="MY_SSID"
# sysctl hw.ndis0.NetworkType=0 (0 for bss, 1 for adhoc)
# ifconfig ndis0 <my ipaddr> netmask 0xffffff00 up

Things to be done:

- get rid of debug messages
- add in ndis80211 support
- defer transmissions until after a status update with
  NDIS_STATUS_CONNECTED occurs
- Create smarter lookaside list support
- Split off if_ndis_pci.c and if_ndis_pccard.c attachments
- Make sure PCMCIA support works
- Fix ndiscvt to properly parse PCMCIA device IDs from INF files
- write ndisapi.9 man page
2003-12-11 22:34:37 +00:00
..
aac Temporary workaround for aac_cam to deal with CAM requiring Giant. This 2003-12-03 15:42:12 +00:00
acpica Trim trailing whitespace. 2003-12-10 19:10:27 +00:00
adlink The present defaults for the open and close for device drivers which 2003-09-27 12:01:01 +00:00
advansys Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
agp - Disable AGP on ALI chipsets if aperture size is 0. 2003-11-11 21:49:18 +00:00
aha Save the device so we can do a device_printf. 2003-11-13 04:14:53 +00:00
ahb Make this at least compile on 64 bit platforms. Its been breaking 2003-07-30 20:09:22 +00:00
aic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
aic7xxx Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
amd Prefer new location of pci include files (which have only been in the 2003-08-22 05:54:52 +00:00
amr crashdump support. 2003-10-10 22:49:40 +00:00
an Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
ar Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
asr Remove code previously under #ifdef ASR_VERY_BROKEN 2003-09-26 15:56:42 +00:00
ata Finetune last commit, we need to take care of empty channels. 2003-12-10 23:06:24 +00:00
ath o track API change for HAL v0.9.6.1 2003-11-29 01:23:59 +00:00
atkbdc Significantly reduce the "jitter" that is typical for PS/2 mice 2003-12-11 11:28:11 +00:00
awi Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
bfe Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
bge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
bktr Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr 2003-12-08 07:59:18 +00:00
buslogic Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
cardbus Make the cardbus driver a derived class of the pci driver. In theory, this 2003-11-01 12:45:03 +00:00
ciss Correct the READ/WRITE CDB direction definition. 2003-12-08 23:12:57 +00:00
cm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cnw Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cs o Add sysctl to allow ignoring checksum of eeprom. 2003-11-04 02:59:57 +00:00
ct Use __FBSDID(). 2003-08-24 17:55:58 +00:00
cx Updated cx driver commit part 1: bring in the new kernel driver. 2003-12-03 07:29:38 +00:00
cy Fixed some minor indentation bugs. 2003-12-02 12:47:08 +00:00
dc Add support for ELECOM/Laneed CardBus FastEtherner Card(LD-CBL/TXA) 2003-12-06 02:29:31 +00:00
dcons Move post dmamap_load processes into the callback function. 2003-11-08 16:26:22 +00:00
de Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
dec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
digi Eliminate bogus use of makedev(): rather than synthesize the dev_t, use 2003-09-26 09:05:57 +00:00
dpt Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
drm Update from DRI CVS. Includes locking fixes (including PR 59202), changes for 2003-11-12 20:56:30 +00:00
ed Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
eisa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
em Don't call em_stop() from the watchdog since it requires the controller 2003-12-07 06:50:04 +00:00
en Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ep MFp4: 2003-11-02 20:13:39 +00:00
ex Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
exca Card type stuff was backwards, so assume io for the moment. mem needs 2003-10-07 04:29:04 +00:00
fatm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
fb Fix a typo. Allow for the creator not being stdout. 2003-11-11 07:34:08 +00:00
fdc Look at the equipment list for amd64 as well as i386 for autodetecting 2003-10-23 05:52:52 +00:00
fe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
firewire MFp4: 2003-12-11 03:42:40 +00:00
fxp Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
gem Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
gfb Change fb_attach() and fb_detach() to take a integer unit number rather 2003-09-26 10:41:44 +00:00
gx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
harp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
hatm Make the driver conditionally MPSAFE. MPSAFEty defaults to not-mpsafe 2003-11-05 11:47:31 +00:00
hfa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
hifn Add symmetric crypto support for the 7955 and 7956. 2003-10-08 20:25:47 +00:00
hme Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ic Added definitions of most of the interesting 16950 register numbers 2003-09-16 14:21:17 +00:00
ichsmb Update the comment to indicate ICH5 support 2003-08-31 19:23:00 +00:00
ida Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
idt Gross kludge: 2003-11-16 22:33:42 +00:00
ie Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
if_ndis Commit the first cut of Project Evil, also known as the NDISulator. 2003-12-11 22:34:37 +00:00
iicbus Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
iir Update email addresses, copyrights, and tweak the management interface. 2003-09-26 15:36:47 +00:00
ips ServeRaid (at least 5i) didn't initialize correctly. To get 2003-11-27 08:37:36 +00:00
isp fix broken _IOR usage 2003-11-14 05:13:00 +00:00
ispfw Use __FBSDID(). 2003-08-24 17:55:58 +00:00
joy Use __FBSDID(). 2003-08-24 17:55:58 +00:00
kbd - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
led Correct usage of mtx_init() API. This is not a functional change since 2003-12-07 23:21:22 +00:00
lge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
lnc Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
matcd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
mc146818
mca Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mcd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
md Use the class->init() to hitch up preload devices, rather than rely on 2003-11-18 18:19:26 +00:00
mii Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
mk48txx Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mlx Prepare for locking mlx(4) by cleaning up the use of busdma. No real 2003-09-02 08:30:31 +00:00
mly Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
mpt Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
mse - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
musycc Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
my Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
ncv Const poison string accessor functions. 2003-10-26 00:51:40 +00:00
nge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
nmdm - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
nsp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
null Shorten the code by removing one "do-nothing" function, replacing it 2003-11-01 09:31:54 +00:00
ofw Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
owi Nursemaid: Fix compilation. 2003-12-10 15:09:38 +00:00
patm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
pccard Use %#jx for both args. 2003-11-04 06:30:59 +00:00
pccbb Fix a harmless typo (use of res instead of rle: if rle is NULL, we'd 2003-11-12 05:21:06 +00:00
pcf fix another LP64 problem. READ_IVAR takes a pointer to an uintptr_t, not 2003-06-20 07:22:54 +00:00
pci Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
pcic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pdq Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ppbus Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ppc Forgot an added file in the last commit. 2003-08-01 05:02:55 +00:00
pst Dont re-arm the timeout twice on a timeout error. 2003-09-08 06:28:50 +00:00
puc Add support for Moxa Technologies' Smartio CP-104UL/PCI 4S RS232 card. 2003-12-09 17:31:25 +00:00
raidframe Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
random Fix a major faux pas of mine. I was causing 2 very bad things to 2003-11-20 15:35:48 +00:00
ray Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
rc Consistently use the BSD u_int and u_short instead of the SYSV uint and 2003-08-07 15:04:27 +00:00
re Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
rndtest Use __FBSDID(). 2003-08-24 17:55:58 +00:00
rp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
sab - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
safe Prefer new location of pci include files (which have only been in the 2003-08-22 07:08:17 +00:00
sbni Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
sbsh Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
scd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
sf Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
si Use __FBSDID(). 2003-08-24 18:03:45 +00:00
sio Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
sk Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
smbus No need for a separate nfpm driver now - amdpm handles both. 2003-09-06 13:58:06 +00:00
sn Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
snc Do if_xname conversion. I missed this one because it's pc98 only. 2003-11-01 23:24:38 +00:00
snp - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
sound The last argument to mtx_init() should be MTX_DEF, not 0. This is not a 2003-12-08 01:08:03 +00:00
speaker Use __FBSDID(). 2003-06-02 16:32:55 +00:00
sr Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
stg Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
streams falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
sym unifdef old interface support out to prevent false positives. 2003-12-07 05:17:13 +00:00
syscons Fix a panic that occurs when resuming. For some reason, sc->cur_scp is 2003-10-29 20:48:13 +00:00
tdfx Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
tga Use __FBSDID(). 2003-08-24 17:55:58 +00:00
ti Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
trm Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
twe After extensive QA cycles at 3ware, bring the driver in-line with all the 2003-12-02 07:57:20 +00:00
tx Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
txp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
uart Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
ubsec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
usb Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
utopia Generate events when the carrier goes up or down. 2003-07-30 08:35:58 +00:00
vinum Initalize buffer headers correctly for current version of bio subsystem. 2003-11-24 04:06:56 +00:00
vr Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
vx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
wds Use __FBSDID(). 2003-08-24 17:55:58 +00:00
wi Older versions of the intersil firmware is a lot slower than newer 2003-12-09 07:41:07 +00:00
wl Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
xe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
zs - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00