Commit Graph

411 Commits

Author SHA1 Message Date
xtraeme d347a5866b Move the code that checks for a powernow capable cpu to pnowk7_init(),
so that the kernel and the lkm can use it without having it in two
files... plus minor fixes (idea from Rhialto).
2006-01-15 04:12:09 +00:00
xtraeme 8173ef37e7 AMD PowerNow LKM contributed by Olaf 'Rhialto' Seibert. 2006-01-11 00:18:28 +00:00
christos 95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
christos ad2ddf6d2d Revert previous accidental removal of -DINET6 2005-09-06 23:27:33 +00:00
christos 12184b6c26 Revert inappropriate -D additions. 2005-09-06 23:25:54 +00:00
rpaulo 6459ccf2df Add freebsd_sysctl.c 2005-09-02 14:34:53 +00:00
rpaulo 5530080d86 Add freebsd_sched.c 2005-09-02 13:34:46 +00:00
drochner 9ab0a3e02e struct cfdata doesn't have locnames anymore 2005-08-25 15:08:06 +00:00
christos 50f8955b6e 64 bit inode changes. 2005-08-19 02:04:03 +00:00
drochner 20b1effdae build pci/pcmcia driver LKMs only on i386 and alpha
(this is where I could test, could be more)
2005-07-23 16:11:18 +00:00
drochner bf66affbd6 let the build descend to device driver LKMs
this is more to make sure things don't bitrot than to provide
a useful set of modules
(the wi@pcmcia module is useful for me actually)
2005-07-22 20:14:55 +00:00
mrg 1f42a99845 enable the vnd LKM. i meant to do this when this LKM first appeared. 2005-06-26 05:36:57 +00:00
peter a9b411c198 Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
2005-06-20 13:25:23 +00:00
matt ea25c64213 Use coredump_elf32, not coredump_netbsd. 2005-06-11 20:06:46 +00:00
thorpej 5821e751d0 Use TOOL_GENASSYM. 2005-05-30 18:33:15 +00:00
he c8a976c70d Reduce optimization level for sh5 for one file which causes our gcc
3.3.3 to get an internal compiler error of type "can't split insn".
2005-05-26 18:33:36 +00:00
dogcow f652e348df With the move of linux_trap.c from sys/arch/i386/i386/ to sys/arch/x86/x86,
it's no longer in .PATH; add $S/arch/x86/x86 inside the i386 .if.
2005-05-16 07:48:07 +00:00
dogcow f7c2079f42 add missing prototype for when CODA_COMPAT_5 is #define'd 2005-03-28 06:59:13 +00:00
peter 5b342fe86a Correct the entry point for the coda5 LKM. 2005-03-27 18:43:47 +00:00
christos b4e68c8648 PR/29630: Takehiko NOZAKI: undefined symbols 'linux_ioctl_mtio'
in /usr/lkm/compat_linux.o
2005-03-08 15:26:23 +00:00
perry 477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
peter 1c9b56c830 Add MKIPFILTER; if set to no, don't build and install the ipf(4) programs,
headers and LKM.

Add MKPF; if set to no, don't build and install the pf(4) programs,
headers, LKM and spamd.

Both options default to yes, so nothing changed in the default build.

