Commit Graph

410 Commits

Author SHA1 Message Date
christos 650f6a8ec7 use <netinet/...> for the ipf headers like everything else. 2004-10-01 15:20:33 +00:00
he e1ca5516de Remove reference to now-deleted aoutm68k_ioctl.c. 2004-09-16 09:35:38 +00:00
thorpej 483ec9af85 Remove the COMPAT_AOUT LKM build infrastructure. The code is gone,
now.
2004-09-14 22:12:06 +00:00
he 936dfb04a0 More removal of references to aoutm68k_syscalls.c, following that file's
removal.  Allows our m68k ports to build again.
2004-09-12 08:04:50 +00:00
martti c72a29a530 Better kernel module for IPF (kern/26112 by Peter Postma) 2004-08-30 11:32:33 +00:00
drochner de8db0c004 also provide an example how a pci driver LKM looks
(This is just a dummy driver which doesn't touch the hardware.)
2004-08-18 14:06:13 +00:00
drochner b1a9bed356 add an LKM for "wi at pcmcia" as an example for the new MOD_DRV LKM type 2004-08-18 13:12:07 +00:00
cube 43a2c97ad2 Include pcidevs.h, because in a real driver, you'd need it. 2004-07-06 12:21:55 +00:00
cube f584691eb3 Hands are not good at pasting stuff. 2004-07-06 12:15:58 +00:00
cube f04e188b92 Add prototype for the forged <module>_lkmentry function. Pointed out by
rtr@.
2004-07-06 12:10:13 +00:00
skrll c561286bf0 wizd missed one! 2004-07-02 13:42:06 +00:00
wiz 711c55c92c Drop trailing whitespace; fix Dd argument; use standard section headers;
sort SEE ALSO; use \*[Lt]\*[Gt] instead of <>; empty lines are fine in
.Bd/.Ed.
2004-07-02 13:38:14 +00:00
wiz 07b563fdee Fix typo. 2004-07-02 13:33:39 +00:00
cube 4791863f66 Add 'pcilkm' module.
It is a layer to make it possible to have loadable PCI device drivers.

First you load (with symbols) the pcilkm module, then you can load PCI
drivers that have been compiled to work with pcilkm.

Two examples are provided.  'pcienum', the first one, is a simple
demonstration of how to use pcilkm:  it is the basic skeleton of a PCI
driver, and will attach at load time to all PCI devices known to the
system.

The second example 'auich' demonstrates how simple it is to use an
existing driver as a LKM.  It simply includes the code for auich(4) and
then adds the necessary pcilkm logic.  However there are some drawbacks
that are described in the README file.
2004-07-02 13:26:40 +00:00
itojun fbbd2967d1 forgot to "cvs add". noted by Havard 2004-06-30 09:51:43 +00:00
tron 0e42006ea8 Build pf(4) lkm. 2004-06-30 09:21:26 +00:00
jmc 3b3bf466dc Don't build the pf lkm. It's missing entire files at the moment. Re-enable
once it compiles
2004-06-30 03:21:10 +00:00
jmc 7e941f7f6b Add a missing NetBSD tag 2004-06-30 02:55:15 +00:00
itojun 0407dd42ae make PF lkm working. from Peter Postma and Joel Wilsson.
remove pf_ioctl_head/pf_newif_head, which was never used.
2004-06-29 04:42:54 +00:00
christos e287801e16 make this compile and fix error handling (does not load yet). 2004-06-22 18:04:05 +00:00
itojun 7ef0131ac7 PF LKM - not working (ld dumps core) because of the lack of my LKM knowledge.
committed to ask help from LKM guru.
reviewed by matt, christos, perry
2004-06-22 14:18:58 +00:00
mhitch 4c9aff16f0 Addition of header files for sysctl set function prototypes referenced
structs defined in other header files.  Gcc 2.95 on vax doesn't like this.
Add appropriate header files to fix vax compile failures.
2004-05-25 01:36:37 +00:00
atatat 10a7ba9ef6 Tweak sysctl setup functions (the macros, actually) for use in lkms,
and tweak lkminit_*.c (where applicable) to call them, and to call
sysctl_teardown() when being unloaded.

This consists of (1) making setup functions not be static when being
compiled as lkms (change to sys/sysctl.h), (2) making prototypes
visible for the various setup functions in header files (changes to
various header files), and (3) making simple "load" and "unload"
functions in the actual lkminit stuff.

linux_sysctl.c also needs its root exposed (ie, made not static) for
this (when built as an lkm).
2004-05-20 06:34:24 +00:00
cube a1ec763832 It's not safe to save the sysctlnode pointer returned by sysctl_createv.
It should only be used by the calling function to create further nodes
in the same function, and of course to save the MIB number, which is what
is done now.
Correct a stupid bug in the ethernet address parsing code. <ashamed face>
2004-05-13 07:20:47 +00:00
cube aea96fa075 Add a sample utilization of Andrew Brown's sysctl framework. See comments
in the code for more details.
Give copyright to TNF.
2004-05-12 13:51:16 +00:00
martti 6cb8b4cb48 Set PATH and use ip_fil_netbsd.c 2004-03-28 09:37:14 +00:00
martti 24d567d60d Upgraded IPFilter to 4.1.1 2004-03-28 09:00:53 +00:00
mrg a698ba9223 allow the number of vnd's created to be patchable... 2004-03-21 10:51:16 +00:00
atatat 0275942afd Alphabetize... 2004-01-20 04:55:46 +00:00
matt 4ff8ae6cfa Enhance the scripts to not use trampolines for symbols which are internal
to the module.
2004-01-16 00:35:48 +00:00
simonb c1d14e3852 Try to spell "NetBSD" correctly... 2003-12-30 07:08:08 +00:00
atatat fb4d990f63 Fix example lkms. The misc/example one was never converted to the new
lkm stuff, and syscall/example was never told that we use lwp now, and
not proc.
2003-12-30 06:53:26 +00:00
cube 8db032b396 Add ethfoo LKM example. It implements a cloning interface for fake
Ethernet devices that can be assigned an Ethernet address using the
included setaddr utility.
2003-11-24 21:58:45 +00:00
scw 7f80949f0d Use the same trick as powerpc to resolve the 24-bit pc-relative
branch limitation.
2003-11-04 14:50:27 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
christos cd026bf62c Sprinkle more COMPAT_NETBSD32 for good cheer. 2003-10-16 16:06:43 +00:00
christos b51967d220 add -DCOMPAT_NETBSD32 so that it builds. 2003-10-16 15:59:01 +00:00
christos 74e287ff04 Add more compat options until this builds. 2003-10-16 15:57:12 +00:00
lukem 9c437ec754 Change `LNFILES' to `BUILDSYMLINKS', to more accurately describe its purpose.
Per discussion with Simon Gerraty.
2003-09-20 06:20:41 +00:00
christos 86226ab757 fix for non-objdir build. reported by tron. 2003-09-13 22:25:47 +00:00
christos d91e004306 add missing path. 2003-09-12 16:29:09 +00:00
tron d08125d839 Wrap overlong lines, fix indentation. 2003-09-12 14:06:48 +00:00
christos e4ce502bf6 give this Makefile a chance to work, by eliminating unneeded complexity. 2003-09-12 13:05:28 +00:00
christos b3fcf8836e newed -DCOMPAT_IBCS2 now. 2003-09-12 13:01:57 +00:00
christos 654fd674fb add the SYSV compat flags needed. 2003-09-12 02:08:35 +00:00
itojun 8ca90bd4e4 add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8).
it allows easier access to ipsecsa/sp.  it works around problem where
setkey -D does not work with large number of ipsec SAs due to socket buffer
size.
2003-09-08 06:51:53 +00:00
tron fadd4495f2 Adding "${.CURDIR}/../coda" to the path causes build failures if object
files exist in that directory. Simply creating a symbolic link to the file
"${.CURDIR}/../coda/lkminit_vfs.c" via "LNFILES" fixes that problem.
2003-09-07 12:25:54 +00:00
jdolecek f7394f424e switch over to DISPATCH(), it calls the 'load' entry point in right
order now
2003-09-06 13:34:56 +00:00
jdolecek c8390a7dbc simplify struct sysent handling a bit more; store old sysents before
overwriting them with LFS syscalls, and restore to original contents
on module unload
2003-09-06 13:30:50 +00:00
jdolecek f67c969fe0 ANSIfy 2003-09-06 13:20:41 +00:00
jdolecek d21da2d8e2 switch to DISPATCH() - it now calls the 'load' routine in order we want here
while here, simplify struct sysent handling a bit, fixing setting of sy_flags
2003-09-06 13:16:17 +00:00
jdolecek ffac54bf71 convert over to standard LKM macros; done by defining the VFS
and DEV parts in separate functions, and calling those dispatch
functions from coda_lkmentry()
2003-09-06 10:56:37 +00:00
jdolecek 67d5719f24 ANSIfy 2003-09-06 08:45:18 +00:00
jdolecek 07fce822f1 share lkminit_vfs.c with coda module 2003-09-06 08:40:42 +00:00
lukem 7237dbc136 missing rcsid 2003-09-04 07:51:21 +00:00
lukem f7fe23abb3 use LNFILES to simplify creation of symlinks in .OBJDIR for builds 2003-09-04 07:18:01 +00:00
drochner ffad96d540 add coda5, sort 2003-09-02 17:15:46 +00:00
drochner 35755efb8c as requested by Jaromir Dolecek:
Add a "coda5" LKM which is "coda" with the "CODA_COMPAT_5" option.
This deliberately conflicts with "coda" as they can't coexist within
one kernel.
2003-09-02 12:08:45 +00:00
jdolecek fbf6a5667f make compile
adresses PR kern/22622 by Thomas Devreese
2003-09-01 17:11:03 +00:00
oki f3dd49b44c Add exec_setup_stack in execsw for lkm. Hi christos! 2003-08-18 09:04:45 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
chris e0c81274e0 Another proc->lwp change. 2003-06-29 17:18:48 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
lukem cd93af5dd7 use "rm -f $@ ; ln -s ... $@" instead of "ln -sf ... $@" 2003-05-04 06:36:37 +00:00
wiz 1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
jdolecek ea586f43e5 LKMs work on PowerPC nowadays, remove item from TODO 2003-05-03 08:22:35 +00:00
matt 275eeea6c9 The __wrap_* symbols need to become local symbols. If you have module
x which is dependent y but they both have __wrap_foo, if the __wrap_foo
is not localized, you will get linker truncation messages.
2003-04-23 18:34:20 +00:00
jdolecek 4ecc3047b1 also rewrite emul_find_interp() calls to include the ${COMPAT_UTIL_OVERRIDE}
prefix
2003-04-22 17:23:20 +00:00
jdolecek 5fd8296ac8 add LKM for file system SMBFS
XXX the LKM requires nsmb pseudo device in kernel to load successfully ATM
2003-04-02 09:45:42 +00:00
christos e950c1ac8f PR/20844: Iain Hibbert: PPP Compressors cannot be loaded as LKM 2003-03-27 17:50:06 +00:00
jdolecek ad5a73ba6b build and install union LKM now that it works 2003-03-17 09:18:53 +00:00
jdolecek a0deb3e9c4 move union filesystem code from sys/miscfs/union to sys/fs/union 2003-03-16 08:26:46 +00:00
jdolecek 0d2891bece need a prototype for union_lkmentry() to compile 2003-03-16 08:01:13 +00:00
perseant b105ddb1d6 Make LFS LKM versions of ufs_makeinode and ufs_mkdir fail correctly.
Note dependency of lfs_vnops.o on ufs_readwrite.c.
2003-03-15 07:20:22 +00:00
dsl b7c921ed3d The IDT is an array of struct gate_descriptor. 2003-03-04 10:39:10 +00:00
matt f7418ccd14 Add helper awk scripts for generating trampolines for PowerPC LKMs. 2003-02-19 19:04:27 +00:00
martin cfa07275ad Follow changes in rev. 1.79 of sys/kern/exec_conf.c
(if emulation uses elf32_copyargs(), it shouldn't use it's own idea
of how many AUX arguments are actually passed)
2003-02-19 15:43:56 +00:00
matt 3b768ce056 PPC_MPC6XX is now PPC_OEA 2003-02-06 22:23:11 +00:00
thorpej 5819507df3 Merge the nathanw_sa branch. 2003-01-19 16:30:13 +00:00
christos f8517f9ae2 add procfs_fd.c 2003-01-03 13:22:23 +00:00
jdolecek 98d58548c7 move msdosfs code from sys/msdosfs to sys/fs/msdosfs 2002-12-26 12:31:23 +00:00
jdolecek 6641019152 add cd9660 subdirectory 2002-12-24 08:12:15 +00:00
david fa8f4c27d5 isofs dir will be empty after update -dP, now that all contents are in
the Attic. Make clean was broken for me without this.
2002-12-24 02:56:10 +00:00
jdolecek 3a8872dee7 move cd9660 filesystem code from sys/isofs/cd9660 to sys/fs/cd9660 2002-12-23 17:52:02 +00:00
jdolecek 5d0e84b25e flatten the LKM vfs hierarchy a bit - no need for isofs/cd9660, put
the LKM code directly to cd9660 directory
2002-12-23 17:45:14 +00:00
jdolecek 9accf4df15 move NTFS code from sys/ntfs to sys/fs/ntfs 2002-12-23 17:38:19 +00:00
jdolecek 5356de155a move filecorefs code from sys/filecorefs to sys/fs/filecorefs 2002-12-23 17:30:36 +00:00
jdolecek 829bd3c01c adosfs moved from sys/adosfs to sys/fs/adosfs 2002-12-23 17:23:13 +00:00
scw 36109bbc9c Avoid strict-alias warnings. 2002-12-11 12:13:11 +00:00
jdolecek e1c47ec557 remove obsolete comment 2002-12-03 14:34:33 +00:00
jdolecek fdb9be22e1 add basic framework to build compat_irix LKM
the LKM is not likely to actually do anything useful, but this is good
to quickly check compat/irix is buildable
2002-11-30 13:41:40 +00:00
jdolecek dd330529e7 add rename for emul_find_interp(), too 2002-11-29 17:11:21 +00:00
jdolecek 8ad945a36b add freebsd_fork.c 2002-11-28 21:55:48 +00:00
lha f882e535ec deal with the .s -> .S change for i386 2002-11-23 02:15:45 +00:00
mrg 20998b4001 vnd.c
- allow vnddetach() to return EBUSY if any vnd's are currently initialised.
lkm:
- add new 'dev' directory, initially with just a 'vnd' LKM.  for now, the
vnd lkm driver requests 4 devices....

