haiku/src/system/kernel
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
..
arch * Added a set_mtrrs() hook to x86_cpu_module_info, which is supposed to set 2009-11-23 15:06:08 +00:00
cache * NewBlock(), and Allocate() will now try to reuse existing memory in low 2009-11-05 11:14:12 +00:00
debug Fixed spelling. 2009-11-20 07:10:23 +00:00
device_manager Fixed spelling. 2009-11-20 07:10:23 +00:00
disk_device_manager * Unlock the auto locker before deleting the object or else you will find 2009-11-20 16:33:09 +00:00
fs Fixed spelling. 2009-11-20 07:10:23 +00:00
lib Should have been part of r33976: fcntl.c and open.c have been joined to 2009-11-10 11:16:44 +00:00
messaging * Added flag KMESSAGE_CLONE_BUFFER, which will cause buffer passed to SetTo() 2009-11-20 13:52:23 +00:00
platform Adding routerboard_mipsel platform stubs and linker script. 2009-08-22 01:48:18 +00:00
posix headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than 2009-07-27 00:39:12 +00:00
scheduler * Changed the affine scheduler to have more or less the same characteristics 2009-11-09 19:00:42 +00:00
slab We already panic to indicate that something's wrong, no real need to crash 2009-08-13 02:00:49 +00:00
util Basically rewrote the ports subsystem to use: 2009-10-22 13:24:12 +00:00
vm * Cleanup, no functional change. 2009-11-17 16:08:22 +00:00
boot_item.cpp * Changed get_boot_item() API: it now also can retrieve the size of the boot 2008-03-30 11:01:41 +00:00
boot_splash.cpp Patch by David Powell: 2008-08-28 16:59:34 +00:00
commpage.cpp Split the commpage initialization into two parts. The second part is executed 2009-06-24 13:53:58 +00:00
condition_variable.cpp Make use of the wait status field so it can be provided in Notify() and then 2009-10-21 23:44:59 +00:00
cpu.c * _user_cpu_enabled() accidently returned an error code instead of "false". 2008-05-22 11:38:00 +00:00
elf.cpp * Allow to use symbols as variables (prefixed with '@'). Now only tab completion 2009-10-22 11:44:29 +00:00
heap.cpp * Added "address" specifier for the "allocations" KDL command. 2009-11-17 16:07:58 +00:00
image.cpp headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than 2009-07-27 00:39:12 +00:00
int.c When debugging interrupt handlers is enabled, keep count of handled irq for each handler, to ease tracking which driver is unfriendly to others for shared irqs. 2009-10-17 12:05:02 +00:00
Jamfile Added version scripts for the kernel, libroot, and libbe. ATM each has two 2009-05-22 14:53:31 +00:00
kernel_daemon.cpp Fixing warnings under GCC4 in preparation to enable -Werror there as well: 2009-02-01 20:48:02 +00:00
kernel_versions Added version scripts for the kernel, libroot, and libbe. ATM each has two 2009-05-22 14:53:31 +00:00
kernel.rdef patch by Artur Wyszynski (aljen): 2008-03-18 10:11:58 +00:00
linkhack.c Renamed system/core to system/kernel. 2005-04-13 13:22:10 +00:00
listeners.cpp Added WaitObjectListener destructor. Hopefully fixes the gcc 2 build. 2009-04-23 14:53:18 +00:00
lock.cpp * Reverted r33643 - while it doubled the performance for my test case (with 2009-10-19 00:16:54 +00:00
low_resource_manager.cpp Merged branch haiku/branches/developer/bonefish/vm into trunk. This 2008-07-22 20:36:32 +00:00
main.cpp Since r33809 dprintf() acquires a mutex when called with interrupts enabled. 2009-11-23 14:19:09 +00:00
module.cpp Fixed spelling. 2009-11-20 07:10:23 +00:00
Notifications.cpp * Added missing include. 2009-11-20 07:56:18 +00:00
port.cpp Fixed gcc 4 warning. 2009-11-20 11:03:27 +00:00
real_time_clock.c * _user_{get|set}_tzfilename() can now be used with NULL filename pointers 2009-07-02 14:05:44 +00:00
sem.cpp * Change get_next_sem_info() to be index based, not ID based - the semaphore IDs 2009-11-16 13:08:36 +00:00
shutdown.c Patch by Olivier Coursiere: When rebooting, shutdown all the system teams, 2009-04-05 19:04:25 +00:00
signal.cpp * Moved SIGABRT to the signals that kill the process. Not sure if it's a good 2009-10-15 11:53:19 +00:00
smp.cpp * Added the possibility to debug latency issues with spinlocks. 2009-11-08 20:26:48 +00:00
syscalls.cpp The kernel side of a new system-wide sampling-based profiling mechanism. 2009-04-11 22:20:51 +00:00
system_info.cpp Added system_info::abi field. It contains the system's ABI version, which 2009-05-26 01:02:39 +00:00
team.cpp * delete_owned_ports() no longer scans the whole port array for ports belonging 2009-10-26 13:34:43 +00:00
thread.cpp That was not such a good destruction order in the error case. As the scheduler 2009-11-07 16:33:29 +00:00
timer.cpp Fixed build with tracing enabled. 2009-09-16 12:20:27 +00:00
usergroup.cpp * Introduced ref-counting for the I/O contexts. 2009-03-02 00:26:22 +00:00
wait_for_objects.cpp common_poll(): 2009-08-15 16:42:18 +00:00