Reviewed by lukem.
2005-02-22 14:39:58 +00:00
jmc 9b1c35ec87 Fixes from PR#29289. Need linux_sg.c in here now as well 2005-02-10 17:37:35 +00:00
martti 534d9de60b Added -DINET 2005-02-09 06:41:01 +00:00
martti a023cb1d19 Upgraded IPFilter to 4.1.5 2005-02-08 07:01:52 +00:00
cube 9c61428178 Install tap(4) LKM. 2005-01-24 15:50:52 +00:00
oki 50d1aadd13 kill __P. 2005-01-22 01:36:59 +00:00
cube 5c44c50b34 Default to using (well, assuming) bpf. 2005-01-19 14:59:08 +00:00
cube daeec6c990 ethfoo(4) is no more. You'll find everything under sys/net/if_tap.[ch]
and sys/lkm/net/tap/if_tap_lkm.c.
2005-01-19 11:12:11 +00:00
cube fead024e60 LKM version of if_tap, derived from ethfoo code. 2005-01-19 11:09:05 +00:00
cube 6717eabf3a ETHFOO_GOING had no chance to actually be useful if sc_flags is set to 0
in ethfoo_dev_close().
2004-12-17 12:17:09 +00:00
cube e32b031c0f Change cf_fstate value to FSTATE_STAR to avoid a panic in config_detach()
for DISAGNOSTIC kernel.  That value of struct cfdata is not currently used
for pseudo-device attachments anyway.
2004-12-13 19:40:56 +00:00
cube ab9c18a45c Constify. From Peter Postma. 2004-12-13 19:26:34 +00:00
cube 3957e91683 Fix compilation on LP64 hosts. Reported by Peter Postma. 2004-12-13 19:22:57 +00:00
cube 89a3fae64d Fix a comment. 2004-12-13 19:21:42 +00:00
cube f770d4aa14 Remove tests that used to make it possible to compile ethfoo_lkm.c with
older versions of NetBSD (specifically, before ksyms was introduced), as
a lot of other changes makes that impossible anyway.
2004-12-12 22:15:28 +00:00
cube dfc44125a6 Turn ethfoo(4) into a cloning device, following the MOVEFD semantics (like
bpf(4)).

While doing that, still keep around the full cdevsw interface, so that the
ethfoo interfaces can be accessed either through /dev/ethfooN or through
the cloning device /dev/ethfoo (whose minor number is 0xfffff).  Interfaces
created through the cloning device are destroyed at close() time.

Also add an ioctl() to be used by the cloning interface user to know the
minor number of the created interface, so it can be manipulated later to
get an address set and turned up (otherwise EHOSTDOWN is returned on read
and write).

Document some of the new functions, but read, write, ioctl and kqfilter
still has to be commented.
2004-12-12 21:46:58 +00:00
peter b2618f9ac2 ifc_destroy returns an int. 2004-12-04 18:40:45 +00:00
cube 0af5ad74e4 Free mbufs as they're read instead of leaking them. Now qemu lets me do a
FTP install in tunfd network mode.
2004-11-15 20:19:06 +00:00
cube 992f7838e6 It compiles at WARNS=3. 2004-11-14 20:06:03 +00:00
cube 96c0d03c20 Add tap (as in Linux's tap) functionality to ethfoo. That means you now
have a device interface to the ethfoo devices through a device node.

select, poll, kqueue and SIGIO are possible on that device node.  See TODO
for what remains to be done at that level.
2004-11-14 20:05:42 +00:00
he 19278a71d3 Um, linux_exec_machdep.c only exists on i386, so don't try to compile
it for the other machine types which traverse this directory.
2004-11-14 12:19:28 +00:00
he c8d952d682 Um, linux_exec_machdep.c only exists on i386, so don't try to compile
it for the other machine types which traverse this directory.
2004-11-14 11:40:08 +00:00
skrll 7139fbfc16 Add sources to SRCS not KMOD. 2004-11-13 13:37:06 +00:00
christos 66075fd33d Fix all the borken exec lkms. setup_stack is mandatory. 2004-11-13 06:09:47 +00:00
jdolecek 1782122374 move sys/lkm/vfs/miscfs/ptyfs/ to sys/lkm/vfs/ptyfs/ 2004-11-11 19:25:30 +00:00
jdolecek e086026946 convert to one 'SUBDIR+=' per entry format 2004-11-11 19:24:04 +00:00
christos 58ac79db8d Add ptyfs lkm. 2004-11-11 01:43:25 +00:00
thorpej 0b0e09815e Update config_attach_pseudo() example. 2004-10-15 04:51:48 +00:00
thorpej c7dc2875d8 Don't need to use config_makeroom() here. 2004-10-15 04:48:24 +00:00
christos 891bc12ddc Account for pending ipf move. 2004-10-01 15:20:45 +00:00
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