Commit Graph

149 Commits

Author SHA1 Message Date
pooka 0ec2770c3c Since "physmem" is largely unused except for zfs wanting to know
if it has enough memory available, just pick a number which makes
zfs happy.

We *could* use a MIN() of available host mem and rump_memlimit,
though ...
2011-01-21 13:11:03 +00:00
pooka cd73d116db Support LOCKDEBUG. To use it, compile sys/rump with RUMP_LOCKDEBUG=yes.
requested by martin (sparc64 gdb cannot reliably produce a stack trace)
2011-01-06 11:22:54 +00:00
pooka 15e3ba0cc7 Realize the >1yo comment above rump_reboot and retire them to make
room for sys_reboot.
2010-11-21 17:34:11 +00:00
tsutsui 8e16588b0b Make common kernel module binaries work on both sun3 and sun3x.
Tested on 3/160 (on TME) and (real) 3/80.

XXX: module files can be loaded only on single user?
2010-10-15 15:55:52 +00:00
pooka 11f8c2f902 Implement rump_lwproc: the new lwp/proc management routines for
rump.  These move the management of the pid/lwpid space from the
application into the kernel, make code more robust, and make it
possible to attach multiple lwp's to non-proc0 processes.
2010-09-01 19:37:58 +00:00
pooka c15f18f449 As normal, fix breakage from untested commits by rmind. 2010-06-23 08:36:03 +00:00
pooka f51be744dd Remove comment which wasn't supposed to get committed. 2010-06-14 13:28:44 +00:00
pooka 0733340220 Make some stubby tty routines used by printf weak aliases, so that
the full ones will be used if we have the upcoming tty component
loaded.
2010-06-14 13:25:40 +00:00
pooka a2b72aafa2 Fix previous in emul.c -- only numbers are operands for cpp comparisons.
Apparently non-numbers logically produce arch-dependent behaviour.
2010-06-13 15:17:02 +00:00
pooka 7ed9d6c421 deal with sun3's module disability 2010-06-13 11:35:41 +00:00
pooka 83474ef4e9 add rest of sparc pagesize variables 2010-06-13 11:05:58 +00:00
pooka eacf4402b9 Use kern_proc.c instead of a collection of stubs. But what we
really wanted from this commit was the support for proc_specificdata.

TODO: make creating a new process actually use kern_proc and
maybe even add an interface which starts a process with
"any pid you don't like"
2010-06-10 21:40:42 +00:00
pooka 17bb799409 adjust comment in previous.
XXX: should make that (and physmem) mean something here
2010-05-11 20:25:14 +00:00
pooka a96791040e remove unnecessary #ifdef 2010-05-11 20:21:56 +00:00
pooka 53d420f9a2 Now that we have a big devsw_conv0, need at least as many entries
in devsw as the highest device number in the conv table.  Do a
"good for a hundred years" guess now, fix properly later.
2010-05-01 09:00:06 +00:00
pooka f6d46ec2d9 Include devsw_conv0 from an i386 kernel compilation (no, we don't
care about the arch as long as all the devices we care about are
present).  The file should be autogenerated, but that requires some
more changes to config(1).
2010-04-30 20:54:17 +00:00
pooka c1cd247fa4 Make initial devsw a little more believable. Especially adjust
max_sys_devsw, since it was previously a bit too much, given that
the correct value is 0.
2010-04-28 07:42:55 +00:00
pooka fbe5f09ac1 remove stuff which now comes via std. kernel source modules 2010-04-21 20:07:02 +00:00
pooka edc96984f5 support kern_resource 2010-04-21 16:16:31 +00:00
pooka 77c91f3324 Move all signal-related from emul.c to signals.c. Additionally,
define a few alternate signal models for the rump kernel, including
ones where signals are ignored or sent to host processes.
2010-04-21 11:38:05 +00:00
pooka cfbced9328 no \n in panic 2010-04-19 11:26:33 +00:00
pooka 9cf6a57529 One emul is enough and since we need emul_netbsd, retire emul_rump. 2010-04-17 16:34:29 +00:00
pooka 18871937dd Move scheduling related routines from emul.c to scheduler.c 2010-04-17 13:13:45 +00:00
pooka 8b9238922a Use kern_syscall.c instead of homegrown syscall dis/establishment routines. 2010-04-14 14:49:05 +00:00
pooka d3b3912fd0 Include kern_tc and use a timecounter driver instead of homerolled
kern_tc implementation.
2010-04-14 10:27:53 +00:00
pooka 59e540bbd0 We don't have a real rootdev (by default at least), so set it to NODEV. 2010-03-31 14:08:33 +00:00
pooka bc4e423976 add signal stubs required by mfs 2010-03-01 11:35:58 +00:00
joerg d621e29eca Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.
2010-02-08 19:02:25 +00:00
pooka 6c9f003a76 Include newly-created subr_device.c and remove few special case
device accessor copypastes.  This makes it possible to link static
binaries which use -lrumpdev.
2010-01-31 15:12:42 +00:00
pooka 8844790318 include kern_hook.c 2010-01-31 02:08:36 +00:00
pooka e5bb7fe875 Use subr_percpu.c instead of homegrown implementation. ...except
when using malloc(3)-relegated allocators (happens in production
e.g. on Linux), since subr_percpu.c uses vmem and i don't want to
reimplement vmem.
2010-01-15 19:01:04 +00:00
pooka 065afcb61a Minimize unnecessary differences in rump. 2010-01-13 01:53:38 +00:00
pooka 8bb03ea96b Add a few symbols used by the tty code. 2010-01-13 01:18:51 +00:00
pooka 04d095d3c0 Include kern_pmf.c in rumpdev. 2010-01-09 16:29:32 +00:00
dyoung cd6e1fbf91 Expand PMF_FN_* macros. 2010-01-08 19:53:10 +00:00
elad 3313b745e3 allow rump to build 2009-12-25 01:56:43 +00:00
pooka 590ffe150c Generate vers.c and include it in the kernel component. 2009-12-16 20:57:15 +00:00
pooka 1e98588f3b Decide it's not worth the fuss to have rumpfs as a module and just
hardcode attach into rump_vfs_init().  Saves us from a lot of
pingpong init bouncing from one component to another to get the order
right.
2009-12-03 12:35:34 +00:00
pooka 612479bd5e Include cpu crosscall support (instead of stubbing it out). 2009-12-01 09:52:29 +00:00
pooka aee2ff8e8d For rumpfs, do mountroot instead of the bunch of homegrown hacks
currently there.  Still needs a little massage to get the kernel
interfaces right and avoid copypaste especially from main().