XXX: vnd should be converted to a psuedo-device that creates & deletes
instances of itself (vnd0, vnd1, etc) when vnconfig -c/-u are called,
then the vnd lkm driver can not be limited to '4' by default.
2002-11-16 08:10:48 +00:00
jdolecek cee43b67cc add generic linux compat ELF copyargs function
this gives:
* linux sysconf(_SC_CLK_TCK) gives correct value for linux binaries (hz)
  even if hz != 100
* glibc gets proper information on real/effective uid and enables
  secure mode for suid binaries

g/c LINUX_COPYARGS_FUNCTION, replaced by linux ELF copyargs function
g/c alpha-specific linux ELF copyargs function and linux ELF defines
2002-11-13 15:16:27 +00:00
fvdl b3e87c44a4 Adjust callers to setgate() to match new prototype. 2002-10-06 10:40:04 +00:00
gehenna 13cbb957cf make this compile. 2002-09-06 16:56:13 +00:00
gehenna 77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
christos 0bd5494ee5 make this compile again (thanks mrg) 2002-08-27 14:18:41 +00:00
thorpej 8e9b95428b Revert rev. 1.10 of Makefile and fix the problem properly by adding
-D_KERNEL -D_LKM to AFLAGS in Makefile.common.
2002-06-02 23:46:49 +00:00
itojun 3ec91458b1 not sure if it is right, but svr4_sigcode.s does not compile on i386 without it.
PR 17121
2002-06-01 20:13:42 +00:00
simonb 02656b2e09 Change retval to be an array of register_t instead of array of int. 2002-06-01 14:07:33 +00:00
thorpej f944a0674f Remove unnecessary -I$S; bsd.kmod.mk adds -isystem $S 2002-05-30 18:53:14 +00:00
jdolecek 357b304b86 add some procfs files which seem to be needed nowadays 2002-05-25 20:39:50 +00:00
jdolecek ff2064e0c8 make compat_linux LKM buildable on macppc 2002-05-19 18:18:36 +00:00
mycroft baf701415e Fix a file name. 2002-04-10 04:21:27 +00:00
mycroft bdfc53717b Fix SRCS so this compiles again. 2002-04-10 04:12:42 +00:00
enami 101714165d Now linux_sigarray.c is included by newly created linux_signo.c. 2002-04-01 06:54:55 +00:00
oki e6930c6900 PE/COFF header size is PECOFF_HDR_SIZE, not sizeof(struct exec). 2002-03-29 17:49:21 +00:00
kent d469e9cf08 Use compat_util with overriding. 2002-03-29 17:09:30 +00:00
kent 2260d0eb5d Copy syscall entries for SYSVSHM to syncronize kernel option. 2002-03-27 20:54:29 +00:00
kent 9392b84ff9 Introduce a new LKM `compat_pecoff'
Add it to SUBDIR.

To enable PECOFF, do the following:
	# modload /usr/lkm/compat_pecoff.o
	*then*
	# modload /usr/lkm/exec_pecoff.o
2002-03-25 06:52:41 +00:00
kent 79decd163e Move 'pecoff' to installable SUBDIR 2002-03-24 15:01:57 +00:00
oki e60e94456a emul_netbsd is no longer used in exec_pecoff. 2002-03-18 08:16:08 +00:00
martti 83b3487b70 Upgraded IPFilter to 3.4.25 2002-03-14 12:32:36 +00:00
oki 7160cfdbde PE/COFF exec LKM, currently for i386 platform. 2002-03-12 07:47:35 +00:00
fvdl 99d2b6e3ef Add linux_sysctl.c 2002-02-23 16:46:03 +00:00
is 372cac3316 The linux lkm doesn't compile anymore on m68k 2002-02-16 11:02:37 +00:00
mrg 993c6eb6ac need core_elf32.c as well, now. 2002-02-10 16:25:49 +00:00
mrg 42aa4bc31d use MACHINE_ARCH for sparc & sparc64. 2002-02-10 16:25:35 +00:00
mrg 13ba5ca255 the exec LKMs work on sparc64. 2002-02-10 15:46:28 +00:00
mrg d3fc678205 look in sys/arch/${MACHINE}/${MACHINE} as well as ${MACHINE_ARCH} 2002-02-10 15:43:41 +00:00
mrg 1b9f6c7a2e build svr4_sigcode.s on sparc 2002-02-10 15:42:57 +00:00
mrg cf5b2d8368 build sunos_machdep.c and sunos_sigcode.s on sparc & sparc64 2002-02-10 15:41:58 +00:00
mrg 34b423fa60 don't build compat_aout LKM; hasn't been tested. 2002-02-10 15:40:32 +00:00
fredb c26310d581 whitespace cleanup 2002-02-05 15:28:03 +00:00
fredb 31543d3f23 Add an explicit transformation for iwm.s -> iwm.o, patterned after the
kernel's ${NORMAL_S}. In particular, we need the ${CPPFLAGS} from
<bsd.kmod.mk> to support non-self-hosted builds. (Changing iwm.s to iwm.S
would also work.)
2002-02-05 15:26:52 +00:00
martti a54225fdf9 Added missing -DIPFILTER_LKM 2002-01-24 13:50:32 +00:00
martti b9920d0f43 Upgraded IPFilter to 3.4.23 2002-01-24 08:21:30 +00:00
thorpej 14164755e0 Switch ELF emulations to ELF core files. 2002-01-04 06:50:59 +00:00
thorpej 3d25834fb6 Fix a typo. 2001-12-14 20:51:01 +00:00
lukem c10ff7575c YANOMAN= 2001-12-13 01:26:39 +00:00
lukem b574ee0f82 define NOMAN= once, at the real top level of lkm 2001-12-12 12:06:45 +00:00
lukem 19d9b95273 define NOMAN= once, at the top level 2001-12-12 11:56:05 +00:00
lukem 00255d260d define NOMAN= once, at the top level 2001-12-12 11:44:43 +00:00
tv 8e6f7afb5b MKfoo=no -> NOfoo 2001-12-12 01:48:43 +00:00
jdolecek 4fbc1b008e one more - it would be nice to have LKMs actually working on PowerPC platforms 2001-12-12 00:05:30 +00:00
thorpej b5ea4050f9 Update for core dump changes. 2001-12-10 19:18:49 +00:00
gmcgarry 6f71c27e26 MACHINE_ARCH -> MACHINE_CPU 2001-12-10 07:27:52 +00:00
gmcgarry 47e4542449 Pull in <bsd.own.mk> early so we can use MACHINE_CPU. Use
MACHINE_CPU instead of MACHINE_ARCH.
2001-12-10 07:26:47 +00:00
thorpej 165f442f86 Update for "coredumps now exec-format/emulation specific". 2001-12-08 00:37:07 +00:00
jdolecek fd7c36bef3 need compat_exec.c for some old a.out formats 2001-11-26 20:38:15 +00:00
lukem f5e6ca8797 add RCSIDs 2001-11-12 23:22:57 +00:00
jdolecek d1842b740a Restructure to the lkm/compat/Makefile way - the tested & installed
modules are on top, rest is added .if !make(install). This will avoid
such silly mistakes as rev. 1.7/1.8.
2001-11-01 19:32:53 +00:00
tron 7a726f828b Fix botch in last commit which caused some of the "exec" LKMs not to be
built.
2001-11-01 13:41:42 +00:00
jdolecek d58125dd1f kill one more duplicate 2001-10-31 21:15:43 +00:00
jdolecek f15ae836f3 kill duplicates 2001-10-31 21:13:23 +00:00