haiku/headers/private/kernel/arch
Ingo Weinhold bb163c0289 * Added a set_mtrrs() hook to x86_cpu_module_info, which is supposed to set
all MTRRs at once.
* Added a respective x86_set_mtrrs() kernel function.
* x86 CPU module:
  - Implemented the new hook.
  - Prefixed most debug output with the CPU index. Otherwise it gets quite
    confusing with multiple CPUs.
  - generic_init_mtrrs(): No longer clear all MTRRs, if they are already
    enabled. This lets us benefit from the BIOS's setup until we install our
    own -- otherwise with caching disabled things are *really* slow.
* arch_vm.cpp: Completely rewrote the MTRR handling as the old one was not
  only slow (O(2^n)), but also broken (resulting in incorrect setups (e.g.
  with cachable ranges larger than requested)), and not working by design for
  certain cases (subtractive setups intersecting ranges added later).
  Now we maintain an array with the successfully set ranges. When a new range
  is added, we recompute the complete MTRR setup as we need to. The new
  algorithm analyzing the ranges has linear complexity and also handles range
  base addresses with an alignment not matching the range size (e.g. a range
  at address 0x1000 with size 0x2000) and joining of adjacent/overlapping
  ranges of the same type.

This fixes the slow graphics on my 4 GB machine (though unfortunately the
8 MTRRs aren't enough to fully cover the complete frame buffer (about 35
pixel lines remain uncachable), but that can't be helped without rounding up
the frame buffer size, for which we don't have enough information). It might
also fix #1823.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-23 15:06:08 +00:00
..
alpha
arm Typo. 2009-10-19 23:23:33 +00:00
m68k Fix m68k build, still unimplemented. 2009-08-03 21:17:03 +00:00
mipsel Added and modified kernel stubs and headers for arch mipsel. Correctness not included. 2009-08-23 02:52:09 +00:00
ppc * Applied slightly changed patch by Alexander von Gluck. 2009-07-23 08:22:01 +00:00
sh4
sparc
x86 * Added a set_mtrrs() hook to x86_cpu_module_info, which is supposed to set 2009-11-23 15:06:08 +00:00
cpu.h memory barrier functions available for drivers. 2008-04-26 15:18:04 +00:00
debug_console.h
debug.h * Added an arch_debug_stack_trace() function that is called from the KDL loop 2009-10-18 19:50:13 +00:00
elf.h Symbol resolution functions in the kernel: Removed the unused parameter 2009-05-13 15:25:27 +00:00
int.h Fully inline {disable,restore}_interrupts() and friends when including 2008-10-01 14:33:10 +00:00
platform.h
real_time_clock.h
smp.h
system_info.h
thread_types.h
thread.h Patch by Alexander von Gluck (kallisti5) to get the PPC build going again 2009-03-30 15:00:10 +00:00
timer.h
user_debugger.h * Always include the public arch_debugger.h headers. The structures defined 2009-07-21 22:18:39 +00:00
vm_translation_map.h * Renamed the ROUNDOWN macro to ROUNDDOWN. Also changed the implementation of 2009-08-03 12:39:56 +00:00
vm_types.h
vm.h * Added "from" address space parameter to vm_swap_address_space()/ 2008-10-07 21:39:19 +00:00