Commit Graph

1247 Commits

Author SHA1 Message Date
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
matt 06531ceafe Add a syntax-only target which attempts to compile the entire kernel as one
entity.  Think of it as super-lint.  Due to bugs in the GCC C frontend it
doesn't quite work right but it does provide useful feedback.
2008-02-03 06:46:29 +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
lukem 14c9fc8ffa Remove unnecessary references to config_time.h. 2008-01-17 01:56:02 +00:00
lukem 8b267ec022 Use BUILDSYMLINKS from <bsd.files.mk> instead of custom copy rules
for config_time.h and athhal_options.h.

Note: we still copy param.c because I'm told that we should still support
people editing that on a per-compile basis.
2008-01-17 01:13:01 +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 90d0dce26b Welcome to 2008.
Don't forget to update copyright notices when you add new code.
2008-01-01 00:00:18 +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
ad ea3f10f7e0 Merge more changes from vmlocking2, mainly:
- Locking improvements.
- Use pool_cache for more items.
2007-12-26 16:01:34 +00:00
ad c2e7ec2566 Reserve a major for ZFS. 2007-12-24 15:12:05 +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
jnemeth bf33c34cf5 add dev/ofw/ofw_subr.c to VARSTACK 2007-11-29 01:39:27 +00:00
pooka b7737261b0 pud (userspace char/block drivers) build goo 2007-11-20 18:54:31 +00:00
skrll 833a64ae25 Deal with arm gas weirdness. 2007-11-17 08:59:51 +00:00
skrll cf7197a7f7 Fix previous. Very sorry. 2007-11-16 21:48:19 +00:00
skrll c4d9e0b7d1 Add a note section everywhere. There will be fallout from this, but it'll
be fixed pretty sharpish.

Discussed with and approved by martin. (martin told me to say this)
2007-11-16 20:01:48 +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 116e75936f puffs -> putter 2007-11-13 13:13:10 +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
tls 0a012aa1c5 Fix accidental USE_SSP -> USE_FORT: now USE_SSP works as intended for
kernel builds.  Thanks to xtraeme for pointing this out.
2007-10-08 21:25:35 +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
dogcow 360a5fad96 since ip_gre.c is gone, it's unhelpful to have dependencies on it. 2007-10-05 07:28:24 +00:00
dyoung 97d392d2c5 Always build & link net/link_proto.c, since net/if.c needs it. 2007-09-28 22:52:13 +00:00
pooka 82a2fc0cce ufs is ssp clean 2007-09-25 15:16:05 +00:00
christos 2d6848b0e4 alpha can do notes. 2007-09-21 15:37:17 +00:00
plunky c212c4900f move the HID processing defs to a higher context, since it is used by
bluetooth and USB code.
2007-09-07 20:17:37 +00:00
rmind 2cecf9bbe9 Implementation of POSIX message queues.
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
ad 399122feeb subr_prf_bitmask.c -> subr_prf2.c 2007-08-15 20:34:48 +00:00
ad 63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
kiyohara 44c89c7646 Replace to Matthew Orgass's slhci(4).
http://mail-index.netbsd.org/tech-kern/2007/06/26/0001.html
2007-08-15 03:53:08 +00:00
pooka 5fbd525b19 Shuffle routines which just roll values around from kern_clock.c
and kern_time.c to subr_time.c.
2007-08-09 07:36:18 +00:00
ad 18af8ee9bd Add cpuctl(8). For now this is not much more than a toy for debugging and
benchmarking that allows taking CPUs online/offline.
2007-08-04 11:02:56 +00:00
pooka 59f0f4532f Split vfs_subr.c into routines which need much of the kernel
infrastructure (vfs_subr.c) and routines which need little or none
of the kernel infra (vfs_subr2.c).
2007-07-29 14:44:08 +00:00