minix/kernel
Tomas Hruby ebbce7507b Complete ovehaul of mode switching code
- after a trap to kernel, the code automatically switches to kernel
  stack, in the future local to the CPU

- k_reenter variable replaced by a test whether the CS is kernel cs or
  not. The information is passed further if needed. Removes a global
  variable which would need to be cpu local

- no need for global variables describing the exception or trap
  context. This information is kept on stack and a pointer to this
  structure is passed to the C code as a single structure

- removed loadedcr3 variable and its use replaced by reading the %cr3
  register

- no need to redisable interrupts in restart() as they are already
  disabled.

- unified handling of traps that push and don't push errorcode

- removed save() function as the process context is not saved directly
  to process table but saved as required by the trap code. Essentially
  it means that save() code is inlined everywhere not only in the
  exception handling routine

- returning from syscall is more arch independent - it sets the retger
  in C

- top of the x86 stack contains the current CPU id and pointer to the
  currently scheduled process (the one right interrupted) so the mode
  switch code can find where to save the context without need to use
  proc_ptr which will be cpu local in the future and therefore
  difficult to access in assembler and expensive to access in general

- some more clean up of level0 code. No need to read-back the argument
  passed in
  %eax from the proc structure. The mode switch code does not clobber
  %the general registers and hence we can just call what is in %eax

- many assebly macros in sconst.h as they will be reused by the apic
  assembly
2009-11-06 09:08:26 +00:00
..
arch/i386 Complete ovehaul of mode switching code 2009-11-06 09:08:26 +00:00
system - enable remembering of device memory ranges set by PCI and 2009-11-03 11:12:23 +00:00
clock.c Clock task split 2009-11-06 09:04:15 +00:00
clock.h Clock task split 2009-11-06 09:04:15 +00:00
config.h Merge of David's ptrace branch. Summary: 2009-09-30 09:57:22 +00:00
const.h moved type and constants for random data to include file; 2009-04-02 15:24:44 +00:00
debug.c Merge of David's ptrace branch. Summary: 2009-09-30 09:57:22 +00:00
debug.h vmassert reports also the source file in which it was triggered 2009-11-04 15:30:08 +00:00
glo.h Complete ovehaul of mode switching code 2009-11-06 09:08:26 +00:00
interrupt.c Hardware interrupts code path cleanup 2009-11-04 13:24:56 +00:00
ipc.h Kernel: remove unused CHECK_DEADLOCK definition 2009-09-07 20:23:31 +00:00
kernel.h Split of architecture-dependent and -independent functions for i386, 2006-12-22 15:22:27 +00:00
main.c Clock task split 2009-11-06 09:04:15 +00:00
Makefile really revert endpoint_t -> int 2009-10-05 15:47:23 +00:00
priv.h IPC privileges fixes 2009-07-02 16:25:31 +00:00
proc.c Complete ovehaul of mode switching code 2009-11-06 09:08:26 +00:00
proc.h Merge of David's ptrace branch. Summary: 2009-09-30 09:57:22 +00:00
profile.c Don't declare the cprof buf if CPROFILE isn't on. 2009-02-06 16:31:28 +00:00
profile.h cprofile not conditional 2009-01-09 21:44:52 +00:00
proto.h Complete ovehaul of mode switching code 2009-11-06 09:08:26 +00:00
start.c really revert endpoint_t -> int 2009-10-05 15:47:23 +00:00
system.c Kernel: add support for indirect grants 2009-11-02 22:30:37 +00:00
system.h Merge of David's ptrace branch. Summary: 2009-09-30 09:57:22 +00:00
table.c Primary goal for these changes is: 2009-09-21 14:31:52 +00:00
type.h moved type and constants for random data to include file; 2009-04-02 15:24:44 +00:00
utility.c really revert endpoint_t -> int 2009-10-05 15:47:23 +00:00
vm.h Primary goal for these changes is: 2009-09-21 14:31:52 +00:00