freebsd-nq/sys/modules/Makefile

495 lines
6.2 KiB
Makefile
Raw Normal View History

1999-08-28 01:08:13 +00:00
# $FreeBSD$
# oldcard -- specialized use for debugging only.
# owi -- totally unsupported for debugging only.
2000-07-07 09:38:01 +00:00
SUBDIR= ${_3dfx} \
${_aac} \
accf_data \
accf_http \
${_acpi} \
${_agp} \
aha \
${_ahb} \
${_aic} \
aic7xxx \
aio \
${_amd} \
amr \
an \
${_aout} \
${_apm} \
${_ar} \
${_arcnet} \
2004-05-16 13:58:27 +00:00
${_arl} \
${_asr} \
2003-06-28 06:18:37 +00:00
ath \
${_ath_hal} \
ath_rate_amrr \
ath_rate_sample \
ath_rate_onoe \
aue \
${_auxio} \
${_awi} \
axe \
bfe \
bge \
${_bios} \
${_bktr} \
bridge \
cam \
${_canbepm} \
${_canbus} \
${_cardbus} \
${_cbb} \
cd9660 \
cd9660_iconv \
${_ciss} \
${_cm} \
coda \
coda5 \
${_coff} \
2004-05-17 14:24:52 +00:00
${_cp} \
${_cpufreq} \
${_crypto} \
${_cryptodev} \
${_cs} \
${_ctau} \
cue \
${_cx} \
dc \
dcons \
dcons_crom \
de \
${_digi} \
${_dpt} \
${_drm} \
dummynet \
${_ed} \
${_el} \
${_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 \
fxp \
${_gem} \
2003-05-31 18:36:41 +00:00
geom \
harp \
hatm \
${_hfa} \
hifn \
hme \
2004-10-24 08:53:40 +00:00
${_hptmv} \
${_i2c} \
${_ibcs2} \
${_ichwd} \
${_ida} \
${_idt} \
${_ie} \
if_disc \
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_ppp \
if_sl \
if_stf \
if_tap \
if_tun \
2001-09-05 23:47:46 +00:00
if_vlan \
${_iir} \
${_io} \
ip6fw \
ipdivert \
${_ipfilter} \
ipfw \
ip_mroute_mod \
${_ips} \
isp \
ispfw \
joy \
kue \
lge \
libiconv \
libmbpool \
libmchain \
${_linprocfs} \
${_linux} \
${_lnc} \
lpt \
mac_biba \
mac_bsdextended \
mac_ifoff \
mac_lomac \
mac_mls \
mac_none \
mac_partition \
mac_portacl \
mac_seeotheruids \
mac_stub \
mac_test \
2002-10-04 07:15:34 +00:00
mcd \
md \
2004-08-02 19:21:51 +00:00
mem \
mii \
mlx \
${_mly} \
2002-10-31 19:39:23 +00:00
mpt \
${_mse} \
msdosfs \
msdosfs_iconv \
2003-02-27 14:49:56 +00:00
my \
${_ncp} \
${_ncv} \
${_ndis} \
netgraph \
nfsclient \
nfsserver \
nge \
${_nve} \
nmdm \
${_nsp} \
ntfs \
ntfs_iconv \
nullfs \
${_nwfs} \
${_oltr} \
${_osf1} \
patm \
${_pccard} \
${_pcfclock} \
pcn \
${_pecoff} \
${_pf} \
plip \
${_pmc} \
portalfs \
ppbus \
ppi \
pps \
procfs \
pseudofs \
${_pst} \
${_random} \
${_ray} \
rc \
rc4 \
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 \
rl \
rp \
rue \
${_s3} \
${_safe} \
${_sbni} \
sbsh \
scd \
${_scsi_low} \
sf \
sis \
sk \
${_smbfs} \
sn \
${_snc} \
snp \
${_sound} \
${_speaker} \
${_splash} \
${_sppp} \
${_sr} \
ste \
${_stg} \
${_streams} \
sym \
${_syscons} \
sysvipc \
ti \
tl \
trm \
2004-04-27 17:57:45 +00:00
${_twa} \
2002-10-21 00:38:18 +00:00
twe \
tx \
txp \
${_uart} \
ubsa \
ubsec \
ubser \
ucom \
ucycom \
udav \
udbp \
udf \
udf_iconv \
2002-10-21 00:38:18 +00:00
ufm \
${_ufs} \
uftdi \
ugen \
uhid \
ukbd \
ulpt \
umass \
2003-06-28 05:46:16 +00:00
umct \
umodem \
ums \
unionfs \
uplcom \
urio \
usb \
uscanner \
utopia \
uvisor \
uvscom \
${_vesa} \
vge \
vkbd \
${_vpo} \
vr \
vx \
wb \
${_wi} \
wlan \
wlan_acl \
wlan_ccmp \
wlan_tkip \
wlan_wep \
wlan_xauth \
${_xe} \
xl
.if ${MACHINE_ARCH} != "sparc64" && ${MACHINE_ARCH} != "powerpc"
_syscons= syscons
.endif
.if ${MACHINE_ARCH} != "powerpc"
2005-02-03 08:07:22 +00:00
_uart= uart
_vpo= vpo
.endif
.if defined(ALL_MODULES)
_ufs= ufs
.endif
2004-12-21 10:16:04 +00:00
.if !defined(NO_CRYPT) || defined(ALL_MODULES)
.if exists(${.CURDIR}/../opencrypto)
_crypto= crypto
_cryptodev= cryptodev
.endif
.if exists(${.CURDIR}/../crypto)
_random= random
.endif
.endif
.if !defined(NO_IPFILTER) || defined(ALL_MODULES)
_ipfilter= ipfilter
2002-10-21 00:38:18 +00:00
.endif
.if !defined(NO_PF) || defined(ALL_MODULES)
_pf= pf
.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
_agp= agp
_aic= aic
_amd= amd
_aout= aout
_apm= apm
_ar= ar
_arcnet= arcnet
_ath_hal= ath_hal
_awi= awi
_bktr= bktr
_coff= coff
2004-05-17 14:24:52 +00:00
_cp= cp
_cpufreq= cpufreq
_digi= digi
_drm= drm
_ed= ed
_elink= elink
_em= em
_ep= ep
_ext2fs= ext2fs
_fe= fe
_hfa= hfa
_i2c= i2c
_ibcs2= ibcs2
_ie= ie
_io= io
_linprocfs= linprocfs
_linux= linux
_lnc= lnc
_mse= mse
_ncp= ncp
_ncv= ncv
_ndis= ndis
_nsp= nsp
_nve= nve
_nwfs= nwfs
_oltr= oltr
_pccard= pccard
_pcfclock= pcfclock
_pecoff= pecoff
_pst= pst
2004-11-15 16:33:18 +00:00
_ray= ray
_safe= safe
_sbni= sbni
_scsi_low= scsi_low
_smbfs= smbfs
_sound= sound
_speaker= speaker
_splash= splash
_sppp= sppp
_sr= sr
_stg= stg
_streams= streams
_wi= wi
_xe= xe
.if ${MACHINE} == "i386"
_aac= aac
_acpi= acpi
2004-06-30 13:09:13 +00:00
_ahb= ahb
2004-03-16 12:43:08 +00:00
_arl= arl
_asr= asr
_bios= bios
_cardbus= cardbus
_cbb= cbb
_ciss= ciss
_cm= cm
_cs= cs
_ctau= ctau
_cx= cx
_dpt= dpt
_el= el
_ex= ex
_exca= exca
2004-10-24 08:53:40 +00:00
_hptmv= hptmv
2004-05-13 11:13:55 +00:00
_ichwd= ichwd
_ida= ida
_idt= idt
_iir= iir
_ips= ips
_mly= mly
_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} == "alpha"
_agp= agp
_ahb= ahb
_ext2fs= ext2fs
_linprocfs= linprocfs
_linux= linux
_osf1= osf1
_sound= sound
_sppp= sppp
.endif
.if ${MACHINE_ARCH} == "amd64"
2004-08-30 03:37:36 +00:00
_aac= aac
#_acpi= acpi # doesn't work on amd64 yet
_agp= agp
_ciss= ciss
_cpufreq= cpufreq
_digi= digi
_drm= drm
_em= em
_ext2fs= ext2fs
_i2c= i2c
_ida= ida
_iir= iir
_io= io
_ips= ips
#_lnc= lnc
_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
_nve= nve
_safe= safe
_scsi_low= scsi_low
_smbfs= smbfs
2004-08-29 09:14:18 +00:00
_sound= sound
_sppp= sppp
_twa= twa
.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
_arcnet= arcnet
_asr= asr
_bktr= bktr
_cardbus= cardbus
_cbb= cbb
_ciss= ciss
_cm= cm
_coff= coff
_el= el
_em= em
_ep= ep
_exca= exca
_fe= fe
_hfa= hfa
_iir= iir
_mly= mly
_pccard= pccard
2004-11-15 16:33:18 +00:00
_ray= ray
_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"
_gem= gem
2003-01-09 16:37:37 +00:00
.endif
.if ${MACHINE_ARCH} == "sparc64"
_auxio= auxio
_gem= gem
_sound= sound
.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>