Commit graph

3332 commits

Author SHA1 Message Date
Tomas Hruby
4f962b4798 A small mini_receive() cleanup
- this patch substitutes *xpp for sender to increase readability of
  mini_receive().

- makes sure that the dequeued sender has p_q_link == NULL and that
  this condition holds when enqueuing the sender again. 

- it is a sanity check to make sure that the new sender is not
  enqueued already. Before this change the dequeued sender's p_q_link
  may not be NULL and it was only set to NULL when enqueued again.
2010-05-07 11:22:49 +00:00
Ben Gras
b8eddf00d8 kernel: don't try to lookup ANY in debug output. 2010-05-06 22:39:11 +00:00
Ben Gras
0194fe55dc kernel: increase some per-process privilege limits. 2010-05-06 22:21:08 +00:00
Cristiano Giuffrida
5a98cd3e92 Fix Inet initialization race. 2010-05-06 22:18:21 +00:00
Thomas Veerman
0aceb25535 Small cleanup of dead and/or redundant code. 2010-05-06 09:32:40 +00:00
Ben Gras
b6bb75963b vm: remove leftover diag print 2010-05-05 15:26:48 +00:00
Ben Gras
86e1b9d770 fsctl.h doesn't exist. 2010-05-05 11:49:41 +00:00
Ben Gras
f78d8e74fd secondary cache feature in vm.
A new call to vm lets processes yield a part of their memory to vm,
together with an id, getting newly allocated memory in return. vm is
allowed to forget about it if it runs out of memory. processes can ask
for it back using the same id. (These two operations are normally
combined in a single call.)

It can be used as a as-big-as-memory-will-allow block cache for
filesystems, which is how mfs now uses it.
2010-05-05 11:35:04 +00:00
Kees van Reeuwijk
51d46f8e46 Let memory allocation be aligned on 8-byte boundaries. 2010-05-04 21:02:44 +00:00
Ben Gras
09958abda8 tty: don't use custom kputc; this fixes tty printf()s. 2010-05-04 09:26:01 +00:00
Ben Gras
75b2153b9a awk Makefile: make yacc less chatty to stderr. 2010-05-04 09:23:31 +00:00
Ben Gras
ca86603cd6 libc: malloc: don't enable SLOWDEBUG by default 2010-05-03 22:54:51 +00:00
Ben Gras
029e809780 driver.h: increase max no. of open minors. 2010-05-03 19:43:54 +00:00
Erik van der Kouwe
1137ba9b32 Extra assertions on free if SLOWDEBUG is enabled: check whether the block exists and has not been freed before 2010-05-03 19:42:08 +00:00
Erik van der Kouwe
4b34ff6903 Add syslib function to obtain CPU frequency 2010-05-03 19:41:04 +00:00
Tomas Hruby
ec56479675 deadlock() - more info
- deadlock() is more verbose in case of a detected deadlock. First, it
  lists all processses in the deadlock group. Then it prints the proc
  extra info, not only  stack trace and register dump
2010-05-03 17:38:54 +00:00
Tomas Hruby
57a88ce708 debugging - printing processes on serial
- this patch moves the former printslot() from arch_system.c to
  debug.c and reimplements it slightly. The output is not changed,
  however, the process information is printed in a separate function
  print_proc() in debug.c as such a function is also handy in other
  situations and should be publicly available when debugging.
2010-05-03 17:37:18 +00:00
Thomas Veerman
4ae9c03147 - Add test52 to test FPU context switching
- Make test/run count how many tests it's going to perform instead of having to
  manually update it ourselves.
