freebsd-dev/sys/modules/Makefile

855 lines
12 KiB
Makefile
Raw Normal View History

1999-08-28 01:08:13 +00:00
# $FreeBSD$
.include <bsd.own.mk>
# Modules that include binary-only blobs of microcode should be selectable by
# MK_SOURCELESS_UCODE option (see below).
2012-06-05 17:44:54 +00:00
SUBDIR= \
${_3dfx} \
${_3dfx_linux} \
${_aac} \
${_aacraid} \
accf_data \
accf_dns \
accf_http \
acl_nfs4 \
acl_posix1e \
${_acpi} \
ae \
${_aesni} \
2008-05-19 01:53:47 +00:00
age \
${_agp} \
aha \
${_ahb} \
Separate the parallel scsi knowledge out of the core of the XPT, and modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re
2009-07-10 08:18:08 +00:00
ahci \
${_aic} \
aic7xxx \
aio \
alc \
Add ale(4), a driver for Atheros AR8121/AR8113/AR8114 PCIe ethernet controller. The controller is also known as L1E(AR8121) and L2E(AR8113/AR8114). Unlike its predecessor Attansic L1, AR8121/AR8113/AR8114 uses completely different Rx logic such that it requires separate driver. Datasheet for AR81xx is not available to open source driver writers but it shares large part of Tx and PHY logic of L1. I still don't understand some part of register meaning and some MAC statistics counters but the driver seems to have no critical issues for performance and stability. The AR81xx requires copy operation to pass received frames to upper stack such that ale(4) consumes a lot of CPU cycles than that of other controller. A couple of silicon bugs also adds more CPU cycles to address the known hardware bug. However, if you have fast CPU you can still saturate the link. Currently ale(4) supports the following hardware features. - MSI. - TCP Segmentation offload. - Hardware VLAN tag insertion/stripping with checksum offload. - Tx TCP/UDP checksum offload and Rx IP/TCP/UDP checksum offload. - Tx/Rx interrupt moderation. - Hardware statistics counters. - Jumbo frame. - WOL. AR81xx PCIe ethernet controllers are mainly found on ASUS EeePC or P5Q series of ASUS motherboards. Special thanks to Jeremy Chadwick who sent the hardware to me. Without his donation writing a driver for AR81xx would never have been possible. Big thanks to all people who reported feedback or tested patches. HW donated by: koitsu Tested by: bsam, Joao Barros <joao.barros <> gmail DOT com > Jan Henrik Sylvester <me <> janh DOT de > Ivan Brawley < ivan <> brawley DOT id DOT au >, CURRENT ML
2008-11-12 09:52:06 +00:00
ale \
alq \
${_amdsbwd} \
${_amdtemp} \
amr \
${_an} \
${_aout} \
${_apm} \
2005-03-31 20:21:43 +00:00
${_arcmsr} \
${_arcnet} \
${_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_pci \
${_auxio} \
${_bce} \
bfe \
bge \
${_bxe} \
${_bios} \
${_bktr} \
${_bm} \
2006-07-26 22:10:10 +00:00
bridgestp \
bwi \
bwn \
cam \
${_canbepm} \
${_canbus} \
${_cardbus} \
${_carp} \
cas \
${_cbb} \
cc \
cd9660 \
cd9660_iconv \
${_ce} \
${_cfi} \
${_ciss} \
${_cm} \
${_cmx} \
${_coff} \
${_coretemp} \
2004-05-17 14:24:52 +00:00
${_cp} \
${_cpsw} \
${_cpuctl} \
${_cpufreq} \
${_crypto} \
${_cryptodev} \
${_cs} \
${_ct} \
${_ctau} \
ctl \
${_cxgb} \
cxgbe \
${_cyclic} \
dc \
dcons \
dcons_crom \
de \
${_dpms} \
${_dpt} \
${_drm} \
${_drm2} \
${_dtrace} \
dummynet \
${_ed} \
${_elink} \
${_em} \
en \
${_ep} \
${_epic} \
esp \
${_et} \
${_ex} \
${_exca} \
${_ext2fs} \
${_fatm} \
fdc \
2002-10-21 00:38:18 +00:00
fdescfs \
${_fe} \
${_filemon} \
2002-11-07 16:19:43 +00:00
firewire \
firmware \
fuse \
${_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 \
${_glxiic} \
${_glxsb} \
hatm \
hifn \
hme \
${_hpt27xx} \
${_hptiop} \
2004-10-24 08:53:40 +00:00
${_hptmv} \
${_hptrr} \
hwpmc \
${_i2c} \
${_ibcs2} \
${_ichwd} \
${_ida} \
${_ie} \
if_bridge \
if_disc \
if_edsc \
if_ef \
if_epair \
2002-10-21 00:38:18 +00:00
if_faith \
if_gif \
${_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_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} \
ip6_mroute_mod \
2007-10-15 08:26:12 +00:00
ip_mroute_mod \
${_ips} \
${_ipw} \
${_ipwfw} \
${_isci} \
iscsi \
isp \
${_ispfw} \
${_iwi} \
${_iwifw} \
${_iwn} \
${_iwnfw} \
${_ixgb} \
${_ixgbe} \
2008-05-27 01:54:45 +00:00
jme \
joy \
kbdmux \
kgssapi \
kgssapi_krb5 \
khelp \
krpc \
ksyms \
le \
lge \
2005-05-06 14:47:54 +00:00
libalias \
libiconv \
libmbpool \
libmchain \
${_lindev} \
${_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 \
mfi \
mii \
mlx \
${_mlx4} \
${_mlx4ib} \
${_mlxen} \
${_mly} \
mmc \
mmcsd \
mps \
mpt \
2005-11-26 12:46:01 +00:00
mqueue \
msdosfs \
msdosfs_iconv \
${_mse} \
2006-12-13 02:37:48 +00:00
msk \
${_mthca} \
mvs \
mwl \
${_mwlfw} \
mxge \
2003-02-27 14:49:56 +00:00
my \
${_nandfs} \
${_nandsim} \
${_ncp} \
${_ncv} \
${_ndis} \
${_netgraph} \
${_nfe} \
nfs_common \
nfscl \
nfsclient \
nfscommon \
nfsd \
nfslock \
nfslockd \
nfsserver \
nfssvc \
nge \
nmdm \
${_nsp} \
nullfs \
${_ntb} \
${_nvd} \
${_nve} \
${_nvme} \
${_nvram} \
2007-10-15 08:26:12 +00:00
${_nxge} \
${_opensolaris} \
oce \
${_padlock} \
patm \
${_pccard} \
${_pcfclock} \
pcn \
${_pf} \
${_pflog} \
${_pfsync} \
plip \
${_pmc} \
ppbus \
ppc \
ppi \
pps \
procfs \
pseudofs \
${_pst} \
pty \
puc \
${_qlxge} \
${_qlxgb} \
${_qlxgbe} \
ral \
${_ralfw} \
${_random} \
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 \
${_runfw} \
${_s3} \
${_safe} \
${_sbni} \
scc \
scd \
${_scsi_low} \
sdhci \
sdhci_pci \
sem \
send \
${_sf} \
${_sfxge} \
sge \
siba_bwn \
siftr \
siis \
sis \
sk \
${_sn} \
${_snc} \
snp \
${_sound} \
${_speaker} \
${_splash} \
${_sppp} \
ste \
${_stg} \
2006-07-25 00:45:55 +00:00
stge \
${_streams} \
${_svr4} \
${_sym} \
${_syscons} \
sysvipc \
${_ti} \
tl \
tmpfs \
${_toecore} \
${_tpm} \
trm \
2004-04-27 17:57:45 +00:00
${_twa} \
2002-10-21 00:38:18 +00:00
twe \
tws \
tx \
${_txp} \
uart \
ubsec \
udf \
udf_iconv \
ufs \
unionfs \
2009-02-23 18:32:59 +00:00
usb \
utopia \
${_vesa} \
${_virtio} \
vge \
${_viawd} \
vkbd \
${_vmm} \
${_vpo} \
vr \
vte \
vx \
${_vxge} \
wb \
${_wbwd} \
${_wi} \
wlan \
wlan_acl \
wlan_amrr \
wlan_ccmp \
wlan_rssadapt \
wlan_tkip \
wlan_wep \
wlan_xauth \
${_wpi} \
${_wpifw} \
${_x86bios} \
${_xe} \
xl \
2007-04-06 02:13:30 +00:00
${_zfs} \
2007-10-31 18:47:04 +00:00
zlib \
.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
_filemon= filemon
.endif
.if ${MACHINE_CPUARCH} != "powerpc" && ${MACHINE_CPUARCH} != "arm" && \
${MACHINE_CPUARCH} != "mips"
_syscons= syscons
2005-02-03 08:07:22 +00:00
_vpo= vpo
.endif
2010-11-13 20:28:06 +00:00
.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
# no BUS_SPACE_UNSPECIFIED
# No barrier instruction support (specific to this driver)
_sym= sym
# intr_disable() is a macro, causes problems
.if ${MK_SOURCELESS_UCODE} != "no"
_cxgb= cxgb
.endif
.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_INET_SUPPORT} != "no" || ${MK_INET6_SUPPORT} != "no") || \
defined(ALL_MODULES)
_carp= carp
_toecore= toecore
.endif
.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
_if_gre= if_gre
.endif
.if ${MK_IPFILTER} != "no" || defined(ALL_MODULES)
_ipfilter= ipfilter
2002-10-21 00:38:18 +00:00
.endif
.if ${MK_INET_SUPPORT} != "no" || defined(ALL_MODULES)
_ipdivert= ipdivert
_ipfw= ipfw
.endif
.if ${MK_NAND} != "no" || defined(ALL_MODULES)
_nandfs= nandfs
_nandsim= nandsim
.endif
.if ${MK_NETGRAPH} != "no" || defined(ALL_MODULES)
_netgraph= netgraph
.endif
.if (${MK_PF} != "no" && (${MK_INET_SUPPORT} != "no" || \
${MK_INET6_SUPPORT} != "no")) || defined(ALL_MODULES)
_pf= pf
_pflog= pflog
.if ${MK_INET_SUPPORT} != "no"
_pfsync= pfsync
.endif
.endif
.if ${MK_SOURCELESS_UCODE} != "no"
_bce= bce
_fatm= fatm
_fxp= fxp
_ispfw= ispfw
_mwlfw= mwlfw
_ralfw= ralfw
_runfw= runfw
_sf= sf
_sn= sn
_ti= ti
_txp= txp
.endif
.if ${MACHINE_CPUARCH} == "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
_an= an
_aout= aout
_apm= apm
_arcnet= arcnet
_bktr= bktr
_bxe= bxe
_cardbus= cardbus
_cbb= cbb
.if ${MK_SOURCELESS_UCODE} != "no"
_ce= ce
.endif
_coff= coff
.if ${MK_SOURCELESS_UCODE} != "no"
2004-05-17 14:24:52 +00:00
_cp= cp
.endif
_cpuctl= cpuctl
_cpufreq= cpufreq
_cs= cs
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_cyclic= cyclic
.endif
_dpms= dpms
_drm= drm
_drm2= drm2
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_dtrace= dtrace
.endif
_ed= ed
_elink= elink
_em= em
_ep= ep
_et= et
_exca= exca
_ext2fs= ext2fs
_fe= fe
_glxiic= glxiic
_glxsb= glxsb
_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
_lindev= lindev
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
_mse= mse
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4= mlx4
_mlx4ib= mlx4ib
_mlxen= mlxen
_mthca= mthca
.endif
_ncv= ncv
_ndis= ndis
_nsp= nsp
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_opensolaris= opensolaris
.endif
_pccard= pccard
_pcfclock= pcfclock
_pst= pst
2008-05-05 20:41:54 +00:00
_rdma= rdma
_safe= safe
_sbni= sbni
_scsi_low= scsi_low
_sound= sound
_speaker= speaker
_splash= splash
_sppp= sppp
_stg= stg
_streams= streams
_svr4= svr4
_vxge= vxge
_wbwd= wbwd
_wi= wi
_xe= xe
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.if ${MACHINE} == "i386"
_aac= aac
_aacraid= aacraid
_acpi= acpi
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
_aesni= aesni
.endif
2004-06-30 13:09:13 +00:00
_ahb= ahb
_amdsbwd= amdsbwd
_amdtemp= amdtemp
_arcmsr= arcmsr
_asmc= asmc
_asr= asr
_bios= bios
_ciss= ciss
_cm= cm
_cmx= cmx
_coretemp= coretemp
.if ${MK_SOURCELESS_UCODE} != "no"
_ctau= ctau
.endif
_dpt= dpt
_ex= ex
.if ${MK_SOURCELESS_HOST} != "no"
_hpt27xx= hpt27xx
.endif
_hptiop= hptiop
.if ${MK_SOURCELESS_HOST} != "no"
2004-10-24 08:53:40 +00:00
_hptmv= hptmv
_hptrr= hptrr
.endif
2004-05-13 11:13:55 +00:00
_ichwd= ichwd
_ida= ida
_iir= iir
2006-02-14 12:55:07 +00:00
_ipmi= ipmi
_ips= ips
2006-03-17 13:06:19 +00:00
_ipw= ipw
.if ${MK_SOURCELESS_UCODE} != "no"
_ipwfw= ipwfw
.endif
_isci= isci
2006-03-17 13:06:19 +00:00
_iwi= iwi
.if ${MK_SOURCELESS_UCODE} != "no"
_iwifw= iwifw
.endif
_iwn= iwn
.if ${MK_SOURCELESS_UCODE} != "no"
_iwnfw= iwnfw
.endif
2007-10-16 11:39:28 +00:00
_ixgb= ixgb
_ixgbe= ixgbe
_mly= mly
_nfe= nfe
_nvd= nvd
.if ${MK_SOURCELESS_HOST} != "no"
2005-03-12 10:41:58 +00:00
_nve= nve
.endif
_nvme= nvme
_nvram= nvram
_nxge= nxge
_tpm= tpm
_viawd= viawd
_wpi= wpi
.if ${MK_SOURCELESS_UCODE} != "no"
_wpifw= wpifw
.endif
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
_padlock= padlock
.endif
_s3= s3
2004-04-27 17:57:45 +00:00
_twa= twa
_vesa= vesa
_virtio= virtio
_x86bios= x86bios
.elif ${MACHINE} == "pc98"
_canbepm= canbepm
_canbus= canbus
_ct= ct
_pmc= pmc
_snc= snc
.endif
2002-09-16 08:32:48 +00:00
.endif
.if ${MACHINE_CPUARCH} == "amd64"
2004-08-30 03:37:36 +00:00
_aac= aac
_aacraid= aacraid
_aout= aout
2007-03-22 18:16:43 +00:00
_acpi= acpi
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
_aesni= aesni
.endif
_agp= agp
_an= an
_amdsbwd= amdsbwd
_amdtemp= amdtemp
2005-03-31 20:21:43 +00:00
_arcmsr= arcmsr
_asmc= asmc
_bktr= bktr
_bxe= bxe
_cardbus= cardbus
_cbb= cbb
_cmx= cmx
_ciss= ciss
_coretemp= coretemp
_cpuctl= cpuctl
_cpufreq= cpufreq
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_cyclic= cyclic
.endif
_dpms= dpms
_drm= drm
_drm2= drm2
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_dtrace= dtrace
.endif
_ed= ed
_et= et
_em= em
_exca= exca
_ext2fs= ext2fs
.if ${MK_SOURCELESS_HOST} != "no"
_hpt27xx= hpt27xx
.endif
_hptiop= hptiop
.if ${MK_SOURCELESS_HOST} != "no"
_hptmv= hptmv
_hptrr= hptrr
.endif
_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
.if ${MK_SOURCELESS_UCODE} != "no"
_ipwfw= ipwfw
.endif
_isci= isci
_iwi= iwi
.if ${MK_SOURCELESS_UCODE} != "no"
_iwifw= iwifw
.endif
_iwn= iwn
.if ${MK_SOURCELESS_UCODE} != "no"
_iwnfw= iwnfw
.endif
2007-10-16 11:39:28 +00:00
_ixgb= ixgb
_ixgbe= ixgbe
_lindev= lindev
_linprocfs= linprocfs
_linsysfs= linsysfs
_linux= linux
_mly= mly
.if ${MK_OFED} != "no" || defined(ALL_MODULES)
_mlx4= mlx4
_mlx4ib= mlx4ib
_mlxen= mlxen
_mthca= mthca
.endif
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
_ntb= ntb
_nvd= nvd
.if ${MK_SOURCELESS_HOST} != "no"
_nve= nve
.endif
_nvme= nvme
_nvram= nvram
_nxge= nxge
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_opensolaris= opensolaris
.endif
.if ${MK_CRYPT} != "no" || defined(ALL_MODULES)
_padlock= padlock
.endif
_pccard= pccard
_qlxge= qlxge
_qlxgb= qlxgb
_qlxgbe= qlxgbe
2012-09-12 19:36:54 +00:00
_rdma= rdma
_s3= s3
_safe= safe
_scsi_low= scsi_low
_sfxge= sfxge
2004-08-29 09:14:18 +00:00
_sound= sound
_speaker= speaker
_splash= splash
_sppp= sppp
_tpm= tpm
_twa= twa
_vesa= vesa
_viawd= viawd
_virtio= virtio
_vmm= vmm
_vxge= vxge
_x86bios= x86bios
_wbwd= wbwd
_wi= wi
_wpi= wpi
.if ${MK_SOURCELESS_UCODE} != "no"
_wpifw= wpifw
.endif
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.endif
.if ${MACHINE_CPUARCH} == "arm"
_cfi= cfi
_cpsw= cpsw
.endif
.if ${MACHINE_CPUARCH} == "ia64"
_aac= aac
_aacraid= aacraid
_aic= aic
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
_dpt= dpt
_em= em
_ep= ep
_et= et
_exca= exca
_fe= fe
_hptiop= hptiop
_ida= ida
_igb= igb
_iir= iir
_ips= ips
_mly= mly
_pccard= pccard
_scsi_low= scsi_low
_sound= sound
_splash= splash
_sppp= sppp
_streams= streams
_tpm= tpm
_twa= twa
_wi= wi
_xe= xe
.endif
.if ${MACHINE_CPUARCH} == "powerpc"
_agp= agp
_an= an
_bm= bm
_cardbus= cardbus
_cbb= cbb
_cfi= cfi
_cpufreq= cpufreq
_drm= drm
_exca= exca
_nvram= powermac_nvram
_pccard= pccard
2009-04-19 21:37:45 +00:00
_sound= sound
_cyclic= cyclic
_dtrace= dtrace
_opensolaris= opensolaris
2003-01-09 16:37:37 +00:00
.endif
.if ${MACHINE_ARCH} == "powerpc64"
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_cyclic= cyclic
_dtrace= dtrace
_opensolaris= opensolaris
.endif
.if ${MK_ZFS} != "no" || defined(ALL_MODULES)
_zfs= zfs
.endif
.endif
.if ${MACHINE_CPUARCH} == "sparc64"
_auxio= auxio
2005-11-09 08:46:02 +00:00
_em= em
_epic= epic
_i2c= i2c
_igb= igb
.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
_opensolaris= opensolaris
.endif
_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>