Also, move it a bit more into the direction of a real file system
(finally!) by giving it a vfsops.  Most ops are still unimplemented,
though.
2009-11-26 20:58:51 +00:00
pooka d502da58ec misc_stub and emul have been the same thing for a looong time now,
so just move the few remaining routines in misc_stub to emul.
2009-11-04 19:21:51 +00:00
pooka c03306bc0d Give the kthread->pthread interface emulation its own module. 2009-11-04 19:17:53 +00:00
pooka 8ef52102c2 Pull all relegating memory allocators under a common roof in memalloc.c 2009-11-04 18:25:36 +00:00
pooka 080522e1ce move copy-related routines to their own module 2009-11-04 17:01:45 +00:00
pooka a69d555865 Use std. uiomove() & friends. 2009-11-04 16:55:20 +00:00
rmind 3e88e8e75c Sync rump with kernel changes. 2009-10-21 23:13:53 +00:00
pooka 254ffabc38 Include sys_select.c for proper select()/poll() support. 2009-10-16 00:14:53 +00:00
pooka 8559951571 Give lwp usage some much-needed love: stop treating lwp0 as the
all-sink and make sure each separate thread in rump has its own
lwp.  Happy-go-lucky callers will get scheduled a temporary lwp
on entry, while true lwp connoisseurs may request a stable lwp
for their purposes.  Some more love may be required later down the
road, but for now different threads will stepping on each others
toes.
2009-10-15 16:39:22 +00:00
pooka 9454f185c4 Add initial work on a rump virtual cpu scheduler. This is necessary
for kernel code which has been written to avoid MP contention by
using cpu-local storage (most prominently, select and pool_cache).

Instead of always assuming rump_cpu, the scheduler must now be run
(and unrun) on all entry points into rump.  Likewise, rumpuser
unruns and re-runs the scheduler around each potentially blocking
operation.  As an optimization, I modified some locking primitives
to try to get the lock without blocking before releasing the cpu.

Also, ltsleep was modified to assume that it is never called without
the biglock held and made to use the biglock as the sleep interlock.
Otherwise there is just too much drama with deadlocks.  If some
kernel code wants to call ltsleep without the biglock, then, *snif*,
it's no longer supported and rump and should be modified to support
newstyle locks anyway.
2009-10-15 00:28:46 +00:00
pooka d09e2773d0 "rumppriv" goes back to "rump" per internal interface naming change. 2009-10-14 18:18:53 +00:00