haiku/headers/private/kernel/arch/x86
Ingo Weinhold ea2abd110b * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of
ROUNDUP to use '*' and '/' -- the compiler will optimize that for powers of
  two anyway and this implementation works for other numbers as well.
* The thread::fault_handler use in C[++] code was broken with gcc 4. At least
  when other functions were invoked. Trying to trick the compiler wasn't a
  particularly good idea anyway, since the next compiler version could break
  the trick again. So the general policy is to use the fault handlers only in
  assembly code where we have full control. Changed that for x86 (save for the
  vm86 mode, which has a similar mechanism), but not for the other
  architectures.
* Introduced fault_handler, fault_handler_stack_pointer, and fault_jump_buffer
  fields in the cpu_ent structure, which must be used instead of
  thread::fault_handler in the kernel debugger. Consequently user_memcpy() must
  not be used in the kernel debugger either. Introduced a debug_memcpy()
  instead.
* Introduced debug_call_with_fault_handler() function which calls a function
  in a setjmp() and fault handler context. The architecture specific backend
  arch_debug_call_with_fault_handler() has only been implemented for x86 yet.
* Introduced debug_is_kernel_memory_accessible() for use in the kernel
  debugger. It determines whether a range of memory can be accessed in the
  way specified. The architecture specific back end
  arch_vm_translation_map_is_kernel_page_accessible() has only been implemented
  for x86 yet.
* Added arch_debug_unset_current_thread() (only implemented for x86) to unset
  the current thread pointer in the kernel debugger. When entering the kernel
  debugger we do some basic sanity checks of the currently set thread structure
  and unset it, if they fail. This allows certain commands (most importantly
  the stack trace command) to avoid accessing the thread structure.
* x86: When handling a double fault, we do now install a special handler for
  page faults. This allows us to gracefully catch faulting commands, even if
  e.g. the thread structure is toast.

We are now in much better shape to deal with double faults. Hopefully avoiding
the triple faults that some people have been experiencing on their hardware
and ideally even allowing to use the kernel debugger normally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-03 12:39:56 +00:00
..
apm.h * Introduced new header directory headers/private/system which is supposed 2008-05-14 03:55:16 +00:00
arch_acpi.h Patch by Dustin Howett (GSOC): Move ACPI probing out of the 2008-07-21 07:13:51 +00:00
arch_apic.h Patch by Dustin Howett (GSOC): Move ACPI probing out of the 2008-07-21 07:13:51 +00:00
arch_cpu.h * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of 2009-08-03 12:39:56 +00:00
arch_hpet.h code for initializing hpet in the bootloader. Moved around some hpet definitions. HPET initialization is commented out, at the moment 2008-08-22 08:15:14 +00:00
arch_int.h Not sure, if this was only a gcc 4.3.3 bug or if I misunderstand something, but 2009-05-29 01:17:53 +00:00
arch_kernel_args.h add hpet locations to the kernel_args. Patch by Dustin Howett (GSOC) 2008-08-22 08:03:25 +00:00
arch_kernel.h * For each userland team the kernel creates an area in the userland 2008-05-11 16:25:35 +00:00
arch_system_info.h pulled over some stuff from newos: 2007-02-05 01:46:28 +00:00
arch_thread_types.h Merged branch haiku/branches/developer/bonefish/optimization revision 2008-01-11 00:36:44 +00:00
arch_thread.h User debugger support: 2009-06-14 12:14:06 +00:00
arch_user_debugger.h Added transparent software breakpoint support for user debuggers: 2009-06-23 21:03:57 +00:00
arch_vm_translation_map.h * Prefixed memset_physical() and memcpy_to_physical() with "vm_", 2008-10-20 00:06:09 +00:00
arch_vm_types.h The short story: we now have MTRR support on Intel and AMD CPUs (the latter 2005-12-13 16:34:29 +00:00
arch_vm.h * vm_page::offset is now called cache_offset and is now an uint32 instead of off_t; 2005-12-21 12:38:31 +00:00
bios.h Got inspired by mmu_man's dmidecode release and added a simple identification 2004-11-29 20:42:04 +00:00
descriptors.h Implemented first basic APM driver. Only tested with QEMU so far, that's why 2006-01-28 18:11:20 +00:00
selector.h
smp_priv.h Add volatile keyword to apic memory access, cleanup, add timeout to arch_smp_send_ici. 2007-02-25 23:32:21 +00:00
timer.h Patch by Dustin Howett which 'modularizes' timers. The best timer is 2008-07-05 20:40:06 +00:00
types.h Removed execute property that was set accidently (since CVS days). 2005-03-18 01:50:45 +00:00
vesa.h Removed execute property that was set accidently (since CVS days). 2005-03-18 01:50:45 +00:00
vm86.h Patch by Jan Klötzke with minor changes by myself: 2008-05-28 10:48:01 +00:00