freebsd-dev/sys/modules/Makefile

654 lines
8.5 KiB
Makefile
Raw Normal View History

1999-08-28 01:08:13 +00:00
# $FreeBSD$
.include <bsd.own.mk>
SUBDIR= ${_3dfx} \
${_3dfx_linux} \
${_aac} \
accf_data \
accf_http \
${_acpi} \
${_agp} \
aha \
${_ahb} \
${_aic} \
aic7xxx \
aio \
${_amd} \
amr \
${_an} \
${_aout} \
${_apm} \
${_ar} \
2005-03-31 20:21:43 +00:00
${_arcmsr} \
${_arcnet} \
2004-05-16 13:58:27 +00:00
${_arl} \
${_asmc} \
${_asr} \
This is the much rumoured ATA mkIII update that I've been working on. o ATA is now fully newbus'd and split into modules. This means that on a modern system you just load "atapci and ata" to get the base support, and then one or more of the device subdrivers "atadisk atapicd atapifd atapist ataraid". All can be loaded/unloaded anytime, but for obvious reasons you dont want to unload atadisk when you have mounted filesystems. o The device identify part of the probe has been rewritten to fix the problems with odd devices the old had, and to try to remove so of the long delays some HW could provoke. Also probing is done without the need for interrupts, making earlier probing possible. o SATA devices can be hot inserted/removed and devices will be created/ removed in /dev accordingly. NOTE: only supported on controllers that has this feature: Promise and Silicon Image for now. On other controllers the usual atacontrol detach/attach dance is still needed. o Support for "atomic" composite ATA requests used for RAID. o ATA RAID support has been rewritten and and now supports these metadata formats: "Adaptec HostRAID" "Highpoint V2 RocketRAID" "Highpoint V3 RocketRAID" "Intel MatrixRAID" "Integrated Technology Express" "LSILogic V2 MegaRAID" "LSILogic V3 MegaRAID" "Promise FastTrak" "Silicon Image Medley" "FreeBSD PseudoRAID" o Update the ioctl API to match new RAID levels etc. o Update atacontrol to know about the new RAID levels etc NOTE: you need to recompile atacontrol with the new sys/ata.h, make world will take care of that. NOTE2: that rebuild is done differently from the old system as the rebuild is now done piggybacked on read requests to the array, so atacontrol simply starts a background "dd" to rebuild the array. o The reinit code has been worked over to be much more robust. o The timeout code has been overhauled for races. o Support of new chipsets. o Lots of fixes for bugs found while doing the modulerization and reviewing the old code. Missing or changed features from current ATA: o atapi-cd no longer has support for ATAPI changers. Todays its much cheaper and alot faster to copy those CD images to disk and serve them from there. Besides they dont seem to be made anymore, maybe for that exact reason. o ATA RAID can only read metadata from all the above metadata formats, not write all of them (Promise and Highpoint V2 so far). This means that arrays can be picked up from the BIOS, but they cannot be created from FreeBSD. There is more to it than just the missing write metadata support, those formats are not unique to a given controller like Promise and Highpoint formats, instead they exist for several types, and even worse, some controllers can have different formats and its impossible to tell which one. The outcome is that we cannot reliably create the metadata of those formats and be sure the controller BIOS will understand it. However write support is needed to update/fail/rebuild the arrays properly so it sits fairly high on the TODO list. o So far atapicam is not supported with these changes. When/if this will change is up to the maintainer of atapi-cam so go there for questions. HW donated by: Webveveriet AS HW donated by: Frode Nordahl HW donated by: Yahoo! HW donated by: Sentex Patience by: Vife and my boys (and even the cats)
2005-03-30 12:03:40 +00:00
ata \
${_ath} \
${_ath_hal} \
${_ath_rate_amrr} \
${_ath_rate_onoe} \
${_ath_rate_sample} \
aue \
${_auxio} \
axe \
bce \
bfe \
bge \
${_bios} \
${_bktr} \
2006-07-26 22:10:10 +00:00
bridgestp \
cam \
${_canbepm} \
${_canbus} \
${_cardbus} \
${_cbb} \
cd9660 \
cd9660_iconv \
cdce \
${_ce} \
${_ciss} \
${_cm} \
${_cmx} \
coda \
coda5 \
${_coff} \
${_coretemp} \
2004-05-17 14:24:52 +00:00
${_cp} \
${_cpufreq} \
${_crypto} \
${_cryptodev} \
${_cs} \
${_ctau} \
cue \
${_cx} \
cxgb \
dc \
dcons \
dcons_crom \
de \
${_digi} \
${_dpt} \
${_drm} \
dummynet \
${_ed} \
${_elink} \
${_em} \
en \
${_ep} \
${_ex} \
${_exca} \
${_ext2fs} \
fatm \
fdc \
2002-10-21 00:38:18 +00:00
fdescfs \
${_fe} \
2002-11-07 16:19:43 +00:00
firewire \
firmware \
fxp \
o Revert the part of if_gem.c rev. 1.35 which added a call to gem_stop() to gem_attach() as the former access softc members not yet initialized at that time and gem_reset() actually is enough to stop the chip. [1] o Revise the use of gem_bitwait(); add bus_barrier() calls before calling gem_bitwait() to ensure the respective bit has been written before we starting polling on it and poll for the right bits to change, f.e. even though we only reset RX we have to actually wait for both GEM_RESET_RX and GEM_RESET_TX to clear. Add some additional gem_bitwait() calls in places we've been missing them according to the GEM documentation. Along with this some excessive DELAYs, which probably only were added because of bugs in gem_bitwait() and its use in the first place, as well as as have of an gem_bitwait() reimplementation in gem_reset_tx() were removed. o Add gem_reset_rxdma() and use it to deal with GEM_MAC_RX_OVERFLOW errors more gracefully as unlike gem_init_locked() it resets the RX DMA engine only, causing no link loss and the FIFOs not to be cleared. Also use it deal with GEM_INTR_RX_TAG_ERR errors, with previously were unhandled. This was based on information obtained from the Linux GEM and OpenSolaris ERI drivers. o Turn on workarounds for silicon bugs in the Apple GMAC variants. This was based on information obtained from the Darwin GMAC and Linux GEM drivers. o Turn on "infinite" (i.e. maximum 31 * 64 bytes in length) DMA bursts. This greatly improves especially RX performance. o Optimize the RX path, this consists of: - kicking the receiver as soon as we've a spare descriptor in gem_rint() again instead of just once after all the ready ones have been handled; - kicking the receiver the right way, i.e. as outlined in the GEM documentation in batches of 4 and by pointing it to the descriptor after the last valid one; - calling gem_rint() before gem_tint() in gem_intr() as gem_tint() may take quite a while; - doubling the size of the RX ring to 256 descriptors. Overall the RX performance of a GEM in a 1GHz Sun Fire V210 was improved from ~100Mbit/s to ~850Mbit/s. o In gem_add_rxbuf() don't assign the newly allocated mbuf to rxs_mbuf before calling bus_dmamap_load_mbuf_sg(), if bus_dmamap_load_mbuf_sg() fails we'll free the newly allocated mbuf, unable to recycle the previous one but a NULL pointer dereference instead. o In gem_init_locked() honor the return value of gem_meminit(). o Simplify gem_ringsize() and dont' return garbage in the default case. Based on OpenBSD. o Don't turn on MAC control, MIF and PCS interrupts unless GEM_DEBUG is defined as we don't need/use these interrupts for operation. o In gem_start_locked() sync the DMA maps of the descriptor rings before every kick of the transmitter and not just once after enqueuing all packets as the NIC might instantly start transmitting after we kicked it the first time. o Keep state of the link state and use it to enable or disable the MAC in gem_mii_statchg() accordingly as well as to return early from gem_start_locked() in case the link is down. [3] o Initialize the maximum frame size to a sane value. o In gem_mii_statchg() enable carrier extension if appropriate. o Increment if_ierrors in case of an GEM_MAC_RX_OVERFLOW error and in gem_eint(). [3] o Handle IFF_ALLMULTI correctly; don't set it if we've turned promiscuous group mode on and don't clear the flag if we've disabled promiscuous group mode (these were mostly NOPs though). [2] o Let gem_eint() also report GEM_INTR_PERR errors. o Move setting sc_variant from gem_pci_probe() to gem_pci_attach() as device probe methods are not supposed to touch the softc. o Collapse sc_inited and sc_pci into bits for sc_flags. o Add CTASSERTs ensuring that GEM_NRXDESC and GEM_NTXDESC are set to legal values. o Correctly set up for 802.3x flow control, though #ifdef out the code that actually enables it as this needs more testing and mainly a proper framework to support it. o Correct and add some conversions from hard-coded functions names to __func__ which were borked or forgotten in if_gem.c rev. 1.42. o Use PCIR_BAR instead of a homegrown macro. o Replace sc_enaddr[6] with sc_enaddr[ETHER_ADDR_LEN]. o In gem_pci_attach() in case attaching fails release the resources in the opposite order they were allocated. o Make gem_reset() static to if_gem.c as it's not needed outside that module. o Remove the GEM_GIGABIT flag and the associated code; GEM_GIGABIT was never set and the associated code was in the wrong place. o Remove sc_mif_config; it was only used to cache the contents of the respective register within gem_attach(). o Remove the #ifdef'ed out NetBSD/OpenBSD code for establishing a suspend hook as it will never be used on FreeBSD. o Also probe Apple Intrepid 2 GMAC and Apple Shasta GMAC, add support for Apple K2 GMAC. Based on OpenBSD. o Add support for Sun GBE/P cards, or in other words actually add support for cards based on GEM to gem(4). This mainly consists of adding support for the TBI of these chips. Along with this the PHY selection code was rewritten to hardcode the PHY number for certain configurations as for example the PHY of the on-board ERI of Blade 1000 shows up twice causing no link as the second incarnation is isolated. These changes were ported from OpenBSD with some additional improvements and modulo some bugs. o Add code to if_gem_pci.c allowing to read the MAC-address from the VPD on systems without Open Firmware. This is an improved version of my variant of the respective code in if_hme_pci.c o Now that gem(4) is MI enable it for all archs. Pointed out by: yongari [1] Suggested by: rwatson [2], yongari [3] Tested on: i386 (GEM), powerpc (GMACs by marcel and yongari), sparc64 (ERI and GEM) Reviewed by: yongari Approved by: re (kensmith)
2007-09-26 21:14:18 +00:00
gem \
2003-05-31 18:36:41 +00:00
geom \
${_harp} \
hatm \
${_hfa} \
hifn \
hme \
${_hptiop} \
2004-10-24 08:53:40 +00:00
${_hptmv} \
${_hptrr} \
hwpmc \
${_i2c} \
${_ibcs2} \
${_ichwd} \
${_ida} \
${_idt} \
${_ie} \
if_bridge \
if_disc \
if_edsc \
if_ef \
2002-10-21 00:38:18 +00:00
if_faith \
if_gif \
2002-09-06 17:18:53 +00:00
if_gre \
if_lagg \
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.
2005-04-24 20:21:22 +00:00
${_if_ndis} \
if_ppp \
if_sl \
if_stf \
if_tap \
if_tun \
2001-09-05 23:47:46 +00:00
if_vlan \
2008-02-29 22:42:29 +00:00
${_igb} \
${_iir} \
${_io} \
ipdivert \
${_ipfilter} \
ipfw \
2008-02-29 22:28:18 +00:00
ipfw_nat \
${_ipmi} \
2007-10-15 08:26:12 +00:00
ip_mroute_mod \
${_ips} \
${_ipw} \
${_ipwfw} \
iscsi \
isp \
ispfw \
${_iwi} \
${_iwifw} \
${_iwn} \
${_iwnfw} \
${_ixgb} \
joy \
2008-04-12 14:20:22 +00:00
${_k8temp} \
kbdmux \
krpc \
kue \
le \
lge \
2005-05-06 14:47:54 +00:00
libalias \
libiconv \
libmbpool \
libmchain \
${_linprocfs} \
${_linsysfs} \
${_linux} \
lmc \
lpt \
mac_biba \
mac_bsdextended \
mac_ifoff \
mac_lomac \
mac_mls \
mac_none \
mac_partition \
mac_portacl \
mac_seeotheruids \
mac_stub \
mac_test \
malo \
2002-10-04 07:15:34 +00:00
mcd \
md \
2004-08-02 19:21:51 +00:00
mem \
2006-03-29 09:57:22 +00:00
mfi \
mii \
mlx \
${_mly} \
2002-10-31 19:39:23 +00:00
mpt \
2005-11-26 12:46:01 +00:00
mqueue \
msdosfs \
msdosfs_iconv \
${_mse} \
2006-12-13 02:37:48 +00:00
msk \
mxge \
2003-02-27 14:49:56 +00:00
my \
${_ncp} \
${_ncv} \
${_ndis} \
netgraph \
${_nfe} \
nfsclient \
nfslockd \
nfsserver \
nge \
nmdm \
${_nsp} \
ntfs \
ntfs_iconv \
nullfs \
${_nve} \
${_nvram} \
${_nwfs} \
2007-10-15 08:26:12 +00:00
${_nxge} \
${_oltr} \
${_padlock} \
patm \
${_pccard} \
${_pcfclock} \
pcn \
${_pecoff} \
${_pf} \
${_pflog} \
plip \
${_pmc} \
portalfs \
ppbus \
ppc \
ppi \
pps \
procfs \
pseudofs \
${_pst} \
puc \
ral \
${_random} \
${_ray} \
rc \
rc4 \
2008-05-05 20:41:54 +00:00
${_rdma} \
Take the support for the 8139C+/8169/8169S/8110S chips out of the rl(4) driver and put it in a new re(4) driver. The re(4) driver shares the if_rlreg.h file with rl(4) but is a separate module. (Ultimately I may change this. For now, it's convenient.) rl(4) has been modified so that it will never attach to an 8139C+ chip, leaving it to re(4) instead. Only re(4) has the PCI IDs to match the 8169/8169S/8110S gigE chips. if_re.c contains the same basic code that was originally bolted onto if_rl.c, with the following updates: - Added support for jumbo frames. Currently, there seems to be a limit of approximately 6200 bytes for jumbo frames on transmit. (This was determined via experimentation.) The 8169S/8110S chips apparently are limited to 7.5K frames on transmit. This may require some more work, though the framework to handle jumbo frames on RX is in place: the re_rxeof() routine will gather up frames than span multiple 2K clusters into a single mbuf list. - Fixed bug in re_txeof(): if we reap some of the TX buffers, but there are still some pending, re-arm the timer before exiting re_txeof() so that another timeout interrupt will be generated, just in case re_start() doesn't do it for us. - Handle the 'link state changed' interrupt - Fix a detach bug. If re(4) is loaded as a module, and you do tcpdump -i re0, then you do 'kldunload if_re,' the system will panic after a few seconds. This happens because ether_ifdetach() ends up calling the BPF detach code, which notices the interface is in promiscuous mode and tries to switch promisc mode off while detaching the BPF listner. This ultimately results in a call to re_ioctl() (due to SIOCSIFFLAGS), which in turn calls re_init() to handle the IFF_PROMISC flag change. Unfortunately, calling re_init() here turns the chip back on and restarts the 1-second timeout loop that drives re_tick(). By the time the timeout fires, if_re.ko has been unloaded, which results in a call to invalid code and blows up the system. To fix this, I cleared the IFF_UP flag before calling ether_ifdetach(), which stops the ioctl routine from trying to reset the chip. - Modified comments in re_rxeof() relating to the difference in RX descriptor status bit layout between the 8139C+ and the gigE chips. The layout is different because the frame length field was expanded from 12 bits to 13, and they got rid of one of the status bits to make room. - Add diagnostic code (re_diag()) to test for the case where a user has installed a broken 32-bit 8169 PCI NIC in a 64-bit slot. Some NICs have the REQ64# and ACK64# lines connected even though the board is 32-bit only (in this case, they should be pulled high). This fools the chip into doing 64-bit DMA transfers even though there is no 64-bit data path. To detect this, re_diag() puts the chip into digital loopback mode and sets the receiver to promiscuous mode, then initiates a single 64-byte packet transmission. The frame is echoed back to the host, and if the frame contents are intact, we know DMA is working correctly, otherwise we complain loudly on the console and abort the device attach. (At the moment, I don't know of any way to work around the problem other than physically modifying the board, so until/unless I can think of a software workaround, this will have do to.) - Created re(4) man page - Modified rlphy.c to allow re(4) to attach as well as rl(4). Note that this code works for the sample 8169/Marvell 88E1000 NIC that I have, but probably won't work for the 8169S/8110S chips. RealTek has sent me some sample NICs, but they haven't arrived yet. I will probably need to add an rlgphy driver to handle the on-board PHY in the 8169S/8110S (it needs special DSP initialization).
2003-09-08 02:11:25 +00:00
re \
reiserfs \
rl \
rp \
rue \
rum \
${_s3} \
${_safe} \
${_sbni} \
sbsh \
scc \
scd \
${_scsi_low} \
sem \
sf \
${_sio} \
sis \
sk \
${_smbfs} \
sn \
${_snc} \
snp \
${_sound} \
${_speaker} \
${_splash} \
${_sppp} \
${_sr} \
ste \
${_stg} \
2006-07-25 00:45:55 +00:00
stge \
${_streams} \
sym \
${_syscons} \
sysvipc \
ti \
tl \
${_tmpfs} \
trm \
2004-04-27 17:57:45 +00:00
${_twa} \
2002-10-21 00:38:18 +00:00
twe \
tx \
txp \
uark \
2006-03-31 01:50:23 +00:00
uart \
ubsa \
ubsec \
ubser \
ucom \
ucycom \
udav \
udbp \
udf \
udf_iconv \
2002-10-21 00:38:18 +00:00
ufm \
${_ufs} \
ufoma \
uftdi \
ugen \
uhid \
ukbd \
ulpt \
umass \
2003-06-28 05:46:16 +00:00
umct \
umodem \
ums \
unionfs \
uplcom \
ural \
urio \
usb \
uscanner \
uslcom \
utopia \
uvisor \
uvscom \
${_vesa} \
vge \
vkbd \
${_vpo} \
vr \
vx \
wb \
${_wi} \
wlan \
wlan_acl \
wlan_amrr \
wlan_ccmp \
wlan_rssadapt \
wlan_tkip \
wlan_wep \
wlan_xauth \
${_wpi} \
${_wpifw} \
${_xe} \
2005-12-12 01:37:57 +00:00
xfs \
xl \
2007-04-06 02:13:30 +00:00
${_zfs} \
2007-10-31 18:47:04 +00:00
zlib \
zyd
.if ${MACHINE_ARCH} != "powerpc"
_syscons= syscons
2005-02-03 08:07:22 +00:00
_vpo= vpo
.endif
.if defined(ALL_MODULES)
_ufs= ufs
.endif
# Disabled in 7.0 as netatm is not MPSAFE.
#if ${MK_ATM} != "no"
#_harp= harp
#.endif
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
.if exists(${.CURDIR}/../opencrypto)
_crypto= crypto
_cryptodev= cryptodev
.endif
.if exists(${.CURDIR}/../crypto)
_random= random
.endif
.endif
.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
_ipfilter= ipfilter
2002-10-21 00:38:18 +00:00
.endif
.if ${MK_PF} != "no" || defined(ALL_MODULES)
_pf= pf
_pflog= pflog
.endif
.if ${MACHINE_ARCH} == "i386"
# XXX some of these can move to the general case when de-i386'ed
# XXX some of these can move now, but are untested on other architectures.
_3dfx= 3dfx
_3dfx_linux= 3dfx_linux
_agp= agp
_aic= aic
_amd= amd
_an= an
_aout= aout
_apm= apm
_ar= ar
_arcnet= arcnet
_ath= ath
_ath_hal= ath_hal
_ath_rate_amrr= ath_rate_amrr
_ath_rate_onoe= ath_rate_onoe
_ath_rate_sample=ath_rate_sample
_bktr= bktr
_cardbus= cardbus
_cbb= cbb
_ce= ce
_coff= coff
2004-05-17 14:24:52 +00:00
_cp= cp
_cpufreq= cpufreq
_cs= cs
_digi= digi
_drm= drm
_ed= ed
_elink= elink
_em= em
_ep= ep
_exca= exca
_ext2fs= ext2fs
_fe= fe
# Disabled due to non-MPSAFEty in 7.0
#_hfa= hfa
_i2c= i2c
_ibcs2= ibcs2
_ie= ie
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.
2005-04-24 20:21:22 +00:00
_if_ndis= if_ndis
_igb= igb
_io= io
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
_mse= mse
.if ${MK_NCP} != "no"
_ncp= ncp
.endif
_ncv= ncv
_ndis= ndis
_nsp= nsp
.if ${MK_NCP} != "no"
_nwfs= nwfs
.endif
_oltr= oltr
_pccard= pccard
_pcfclock= pcfclock
_pecoff= pecoff
_pst= pst
2004-11-15 16:33:18 +00:00
_ray= ray
2008-05-05 20:41:54 +00:00
_rdma= rdma
_safe= safe
_sbni= sbni
_scsi_low= scsi_low
_sio= sio
_smbfs= smbfs
_sound= sound
_speaker= speaker
_splash= splash
_sppp= sppp
_sr= sr
_stg= stg
_streams= streams
2007-10-15 08:26:12 +00:00
_tmpfs= tmpfs
_wi= wi
_xe= xe
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.if ${MACHINE} == "i386"
_aac= aac
_acpi= acpi
2004-06-30 13:09:13 +00:00
_ahb= ahb
_arcmsr= arcmsr
_arl= arl
_asmc= asmc
_asr= asr
_bios= bios
_ciss= ciss
_cm= cm
_cmx= cmx
_coretemp= coretemp
_ctau= ctau
_cx= cx
_dpt= dpt
_ex= ex
_hptiop= hptiop
2004-10-24 08:53:40 +00:00
_hptmv= hptmv
_hptrr= hptrr
2004-05-13 11:13:55 +00:00
_ichwd= ichwd
_ida= ida
# Disabled due to non-MPSAFEty in 7.0
#_idt= idt
_iir= iir
2006-02-14 12:55:07 +00:00
_ipmi= ipmi
_ips= ips
2006-03-17 13:06:19 +00:00
_ipw= ipw
_ipwfw= ipwfw
2006-03-17 13:06:19 +00:00
_iwi= iwi
_iwifw= iwifw
_iwn= iwn
_iwnfw= iwnfw
2007-10-16 11:39:28 +00:00
_ixgb= ixgb
_mly= mly
_nfe= nfe
2005-03-12 10:41:58 +00:00
_nve= nve
_nvram= nvram
_nxge= nxge
_wpi= wpi
_wpifw= wpifw
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
.if exists(${.CURDIR}/../crypto/via)
_padlock= padlock
.endif
.endif
_s3= s3
2004-04-27 17:57:45 +00:00
_twa= twa
_vesa= vesa
.elif ${MACHINE} == "pc98"
_canbepm= canbepm
_canbus= canbus
_pmc= pmc
_snc= snc
.endif
2002-09-16 08:32:48 +00:00
.endif
.if ${MACHINE_ARCH} == "amd64"
2004-08-30 03:37:36 +00:00
_aac= aac
2007-03-22 18:16:43 +00:00
_acpi= acpi
_agp= agp
_an= an
2005-03-31 20:21:43 +00:00
_arcmsr= arcmsr
_asmc= asmc
_ath= ath
_ath_hal= ath_hal
_ath_rate_amrr= ath_rate_amrr
_ath_rate_onoe= ath_rate_onoe
_ath_rate_sample=ath_rate_sample
_cardbus= cardbus
_cbb= cbb
_cmx= cmx
_ciss= ciss
_coretemp= coretemp
_cpufreq= cpufreq
_digi= digi
_drm= drm
_ed= ed
_em= em
_exca= exca
_ext2fs= ext2fs
_hptiop= hptiop
_hptmv= hptmv
_hptrr= hptrr
_i2c= i2c
_ichwd= ichwd
_ida= ida
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.
2005-04-24 20:21:22 +00:00
_if_ndis= if_ndis
_igb= igb
_iir= iir
_io= io
_ipmi= ipmi
_ips= ips
_ipw= ipw
_ipwfw= ipwfw
_iwn= iwn
_iwnfw= iwnfw
2007-10-16 11:39:28 +00:00
_ixgb= ixgb
2008-04-12 14:20:22 +00:00
_k8temp= k8temp
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
_mly= mly
Add support for Windows/x86-64 binaries to Project Evil. Ville-Pertti Keinonen (will at exomi dot comohmygodnospampleasekthx) deserves a big thanks for submitting initial patches to make it work. I have mangled his contributions appropriately. The main gotcha with Windows/x86-64 is that Microsoft uses a different calling convention than everyone else. The standard ABI requires using 6 registers for argument passing, with other arguments on the stack. Microsoft uses only 4 registers, and requires the caller to leave room on the stack for the register arguments incase the callee needs to spill them. Unlike x86, where Microsoft uses a mix of _cdecl, _stdcall and _fastcall, all routines on Windows/x86-64 uses the same convention. This unfortunately means that all the functions we export to the driver require an intermediate translation wrapper. Similarly, we have to wrap all calls back into the driver binary itself. The original patches provided macros to wrap every single routine at compile time, providing a secondary jump table with a customized wrapper for each exported routine. I decided to use a different approach: the call wrapper for each function is created from a template at runtime, and the routine to jump to is patched into the wrapper as it is created. The subr_pe module has been modified to patch in the wrapped function instead of the original. (On x86, the wrapping routine is a no-op.) There are some minor API differences that had to be accounted for: - KeAcquireSpinLock() is a real function on amd64, not a macro wrapper around KfAcquireSpinLock() - NdisFreeBuffer() is actually IoFreeMdl(). I had to change the whole NDIS_BUFFER API a bit to accomodate this. Bugs fixed along the way: - IoAllocateMdl() always returned NULL - kern_windrv.c:windrv_unload() wasn't releasing private driver object extensions correctly (found thanks to memguard) This has only been tested with the driver for the Broadcom 802.11g chipset, which was the only Windows/x86-64 driver I could find.
2005-02-16 05:41:18 +00:00
_ndis= ndis
_nfe= nfe
_nve= nve
_nvram= nvram
_nxge= nxge
_pccard= pccard
2008-05-05 20:41:54 +00:00
_rdma= rdma
_safe= safe
_scsi_low= scsi_low
_smbfs= smbfs
2004-08-29 09:14:18 +00:00
_sound= sound
_speaker= speaker
_sppp= sppp
2007-10-15 08:26:12 +00:00
_tmpfs= tmpfs
_twa= twa
_wi= wi
_wpi= wpi
_wpifw= wpifw
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.endif
.if ${MACHINE_ARCH} == "ia64"
# Modules not enabled on ia64 (as compared to i386) include:
# aac acpi aout apm atspeaker drm ibcs2 linprocfs linux ncv
# nsp oltr pecoff s3 sbni stg vesa
# acpi is not enabled because it is broken as a module on ia64
_aic= aic
#_ar= ar not 64-bit clean
2007-10-15 08:26:12 +00:00
_an= an
_arcnet= arcnet
_asr= asr
_bktr= bktr
_cardbus= cardbus
_cbb= cbb
_ciss= ciss
_cm= cm
_cmx= cmx
_coff= coff
_cpufreq= cpufreq
_em= em
_ep= ep
_exca= exca
_fe= fe
_hfa= hfa
_igb= igb
_iir= iir
_mly= mly
_pccard= pccard
_scsi_low= scsi_low
_smbfs= smbfs
_sound= sound
_splash= splash
_sppp= sppp
#_sr= sr not 64bit clean
_streams= streams
_wi= wi
_xe= xe
.endif
.if ${MACHINE_ARCH} == "powerpc"
_an= an
_ath= ath
_ath_hal= ath_hal
_ath_rate_amrr= ath_rate_amrr
_ath_rate_onoe= ath_rate_onoe
_ath_rate_sample=ath_rate_sample
_nvram= powermac_nvram
2005-09-19 08:13:43 +00:00
_smbfs= smbfs
2003-01-09 16:37:37 +00:00
.endif
.if ${MACHINE_ARCH} == "sparc64"
_ath= ath
_ath_hal= ath_hal
_ath_rate_amrr= ath_rate_amrr
_ath_rate_onoe= ath_rate_onoe
_ath_rate_sample=ath_rate_sample
_auxio= auxio
2005-11-09 08:46:02 +00:00
_em= em
_i2c= i2c
_igb= igb
_sound= sound
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.endif
2002-02-17 21:00:20 +00:00
.if defined(MODULES_OVERRIDE) && !defined(ALL_MODULES)
SUBDIR=${MODULES_OVERRIDE}
.endif
.for reject in ${WITHOUT_MODULES}
SUBDIR:= ${SUBDIR:N${reject}}
.endfor
# Calling kldxref(8) for each module is expensive.
2003-01-21 05:52:48 +00:00
.if !defined(NO_XREF)
2003-03-12 14:32:46 +00:00
.MAKEFLAGS+= -DNO_XREF
afterinstall:
@if type kldxref >/dev/null 2>&1; then \
${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
kldxref ${DESTDIR}${KMODDIR}; \
fi
.endif
.include <bsd.subdir.mk>