Commit Graph

915 Commits

Author SHA1 Message Date
jmcneill e1f7e773d4 Add video(4) 2008-09-06 19:18:16 +00:00
reinoud 627e960617 Back out dirhash kernel module for now. 2008-08-30 10:49:27 +00:00
reinoud 0a5ad4e15d Add dirhash kernel module for sharing dirhashing support with other FS
other than UDF. Its FS agnostic and could be used for any FS

Note to self: manpage needs to follow.
2008-08-29 14:20:25 +00:00
tls 717f903a98 Add accept filters, ported from FreeBSD by Coyote Point Systems. Add inetd
support for specifying an accept filter for a service (mostly as a usage
example, but it can be handy for other things).  Manual pages to follow
in a day or so.

OK core@.
2008-08-04 03:55:47 +00:00
simonb 36d65f1138 Merge the simonb-wapbl branch. From the original branch commit:
Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.
2008-07-31 05:38:04 +00:00
pooka cc7d901591 vfs_subr2 has lost its will to live. vfs_subr was originally split
into two parts so that some of the routines could be used by rump.
Now that rump uses both vfs_subr and vfs_subr2 and there is no
reason to keep two files lying around, re-unite them.
2008-07-16 20:06:19 +00:00
drochner 52b8fec3cf clean up some useless code and variables in cardbus attachment 2008-06-24 17:32:09 +00:00
cube 53faa53d5a Do proper config(5) version checking after previous changes [hi drochner!].
The rule is, if you change scan.l or gram.y, you bump the config(5)
version.  If you implement the changes under sys/conf/files or affiliate,
you bump the required version in sys/conf/files or in an appropriate place
to minimise annoyance.  If the changes makes new config(1) incompatible
with a previous version of config(5), embed it in config(1) using the
CONFIG_MINVERSION definition along with CONFIG_VERSION.

This has been in the tree for what, 3 years now?  It's even documented...
2008-06-10 14:03:57 +00:00
drochner 1f0a423884 use new "defpseudodev" where appropriate, and remove dummy interface
attribute definitions which were only to trick config(8)
2008-06-10 12:49:16 +00:00
jmcneill 3a8a32076d Add DRVGETEVENT support for /dev/drvctl, based on devmon support by
Jachym Holecek for Google Summer of Code. DRVGETEVENT plist is currently
limited to event type, device name, and device parent name.
2008-05-25 12:30:40 +00:00
ad 3b0a20c6a8 Fix previous. 2008-05-05 13:42:15 +00:00
ad 2bbb14eaa4 Back out previous. It broke the build. 2008-05-05 13:41:29 +00:00
ad b407147f14 Move zlib out of net/ and into kern/. It would probably be better to use
the reachover Makefiles and libz, but this is already here and it works.
2008-05-04 23:07:09 +00:00
rmind 1942fc2548 Split the runqueue management code into the separate file.
OK by <ad>.
2008-04-29 14:35:20 +00:00
ad 678e546158 -defflag PREEMPTION 2008-04-28 22:46:40 +00:00
ad 343816f86a defopt PREEMPTION 2008-04-28 15:46:48 +00:00
thorpej 34908fe541 Add subroutines to support collating per-cpu-gathered network statistics. 2008-04-23 05:21:17 +00:00
skrll 770e609eb3 Add support for NCR 53C720 found on various machines/attachments.
From OpenBSD (Mark Kettenis)
2008-03-30 12:32:13 +00:00
skrll c36ab687e9 Tidyup the attachment of various devices in the same way as OpenBSD and
use the same name.

