haiku/headers/private/kernel/arch
Michael Lotz 79f0056002 Fix virtual 8086 mode to properly account for TLS.
* The vm86 code or the code running in virtual 8086 mode may clobber the
  %fs register that we use for the CPU dependent thread local storage
  (TLS). Previously the vm86 code would simply restore %fs on exit, but
  this doesn't always work. If the thread got unscheduled while running
  in virtual 8086 mode and was then rescheduled on a different CPU, the
  vm86 exit code would restore the %fs register with the TLS value of
  the old CPU, causing anything using TLS in userland to crash later on.
  Instead we skip the %fs register restore on exit (as do the other
  interrupt return functions) and explicitly update the potentially
  clobbered %fs by calling x86_set_tls_context(). This will repopulate
  the %fs register with the TLS value for the right CPU. Fixes #8068.

* Made the static set_tls_context() into x86_set_tls_context() and made
  it available to others to faciliate the above.

* Sync the vm86 specific interrupt code with the changes from hrev23370,
  using the iframe pop macro to properly return. Previously what was
  pushed in int_bottom wasn't poped on return.

* Account for the time update macro resetting the in_kernel flag and
  reset it to 1, as we aren't actually returning to userland. This
  didn't cause any harm though as only the time tracking is using that
  flag so far.

* Some minor cleanup.
2011-11-25 16:10:19 +01:00
..
alpha It is accomplished ... 2002-07-09 12:24:59 +00:00
arm ARM: Some header cleanup in preperation of more CPU support code... 2011-03-14 13:48:21 +00:00
m68k Some more 68k mmu definitions I forgot to commit. 2011-11-03 01:05:54 +00:00
mipsel Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
ppc ppc build fix 2011-05-30 19:51:45 +00:00
sh4 Removed unused <arch>_switch_stack_and_call() and 2010-01-09 15:09:02 +00:00
sparc Removed execute property that was set accidently (since CVS days). 2005-03-18 01:50:45 +00:00
x86 Fix virtual 8086 mode to properly account for TLS. 2011-11-25 16:10:19 +01:00
cpu.h Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel 2010-06-25 22:16:10 +00:00
debug_console.h * Added arch_debug_blue_screen_try_getchar() and arch_debug_serial_try_getchar() 2011-06-12 17:15:42 +00:00
debug.h Reimplemented the gdb stub support for the 'g' command (read registers): 2011-06-03 15:35:10 +00:00
elf.h Symbol resolution functions in the kernel: Removed the unused parameter 2009-05-13 15:25:27 +00:00
int.h Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel 2010-06-25 22:16:10 +00:00
platform.h Implemented first basic APM driver. Only tested with QEMU so far, that's why 2006-01-28 18:11:20 +00:00
real_time_clock.h The real_time_data structure contains an architecture specific 2006-01-04 02:17:59 +00:00
smp.h Applied NewOS change 1914: moved APIC setup into the kernel due to a 2004-03-14 22:54:00 +00:00
system_info.h Added our first x86-only syscall for get_cpuid(). 2004-12-01 03:54:23 +00:00
thread_types.h Replaced arch/thread_struct.h with arch/thread_types.h, and renamed 2005-12-20 16:07:27 +00:00
thread.h Merged signals-merge branch into trunk with the following changes: 2011-06-12 00:00:23 +00:00
timer.h Replaced timer.h with a cpp safe version. 2004-03-14 21:08:25 +00:00
user_debugger.h Merged the signals branch into trunk, with these changes: 2011-01-10 21:54:38 +00:00
vm_translation_map.h * First run through the kernel's private parts to use phys_{addr,size}_t 2010-05-25 21:34:08 +00:00
vm_types.h Preparation for MTRR support, code is completely untested, though. 2005-12-12 17:04:36 +00:00
vm.h * First run through the kernel's private parts to use phys_{addr,size}_t 2010-05-25 21:34:08 +00:00