2010-05-03 15:12:39 +00:00
Kees van Reeuwijk
cfd28b671a Put the munmap and munmap_text trampolines in a separate .S file, so that they can be overridden independenly of mmap. 2010-04-29 20:12:56 +00:00
Kees van Reeuwijk
a2a0562a9c Make mdb compile in other places than just /usr/src. 2010-04-29 20:05:01 +00:00
Ben Gras
99a13341bd cpufeature() - rename _SSEx and correct logic in cpufeature() in lib 2010-04-29 19:08:49 +00:00
Erik van der Kouwe
3bf54e9b2b Allow loading images > 16M 2010-04-29 15:14:07 +00:00
Ben Gras
4e837dcfb3 kernel: more diagnostics for privctl ENOMEM conditions. 2010-04-29 08:50:52 +00:00
Ben Gras
4ac5eb7832 rs: stacktrace if system process exits early. 2010-04-29 08:50:17 +00:00
Cristiano Giuffrida
83ef7119f6 Don't panic when out of priv structures. 2010-04-28 20:41:23 +00:00
Erik van der Kouwe
93f3bf5bda Fix wrong word 2010-04-28 20:37:08 +00:00
Ben Gras
603ed23ebd at_wini: remove unnecessary quirks debug message 2010-04-28 14:19:40 +00:00
Ben Gras
50335291ae kernel: fpu_init: only enable OSXMMEXCPT in CR4 on at least SSE1 machines.
Found and debugged by totalinux at yandex.ru and Evgeniy Ivanov, thanks!
2010-04-28 13:51:02 +00:00
Ben Gras
c37401f23f kernel: fpu init to separate function; also move fpu init down
moving the fpu code causes exceptions raised by it to be trapped
neatly instead of causing a triple fault, before the IDT is initialized.
2010-04-28 13:25:29 +00:00
Thomas Veerman
f9317dc039 Scan all processes for that might be blocked on a lock 2010-04-28 11:54:22 +00:00
Ben Gras
b65ebdffac at_wini: more general system to allow devices that behave like ata controllers.
(let silicon image sata controller that is pci class 1, subclass 0x80,
but works as a sata controller, work as such.)
2010-04-28 11:52:28 +00:00
Ben Gras
72e866db48 pci: don't do sanity check for missing pci bus, the check can misfire. 2010-04-28 11:51:13 +00:00
Ben Gras
5d870f020d tty: try more often to get the config byte. 2010-04-28 11:50:54 +00:00
Erik van der Kouwe
d17590fcf4 Avoid sbrk (in favour of malloc) in RS where possible 2010-04-28 08:35:54 +00:00
Erik van der Kouwe
84d404aba3 Fix types in debug register functions 2010-04-28 08:35:05 +00:00
Erik van der Kouwe
8e918c407a Enable malloc assertions 2010-04-28 08:34:19 +00:00
Erik van der Kouwe
1b7de33a68 Add timeout for test 7 to indicate which test (if any) hangs 2010-04-28 08:33:23 +00:00
Tomas Hruby
b528d52ea8 pagefault() is private 2010-04-27 20:30:33 +00:00
Ben Gras
d11b88cfc5 mtree: no more /lib and /lib/i386. 2010-04-27 13:44:48 +00:00
Erik van der Kouwe
a033e6fcae Add missing newline at end of file 2010-04-27 13:30:46 +00:00
Erik van der Kouwe
4bddc57477 Remove debug printfs in breakpoints.c, they should never have been there 2010-04-27 12:25:04 +00:00
Cristiano Giuffrida
0164957abb Unified crash recovery and live update.
RS CHANGES:
- Crash recovery is now implemented like live update. Two instances are kept
side by side and the dead version is live updated into the new one. The endpoint
doesn't change and the failure is not exposed (by default) to other system
services.
- The new instance can be created reactively (when a crash is detected) or
proactively. In the latter case, RS can be instructed to keep a replica of
the system service to perform a hot swap when the service fails. The flag
SF_USE_REPL is set in that case.
- The new flag SF_USE_REPL is supported for services in the boot image and
dynamically started services through the RS interface (i.e. -p option in the
service utility).
- Fixed a free unallocated memory bug for core system services.
2010-04-27 11:17:30 +00:00
Tomas Hruby
30798fc3e1 Removed unused prototype 2010-04-26 23:39:05 +00:00
Tomas Hruby
f51eea4b32 Changed pagefault delivery to VM
this patch changes the way pagefaults are delivered to VM. It adopts
the same model as the out-of-quantum messages sent by kernel to a
scheduler.

- everytime a userspace pagefault occurs, kernel creates a message
  which is sent to VM on behalf of the faulting process

- the process is blocked on delivery to VM in the standard IPC code
  instead of waiting in a spacial in-kernel queue (stack) and is not
  runnable until VM tell kernel that the pagefault is resolved and is
  free to clear the RTS_PAGEFAULT flag.

- VM does not need call kernel and poll the pagefault information
  which saves many (1/2?) calls and kernel calls that return "no more
  data"

- VM notification by kernel does not need to use signals

- each entry in proc table is by 12 bytes smaller (~3k save)
2010-04-26 23:21:26 +00:00
Ben Gras
a131085a5b cd boot workaround for bioses that didn't want to boot >4 image sectors.
boot is a normal binary with a.out again. use 'cdbootblock,' a CDBOOT
variant of bootblock, both from bootblock.s, as the first boot image
that then loads boot, exactly like the bootblock loads boot when booting
from harddisk. the sector numbers (2048 byte iso sectors) are patched in
by writeisofs, like installboot does for bootblock. bootblock unchanged.
2010-04-26 22:07:21 +00:00
Ben Gras
94edf4fa12 vfs: start at vmnt[0] to sync mounted filesystems, not vmnt[1]. 2010-04-26 17:12:34 +00:00
Ben Gras
86e8eff905 remove intr_disabled() as interrupts are always disabled in the kernel now. 2010-04-26 15:32:42 +00:00
Tomas Hruby
1718924b10 Fixed printf warning in the filter driver 2010-04-26 14:44:20 +00:00
Cristiano Giuffrida
0f353411d7 Set IPC status code only for RECEIVE 2010-04-26 14:43:59 +00:00
Kees van Reeuwijk
5b0efc542f Remove a redundant getdomainname() implementation. 2010-04-26 12:43:43 +00:00