Must have been funny to someone.
2008-03-29 15:59:25 +00:00
ad 3acbed8e48 Split select/poll into their own file. 2008-03-23 14:02:49 +00:00
ad a9ca7a3734 Catch up with descriptor handling changes. See kern_descrip.c revision
1.173 for details.
2008-03-21 21:54:58 +00:00
mjacob 70944bcde1 Make some changes to isp(4) options: add a disable for 2322 suppport;
remove the option for firmware crash dumps; add a ISP_VPORTS option
for virtual ports (24XX, coming soon).
2008-03-11 05:24:38 +00:00
isaki 7c60b08fd1 slhci also shares usbroothub_subr. 2008-02-24 05:29:31 +00:00
drochner bb33f35f20 Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
2008-02-20 21:43:33 +00:00
martin 6ba1a4c045 defflag CPU_IN_CKSUM 2008-02-03 13:25:57 +00:00
drochner d9459c5f21 share some code for USB root hub emulation which is common in the 3
host controller implementations, start with two little functions
which fake up string descriptors (which were inconststent, language
table fetching didn't interoperate with other code in the tree)
2008-02-03 10:57:11 +00:00
dholland 717e1785a5 Fix some race conditions in rename.
Introduce a per-FS rename lock and new vfsops to manipulate it.
Get this lock while renaming. Also add another relookup() in do_sys_rename,
which is a hack to kludge around some of the worst deficiencies of
ufs_rename.
reviewed-by: pooka (and an earlier rev by ad)
posted on tech-kern with no objections.
2008-01-28 14:31:15 +00:00
joerg 6e869e402d Refactor in_cksum/in4_cksum/in6_cksum implementations:
- All three functions are included in the kernel by default.
  They call a backend function cpu_in_cksum after possibly
  computing the checksum of the pseudo header.
- cpu_in_cksum is the core to implement the one-complement sum.
  The default implementation is moderate fast on most platforms
  and provides a 32bit accumulator with 16bit addends for L32 platforms
  and a 64bit accumulator with 32bit addends for L64 platforms.
  It handles edge cases like very large mbuf chains (could happen with
  native IPv6 in the future) and provides a good base for new native
  implementations.
- Modify i386 and amd64 assembly to use the new interface.

This disables the MD implementations on !x86 until the conversion is
done. For Alpha, the portable version is faster.
2008-01-25 21:12:10 +00:00
joerg 0d7c94dad4 Add a stub file that includes a bunch of kernel headers and always get
compiled with -g. For the initial set, netbsd on amd64 grows by around
80KB. This allows much easier use of GDB for post-mortem debugging as
it can understand the layout of data structures. The additional data can
be strip(1)ped off normally for size constraint environments.
2008-01-17 20:14:49 +00:00
ad bbc79e58a6 Pull in my modules code for review/test/hacking. 2008-01-16 12:34:50 +00:00
rmind 5c71a4d49f Implementation of processor-sets, affinity and POSIX real-time extensions.
Add schedctl(8) - a program to control scheduling of processes and threads.

Notes:
- This is supported only by SCHED_M2;
- Migration of LWP mechanism will be revisited;

Proposed on: <tech-kern>. Reviewed by: <ad>.
2008-01-15 03:37:10 +00:00
yamt ea8e75911e add a per-cpu storage allocator. 2008-01-14 12:40:02 +00:00
ad 0805a9416a Add MODULAR option. Include kernel linker stuff if MODULAR. 2008-01-06 18:03:58 +00:00
yamt 48a1e4c2c1 a simple performance monitor based profiler, inspired from linux oprofile. 2008-01-01 21:28:37 +00:00
ad 2ecdf58c2c Remove systrace. Ok core@. 2007-12-31 15:31:24 +00:00
ad 9f6b8c4d04 Remove COMPAT_HPUX. 2007-12-31 13:38:47 +00:00
christos 65c680cad7 Add PaX ASLR (Address Space Layout Randomization) [from elad and myself]
For regular (non PIE) executables randomization is enabled for:
    1. The data segment
    2. The stack

For PIE executables(*) randomization is enabled for:
    1. The program itself
    2. All shared libraries
    3. The data segment
    4. The stack

(*) To generate a PIE executable:
    - compile everything with -fPIC
    - link with -shared-libgcc -Wl,-pie

This feature is experimental, and might change. To use selectively add
    options PAX_ASLR=0
in your kernel.

Currently we are using 12 bits for the stack, program, and data segment and
16 or 24 bits for mmap, depending on __LP64__.
2007-12-26 22:11:47 +00:00
garbled 41918d8024 Move the elink probe code from files.isa to the common conf/files so that
MCA without isa can compile.  fix by cube.
2007-12-13 21:23:48 +00:00
joerg 151d068190 Add glue for x86emu and build it as part of i386/ALL. 2007-12-13 17:25:19 +00:00
jmcneill 4c1d81b2b5 Merge jmcneill-pm branch. 2007-12-09 20:27:42 +00:00
pooka b7737261b0 pud (userspace char/block drivers) build goo 2007-11-20 18:54:31 +00:00
cube 7e42547b90 Rename 'arc' into 'arcnet' to avoid conflict with
sys/arch/arc/conf/files.arc's machine statement.
2007-11-13 23:22:06 +00:00
pooka 70981e62b1 Move putter code from directly under dev/ to dev/putter/
no functional change
2007-11-12 14:30:55 +00:00
jmcneill 23526fe3a9 Add pseudo audio device driver. With this pseudo-device, audio played back
via the standard audio interfaces is redirected back to userland as raw
PCM data on /dev/padN.

One example usage is to stream audio to an AirTunes compatible device using
rtunes (http://www.nazgul.ch/dev_rtunes.html), ie:

	$ rtunes - < /dev/pad0
	$ mpg123 -a /dev/sound1 blah.mp3

Another option is to capture audio output from eg. Real Player, by simply
instructing Real Player to output to /dev/sound1, and running:

	$ cat /dev/pad0 > blah.pcm
2007-11-11 17:37:45 +00:00
pooka db2e7d6a05 include putter only if it's actually defined 2007-11-11 16:58:02 +00:00
pooka f2031ea28b Part 2/n of extensive changes to request transport to/from userspace:
Rip the transport code completely out of puffs and generalize it
into an independent module which will be used for multiple purposes
in the future.  This module is called the Pass-to-Userspace
Transporter (known as "putter" among friends).

This is very much work-in-progress and one dependency with puffs
remains: the request framing format.

The device name is still /dev/puffs, but that will change soon.

Users of puffs need the following in their kernel configs now:
pseudo-device   putter
2007-11-10 21:45:04 +00:00
pooka 735dd21e07 Split I/O-related routines (getpages, putpages, etc.) which are heavily
tied to uvm out of genfs_vnops into genfs_io.c
2007-10-17 16:45:00 +00:00
rmind a21233e46b Import of SCHED_M2 - the implementation of new scheduler, which is based
on the original approach of SVR4 with some inspirations about balancing
and migration from Solaris.  It implements per-CPU runqueues, provides a
real-time (RT) and time-sharing (TS) queues, ready to support a POSIX
real-time extensions, and also prepared for the support of CPU affinity.

The following lines in the kernel config enables the SCHED_M2:

no options SCHED_4BSD
options SCHED_M2

The scheduler seems to be stable.  Further work will come soon.

http://mail-index.netbsd.org/tech-kern/2007/10/04/0001.html
http://www.netbsd.org/~rmind/m2/mysql_bench_ro_4x_local.png
Thanks <ad> for the benchmarks!
2007-10-09 19:00:13 +00:00
ad 342d5fc94f Add stubs that provide new soft interrupt API from the vmlocking branch.
For now these just pass through to the current softintr code.

(The naming is different to allow softint/softintr to co-exist for a while.
I'm hoping that should make it easier to transition.)
2007-10-08 15:51:02 +00:00
ad 451aacda90 Merge file descriptor locking, cwdi locking and cross-call changes
from the vmlocking branch.
2007-10-08 15:12:05 +00:00