#
62caef87 |
|
08-Nov-2013 |
François Revol <revol@free.fr> |
PPC: Restructure paging stuff to match other platforms First attempt. Totally untested.
|
#
749a60bf |
|
19-Jan-2014 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
ppc: atomic is no longer volatile per 077c84eb27b
|
#
b96e57e8 |
|
19-Oct-2013 |
François Revol <revol@free.fr> |
Fix typo
|
#
edaaaae8 |
|
20-Aug-2010 |
Andreas Färber <andreas.faerber@web.de> |
ppc: Implement arch_vm_translation_map_is_kernel_page_accessible() This remedies "Current thread pointer [...] is an address we can't read from." on entering KDL. Closes ticket #6163. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38293 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f290297b |
|
20-Aug-2010 |
Andreas Färber <andreas.faerber@web.de> |
ppc: Support other memory types Let setting the memory type to B_MTR_UC succeed. Add initial support for those memory types in the translation map, pointed out by Ingo in ticket #5193. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38292 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d5ab7a1 |
|
21-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and ClearAccessedAndModified() implementations into helper methods PageUnmapped() and UnaccessedPageUnmapped() in the base class. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1ba89e67 |
|
05-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Removed no-op VMTranslationMap::InitPostSem() and VMAddressSpace::InitPostSem(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
147133b7 |
|
25-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* First run through the kernel's private parts to use phys_{addr,size}_t where appropriate. * Typedef'ed page_num_t to phys_addr_t and used it in more places in vm_page.{h,cpp}. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36937 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e33adea4 |
|
01-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Fixed PPC build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36580 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c1be1e07 |
|
01-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* VMTranslationMap::Map()/Protect(): Added "memoryType" parameter. Not implemented for any architecture yet. * vm_set_area_memory_type(): Call VMTranslationMap::ProtectArea() to change the memory type for the already mapped pages. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c3d79332 |
|
18-Feb-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added missing PPCVMTranslationMap::QueryInterrupt(). Fixes #5275. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35516 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40bb9481 |
|
03-Feb-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Removed useless return parameter from vm_remove_all_page_mappings(). * Added vm_clear_page_mapping_accessed_flags() and vm_remove_all_page_mappings_if_unaccessed(), which combine the functionality of vm_test_map_activation(), vm_clear_map_flags(), and vm_remove_all_page_mappings(), thus saving lots of calls to translation map methods. The backend is the new method VMTranslationMap::ClearAccessedAndModified(). * Started to make use of the cached page queue and changed the meaning of the other non-free queues slightly: - Active queue: Contains mapped pages that have been used recently. - Inactive queue: Contains mapped pages that have not been used recently. Also contains unmapped temporary pages. - Modified queue: Contains unmapped modified pages. - Cached queue: Contains unmapped unmodified pages (LRU sorted). Unless we're actually low on memory and actively do paging, modified and cached queues only contain non-temporary pages. Cached pages are considered quasi free. They still belong to a cache, but since they are unmodified and unmapped, they can be freed immediately. And this is what vm_page_[try_]reserve_pages() do now when there are no more actually free pages at hand. Essentially this means that pages storing cached file data, unless mmap()ped, no longer are considered used and don't contribute to page pressure. Paging will not happen as long there are enough free + cached pages available. * Reimplemented the page daemon. It no longer scans all pages, but instead works the page queues. As long as the free pages situation is harmless, it only iterates through the active queue and deactivates pages that have not been used recently. When paging occurs it additionally scans the inactive queue and frees pages that have not been used recently. * Changed the page reservation/allocation interface: vm_page_[try_]reserve_pages(), vm_page_unreserve_pages(), and vm_page_allocate_page() now take a vm_page_reservation structure pointer. The reservation functions initialize the structure -- currently consisting only of a count member for the number of still reserved pages. vm_page_allocate_page() decrements the count and vm_page_unreserve_pages() unreserves the remaining pages (if any). Advantages are that reservation/ unreservation mismatches cannot occur anymore, that vm_page_allocate_page() can verify that the caller has indeed a reserved page left, and that there's no unnecessary pressure on the free page pool anymore. The only disadvantage is that the vm_page_reservation object needs to be passed around a bit. * Reworked the page reservation implementation: - Got rid of sSystemReservedPages and sPageDeficit. Instead sUnreservedFreePages now actually contains the number of free pages that have not yet been reserved (it cannot become negative anymore) and the new sUnsatisfiedPageReservations contains the number of pages that are still needed for reservation. - Threads waiting for reservations do now add themselves to a waiter queue, which is ordered by descending priority (VM priority and thread priority). High priority waiters are served first when pages become available. Fixes #5328. * cache_prefetch_vnode(): Would reserve one less page than allocated later, if the size wasn't page aligned. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35393 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8d1316fd |
|
22-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Replaced CACHE_DONT_SLEEP by two new flags CACHE_DONT_WAIT_FOR_MEMORY and CACHE_DONT_LOCK_KERNEL_SPACE. If the former is given, the slab memory manager does not wait when reserving memory or pages. The latter prevents area operations. The new flags add a bit of flexibility. E.g. when allocating page mapping objects for userland areas CACHE_DONT_WAIT_FOR_MEMORY is sufficient, i.e. the allocation will succeed as long as pages are available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35246 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
86c794e5 |
|
21-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
slab allocator: * Implemented a more elaborated raw memory allocation backend (MemoryManager). We allocate 8 MB areas whose pages we allocate and map when needed. An area is divided into equally-sized chunks which form the basic units of allocation. We have areas with three possible chunk sizes (small, medium, large), which is basically what the ObjectCache implementations were using anyway. * Added "uint32 flags" parameter to several of the slab allocator's object cache and object depot functions. E.g. object_depot_store() potentially wants to allocate memory for a magazine. But also in pure freeing functions it might eventually become useful to have those flags, since they could end up deleting an area, which might not be allowable in all situations. We should introduce specific flags to indicate that. * Reworked the block allocator. Since the MemoryManager allocates block-aligned areas, maintains a hash table for lookup, and maps chunks to object caches, we can quickly find out which object cache a to be freed allocation belongs to and thus don't need the boundary tags anymore. * Reworked the slab boot strap process. We allocate from the initial area only when really necessary, i.e. when the object cache for the respective allocation size has not been created yet. A single page is thus sufficient. other: * vm_allocate_early(): Added boolean "blockAlign" parameter. If true, the semantics is the same as for B_ANY_KERNEL_BLOCK_ADDRESS. * Use an object cache for page mappings. This significantly reduces the contention on the heap bin locks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f082f7f0 |
|
15-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added vm_page::accessed flag. Works analogously to vm_page::modified. * Reorganized the code for [un]mapping pages: - Added new VMTranslationMap::Unmap{Area,Page[s]}() which essentially do what vm_unmap_page[s]() did before, just in the architecture specific code, which allows for specific optimizations. UnmapArea() is for the special case that the complete area is unmapped. Particularly in case the address space is deleted, some work can be saved. Several TODOs could be slain. - Since they are only used within vm.cpp vm_map_page() and vm_unmap_page[s]() are now static and have lost their prefix (and the "preserveModified" parameter). * Added VMTranslationMap::Protect{Page,Area}(). They are just inline wrappers for Protect(). * X86VMTranslationMap::Protect(): Make sure not to accidentally clear the accessed/dirty flags. * X86VMTranslationMap::Unmap()/Protect(): Make page table skipping actually work. It was only skipping to the next page. * Adjusted the PPC code to at least compile. No measurable effect for the -j8 Haiku image build time, though the kernel time drops minimally. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35089 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c6aa0135 |
|
14-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Changed VMTranslationMap::Lock()/Unlock() return types to the usual. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bcc2c157 |
|
13-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Refactored vm_translation_map: * Pulled the physical page mapping functions out of vm_translation_map into a new interface VMPhysicalPageMapper. * Renamed vm_translation_map to VMTranslationMap and made it a proper C++ class. The functions in the operations vector have become methods. * Added class GenericVMPhysicalPageMapper implementing VMPhysicalPageMapper as far as possible (without actually writing new code). * Adjusted the x86 and the PPC specifics accordingly (untested for the latter). For the other architectures the build is, I'm afraid, seriously broken. The next steps will modify and extend the VMTranslationMap interface, so that it will be possible to fix the bugs in vm_unmap_page[s]() and employ architecture specific optimizations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35066 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e95b86e |
|
02-Jan-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andreas Faerber: * Fix compilation when commented out. Thanks! Fixes ticket #5192. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34861 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e50cf876 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the VM headers into subdirectory vm/. * Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
90d870c1 |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved VMAddressSpace definition to vm_address_space.h. * "Classified" VMAddressSpace, i.e. turned the vm_address_space_*() functions into methods, made all attributes (but "areas") private, and added accessors. * Also turned the vm.cpp functions vm_area_lookup() and remove_area_from_address_space() into VMAddressSpace methods. The rest of the area management functionality will follow soon. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34447 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b0db552c |
|
01-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Renamed vm_address_space to VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34422 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ea2abd11 |
|
02-Aug-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* 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
|
#
47c40a10 |
|
19-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Prefixed memset_physical() and memcpy_to_physical() with "vm_", added vm_memcpy_from_physical() and vm_memcpy_physical_page(), and added respective functions to the vm_translation_map operations. The architecture specific implementation can now decide how to implement them most efficiently. Added generic implementations that can be used, though. * Changed vm_{get,put}_physical_page(). The former no longer accepts flags (the only flag PHYSICAL_PAGE_DONT_WAIT wasn't needed anymore). Instead it returns an implementation-specific handle that has to be passed to the latter. Added vm_{get,put}_physical_page_current_cpu() and *_debug() variants, that work only for the current CPU, respectively when in the kernel debugger. Also adjusted the vm_translation_map operations accordingly. * Made consequent use of the physical memory operations in the source tree. * Also adjusted the m68k and ppc implementations with respect to the vm_translation_map operation changes, but they are probably broken, nevertheless. * For x86 the generic physical page mapper isn't used anymore. It is suboptimal in any case. For systems with small memory it is too much overhead, since one can just map the complete physical memory (that's not done yet, though). For systems with large memory it counteracts the VM strategy to reuse the least recently used pages. Since those pages will most likely not be mapped by the page mapper anymore, it will keep remapping chunks. This was also the reason why building Haiku in Haiku was significantly faster with only 256 MB RAM (since that much could be kept mapped all the time). Now we're using a different strategy: We have small pools of virtual page slots per CPU that are used for the physical page operations (memset_physical(), memcpy_*_physical()) with CPU-pinned thread. Furthermore we have four slots per translation map, which are used to map page tables. These changes speed up the Haiku image build in Haiku significantly. On my Core2 Duo 2.2 GHz 2 GB machine about 40% to 20 min 40 s (KDEBUG disabled, block cache debug disabled). Still more than factor 3 slower than FreeBSD and Linux, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28244 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1b6eff28 |
|
11-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replaced the vm_get_physical_page() "flags" PHYSICAL_PAGE_{NO,CAN}_WAIT into an actual flag PHYSICAL_PAGE_DONT_WAIT. * Pass the flags through to the chunk mapper callback. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27979 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b0f5179a |
|
28-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed recursive_lock to use a mutex instead of a semaphore. * Adjusted code using recursive locks respectively. The initialization cannot fail anymore, and it is possible to use recursive locks in the early boot process (even uninitialized, if in BSS), which simplifies things a little. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0e183340 |
|
06-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Mapping a page might actually need memory - since we usually have locks that interfere with the page thief, we always need to have reserved a page for this upfront. I introduced a function to the vm_translation_map layer that estimates how much pages a mapping might need at maximum. All functions that map a page now call this and reserve the needed pages upfront. It might not be a nice solution, but it works. * The page thief could run into a panic when trying to call vm_cache_release_ref() on a non-existing (NULL) cache. * Also, it will now ignore wired active pages. * There is still a race condition between the page writer and the vnode destruction - writing a page back needs a valid vnode, but that might just have been deleted. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22455 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4d7c45a7 |
|
14-Mar-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed PPC build (still using the older compiler, though). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20384 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d1249717 |
|
13-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed PPC kernel build (and a warning). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19058 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
573c4336 |
|
30-Apr-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Implemented quite a hack to solve the lockless get_memory_map() problem (bug #349): when called with interrupts turned off, get_memory_map() will now call the new vm_translation_map_ops::query_interrupt() call. Under PPC, this is trivial (at least right now), but on x86 we need to make sure we have access to the page table entry, ie. we need to create an area that points to its own page table entry, so that we can map in the page table entry containing the address we're looking for. It's not really nice, feel free to come up with a cleaner solution :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17280 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
31ac264b |
|
10-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added TODO regarding the use of arch_cpu_global_TLB_invalidate(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15903 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6c678c57 |
|
09-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* The exception vector offset is now also part of the iframe. * Cloned iframe stack management from x86. * Reimplemented arch_thread_{get,set}_current_thread(). The thread structure is stored in SPRG2. It is set to NULL in arch_cpu_preboot_init(), now. A non-null current thread causes all kinds of undesired behavior in early boot code. * We establish the address space mappings we know from the Open Firmware as areas. At least those in kernel address space. The ones in userland address space are tougher. Fortunately on my Mac mini there aren't any save the boot_loader stack, which is not needed any longer anyway. * Added stack trace support to the kernel debugger. Mostly cloned and adjusted the x86 code. Some bits are still missing, like stack traces for other threads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15890 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
67ea83c5 |
|
07-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
We use the generic physical page mapper for PPC now. I realized that it is actually not that nice for PPC since we don't have large pages. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15860 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c8cd524c |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Refactored arch_vm_translation_map_init_post_area() a bit: Pulled out remapping stuff into separate functions and made them available to others. * Remap the exception handler space in arch_int_init_post_vm() into the kernel address space (same issue as with the page table). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15783 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
10a83ac3 |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added tlbia() and tlbie() macros. Replaced ptesync() by ppc_sync(); the fact that I couldn't find ptesync in an otherwise more complete documentation I downloaded yesterday made me suspicious. * arch_cpu_global_TLB_invalidate() uses tlbia now. The instruction is optional, but so is tlbie (how I understood it is that both exist, when the architecture implementation has a TLB). And the former loop looked just scary. * Implemented arch_cpu_user_TLB_invalidate(). It does just the same as arch_cpu_global_TLB_invalidate(). * Some changes with respect to synchronization required on page table and segment register updates. * Some more minor renaming. Pulled a new function remove_page_table_entry() out of unmap_tmap(). * In arch_vm_translation_map_init_post_area() we do now remap the page table into the kernel address space, if it was without before. The page table might actually be a good application for BAT, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15773 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b019d8c5 |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed the static variables according to Haiku conventions. * Renamed occurrences of ASID/asid to VSID/vsid where appropriate. * vm_translation_map_arch_info::vsid_base is now the first usable VSID and doesn't need to be shifted anymore. * Changed the VSID base shift from 4 to 3, since we need only 8 VSIDs per team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15772 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b9b301b6 |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replace the arch_cpu_global_TLB_invalidate() sledge hammer in fill_page_table_entry() by a ptesync(). Mapping the kernel heap took about 2 minutes here before. * Added missing shift of the asid_base in ppc_translation_map_change_asid(). * Commented out the BAT stuff in arch_vm_translation_map_init_post_area(). Besides that I think it won't work that way, it made the page table unaccessible; though I'm not sure why. * Added a bit of documentation to the beginning of the file. Should give enough information to understand what happens here without further detailed knowledge about the architecture. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15769 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
31cfffdf |
|
27-Dec-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added missing include. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15684 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4318316c |
|
20-Dec-2005 |
Axel Dörfler <axeld@pinc-software.de> |
This should fix PPC build after recent changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15610 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2d690920 |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed system/core to system/kernel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12360 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
749a60bf398862409a04a9555ec42d72cec747d7 |
|
19-Jan-2014 |
Alexander von Gluck IV <kallisti5@unixzen.com> |
ppc: atomic is no longer volatile per 077c84eb27b
|
#
b96e57e8853e11d9bf6df0a7f61d452c4a0be5d0 |
|
19-Oct-2013 |
François Revol <revol@free.fr> |
Fix typo
|
#
edaaaae8cdaa75bad7e35b06e310b9ef163eb755 |
|
20-Aug-2010 |
Andreas Färber <andreas.faerber@web.de> |
ppc: Implement arch_vm_translation_map_is_kernel_page_accessible() This remedies "Current thread pointer [...] is an address we can't read from." on entering KDL. Closes ticket #6163. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38293 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f290297bb68dfab9080fff39d47351dd2d7d1331 |
|
20-Aug-2010 |
Andreas Färber <andreas.faerber@web.de> |
ppc: Support other memory types Let setting the memory type to B_MTR_UC succeed. Add initial support for those memory types in the translation map, pointed out by Ingo in ticket #5193. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38292 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0d5ab7a14d2b2d10ce462eba9896d7a7bd01d827 |
|
21-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and ClearAccessedAndModified() implementations into helper methods PageUnmapped() and UnaccessedPageUnmapped() in the base class. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1ba89e67eda21e7ad9e1ec57a53ae0a3436b8721 |
|
05-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Removed no-op VMTranslationMap::InitPostSem() and VMAddressSpace::InitPostSem(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
147133b76cbb1603bdbff295505f5b830cb4e688 |
|
25-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* First run through the kernel's private parts to use phys_{addr,size}_t where appropriate. * Typedef'ed page_num_t to phys_addr_t and used it in more places in vm_page.{h,cpp}. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36937 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e33adea4dc4833314e8cbd22e8f65a906c30e574 |
|
01-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Fixed PPC build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36580 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c1be1e0761d0904d99dabd3d1638d94802b4b600 |
|
01-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* VMTranslationMap::Map()/Protect(): Added "memoryType" parameter. Not implemented for any architecture yet. * vm_set_area_memory_type(): Call VMTranslationMap::ProtectArea() to change the memory type for the already mapped pages. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36574 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c3d793327461ea92d2500ffc032b30befd3651bc |
|
18-Feb-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added missing PPCVMTranslationMap::QueryInterrupt(). Fixes #5275. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35516 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40bb94819e6c39d72ab29edc1a0dcd80b15b8b42 |
|
03-Feb-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Removed useless return parameter from vm_remove_all_page_mappings(). * Added vm_clear_page_mapping_accessed_flags() and vm_remove_all_page_mappings_if_unaccessed(), which combine the functionality of vm_test_map_activation(), vm_clear_map_flags(), and vm_remove_all_page_mappings(), thus saving lots of calls to translation map methods. The backend is the new method VMTranslationMap::ClearAccessedAndModified(). * Started to make use of the cached page queue and changed the meaning of the other non-free queues slightly: - Active queue: Contains mapped pages that have been used recently. - Inactive queue: Contains mapped pages that have not been used recently. Also contains unmapped temporary pages. - Modified queue: Contains unmapped modified pages. - Cached queue: Contains unmapped unmodified pages (LRU sorted). Unless we're actually low on memory and actively do paging, modified and cached queues only contain non-temporary pages. Cached pages are considered quasi free. They still belong to a cache, but since they are unmodified and unmapped, they can be freed immediately. And this is what vm_page_[try_]reserve_pages() do now when there are no more actually free pages at hand. Essentially this means that pages storing cached file data, unless mmap()ped, no longer are considered used and don't contribute to page pressure. Paging will not happen as long there are enough free + cached pages available. * Reimplemented the page daemon. It no longer scans all pages, but instead works the page queues. As long as the free pages situation is harmless, it only iterates through the active queue and deactivates pages that have not been used recently. When paging occurs it additionally scans the inactive queue and frees pages that have not been used recently. * Changed the page reservation/allocation interface: vm_page_[try_]reserve_pages(), vm_page_unreserve_pages(), and vm_page_allocate_page() now take a vm_page_reservation structure pointer. The reservation functions initialize the structure -- currently consisting only of a count member for the number of still reserved pages. vm_page_allocate_page() decrements the count and vm_page_unreserve_pages() unreserves the remaining pages (if any). Advantages are that reservation/ unreservation mismatches cannot occur anymore, that vm_page_allocate_page() can verify that the caller has indeed a reserved page left, and that there's no unnecessary pressure on the free page pool anymore. The only disadvantage is that the vm_page_reservation object needs to be passed around a bit. * Reworked the page reservation implementation: - Got rid of sSystemReservedPages and sPageDeficit. Instead sUnreservedFreePages now actually contains the number of free pages that have not yet been reserved (it cannot become negative anymore) and the new sUnsatisfiedPageReservations contains the number of pages that are still needed for reservation. - Threads waiting for reservations do now add themselves to a waiter queue, which is ordered by descending priority (VM priority and thread priority). High priority waiters are served first when pages become available. Fixes #5328. * cache_prefetch_vnode(): Would reserve one less page than allocated later, if the size wasn't page aligned. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35393 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8d1316fd23616f6dac131a0eba5dab08acc6e76d |
|
22-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Replaced CACHE_DONT_SLEEP by two new flags CACHE_DONT_WAIT_FOR_MEMORY and CACHE_DONT_LOCK_KERNEL_SPACE. If the former is given, the slab memory manager does not wait when reserving memory or pages. The latter prevents area operations. The new flags add a bit of flexibility. E.g. when allocating page mapping objects for userland areas CACHE_DONT_WAIT_FOR_MEMORY is sufficient, i.e. the allocation will succeed as long as pages are available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35246 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
86c794e5c10f1b2d99d672d424a8637639c703dd |
|
21-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
slab allocator: * Implemented a more elaborated raw memory allocation backend (MemoryManager). We allocate 8 MB areas whose pages we allocate and map when needed. An area is divided into equally-sized chunks which form the basic units of allocation. We have areas with three possible chunk sizes (small, medium, large), which is basically what the ObjectCache implementations were using anyway. * Added "uint32 flags" parameter to several of the slab allocator's object cache and object depot functions. E.g. object_depot_store() potentially wants to allocate memory for a magazine. But also in pure freeing functions it might eventually become useful to have those flags, since they could end up deleting an area, which might not be allowable in all situations. We should introduce specific flags to indicate that. * Reworked the block allocator. Since the MemoryManager allocates block-aligned areas, maintains a hash table for lookup, and maps chunks to object caches, we can quickly find out which object cache a to be freed allocation belongs to and thus don't need the boundary tags anymore. * Reworked the slab boot strap process. We allocate from the initial area only when really necessary, i.e. when the object cache for the respective allocation size has not been created yet. A single page is thus sufficient. other: * vm_allocate_early(): Added boolean "blockAlign" parameter. If true, the semantics is the same as for B_ANY_KERNEL_BLOCK_ADDRESS. * Use an object cache for page mappings. This significantly reduces the contention on the heap bin locks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f082f7f019941732f1d2b99f627fbeeeec3746af |
|
15-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added vm_page::accessed flag. Works analogously to vm_page::modified. * Reorganized the code for [un]mapping pages: - Added new VMTranslationMap::Unmap{Area,Page[s]}() which essentially do what vm_unmap_page[s]() did before, just in the architecture specific code, which allows for specific optimizations. UnmapArea() is for the special case that the complete area is unmapped. Particularly in case the address space is deleted, some work can be saved. Several TODOs could be slain. - Since they are only used within vm.cpp vm_map_page() and vm_unmap_page[s]() are now static and have lost their prefix (and the "preserveModified" parameter). * Added VMTranslationMap::Protect{Page,Area}(). They are just inline wrappers for Protect(). * X86VMTranslationMap::Protect(): Make sure not to accidentally clear the accessed/dirty flags. * X86VMTranslationMap::Unmap()/Protect(): Make page table skipping actually work. It was only skipping to the next page. * Adjusted the PPC code to at least compile. No measurable effect for the -j8 Haiku image build time, though the kernel time drops minimally. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35089 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c6aa013564abfcef737001bd166d1130804bd3d3 |
|
14-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Changed VMTranslationMap::Lock()/Unlock() return types to the usual. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35075 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
bcc2c157a1c54f5169de1e7a3e32c49e92bbe0aa |
|
13-Jan-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Refactored vm_translation_map: * Pulled the physical page mapping functions out of vm_translation_map into a new interface VMPhysicalPageMapper. * Renamed vm_translation_map to VMTranslationMap and made it a proper C++ class. The functions in the operations vector have become methods. * Added class GenericVMPhysicalPageMapper implementing VMPhysicalPageMapper as far as possible (without actually writing new code). * Adjusted the x86 and the PPC specifics accordingly (untested for the latter). For the other architectures the build is, I'm afraid, seriously broken. The next steps will modify and extend the VMTranslationMap interface, so that it will be possible to fix the bugs in vm_unmap_page[s]() and employ architecture specific optimizations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35066 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e95b86e15cbbab1eeae0c138638783203ad8dfe |
|
02-Jan-2010 |
Stephan Aßmus <superstippi@gmx.de> |
Patch by Andreas Faerber: * Fix compilation when commented out. Thanks! Fixes ticket #5192. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34861 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e50cf8765be50a7454c9488db38b638cf90805af |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved the VM headers into subdirectory vm/. * Renamed vm_cache.h/vm_address_space.h to VMCache.h/VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34449 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
90d870c1556bdc415c7f41de5474ebebb0ceebdd |
|
02-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Moved VMAddressSpace definition to vm_address_space.h. * "Classified" VMAddressSpace, i.e. turned the vm_address_space_*() functions into methods, made all attributes (but "areas") private, and added accessors. * Also turned the vm.cpp functions vm_area_lookup() and remove_area_from_address_space() into VMAddressSpace methods. The rest of the area management functionality will follow soon. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34447 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b0db552cd921ff16d61400ee5a5f855f392e8b87 |
|
01-Dec-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Renamed vm_address_space to VMAddressSpace. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34422 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ea2abd110bd6a4518a954477562e2dd94a5fef9d |
|
02-Aug-2009 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* 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
|
#
47c40a10a10dc615e078754503f2c19b9f98c38d |
|
19-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Prefixed memset_physical() and memcpy_to_physical() with "vm_", added vm_memcpy_from_physical() and vm_memcpy_physical_page(), and added respective functions to the vm_translation_map operations. The architecture specific implementation can now decide how to implement them most efficiently. Added generic implementations that can be used, though. * Changed vm_{get,put}_physical_page(). The former no longer accepts flags (the only flag PHYSICAL_PAGE_DONT_WAIT wasn't needed anymore). Instead it returns an implementation-specific handle that has to be passed to the latter. Added vm_{get,put}_physical_page_current_cpu() and *_debug() variants, that work only for the current CPU, respectively when in the kernel debugger. Also adjusted the vm_translation_map operations accordingly. * Made consequent use of the physical memory operations in the source tree. * Also adjusted the m68k and ppc implementations with respect to the vm_translation_map operation changes, but they are probably broken, nevertheless. * For x86 the generic physical page mapper isn't used anymore. It is suboptimal in any case. For systems with small memory it is too much overhead, since one can just map the complete physical memory (that's not done yet, though). For systems with large memory it counteracts the VM strategy to reuse the least recently used pages. Since those pages will most likely not be mapped by the page mapper anymore, it will keep remapping chunks. This was also the reason why building Haiku in Haiku was significantly faster with only 256 MB RAM (since that much could be kept mapped all the time). Now we're using a different strategy: We have small pools of virtual page slots per CPU that are used for the physical page operations (memset_physical(), memcpy_*_physical()) with CPU-pinned thread. Furthermore we have four slots per translation map, which are used to map page tables. These changes speed up the Haiku image build in Haiku significantly. On my Core2 Duo 2.2 GHz 2 GB machine about 40% to 20 min 40 s (KDEBUG disabled, block cache debug disabled). Still more than factor 3 slower than FreeBSD and Linux, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28244 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1b6eff280f4afcf4d7c9dc9ccdc3a65f4e6ca0fd |
|
11-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replaced the vm_get_physical_page() "flags" PHYSICAL_PAGE_{NO,CAN}_WAIT into an actual flag PHYSICAL_PAGE_DONT_WAIT. * Pass the flags through to the chunk mapper callback. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27979 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b0f5179aa51eb680cdeea656a8b11fdbc6b56d63 |
|
28-May-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed recursive_lock to use a mutex instead of a semaphore. * Adjusted code using recursive locks respectively. The initialization cannot fail anymore, and it is possible to use recursive locks in the early boot process (even uninitialized, if in BSS), which simplifies things a little. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25687 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
0e183340579eeeb7703088d847cfd1284a511129 |
|
06-Oct-2007 |
Axel Dörfler <axeld@pinc-software.de> |
* Mapping a page might actually need memory - since we usually have locks that interfere with the page thief, we always need to have reserved a page for this upfront. I introduced a function to the vm_translation_map layer that estimates how much pages a mapping might need at maximum. All functions that map a page now call this and reserve the needed pages upfront. It might not be a nice solution, but it works. * The page thief could run into a panic when trying to call vm_cache_release_ref() on a non-existing (NULL) cache. * Also, it will now ignore wired active pages. * There is still a race condition between the page writer and the vnode destruction - writing a page back needs a valid vnode, but that might just have been deleted. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22455 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4d7c45a7f1b9d7b554c8b12282b58554d3c0ee59 |
|
14-Mar-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed PPC build (still using the older compiler, though). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20384 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d12497173ab9c61a4dd59071c3e96cc9ea833bbb |
|
13-Oct-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed PPC kernel build (and a warning). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19058 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
573c4336a35b51c7bf651042915e4597f21f470a |
|
30-Apr-2006 |
Axel Dörfler <axeld@pinc-software.de> |
Implemented quite a hack to solve the lockless get_memory_map() problem (bug #349): when called with interrupts turned off, get_memory_map() will now call the new vm_translation_map_ops::query_interrupt() call. Under PPC, this is trivial (at least right now), but on x86 we need to make sure we have access to the page table entry, ie. we need to create an area that points to its own page table entry, so that we can map in the page table entry containing the address we're looking for. It's not really nice, feel free to come up with a cleaner solution :-) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17280 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
31ac264b1e12811d0b30be71324b656c174a2eda |
|
10-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added TODO regarding the use of arch_cpu_global_TLB_invalidate(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15903 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6c678c57c736f4688c9bab047bed3fe00fd27a13 |
|
09-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* The exception vector offset is now also part of the iframe. * Cloned iframe stack management from x86. * Reimplemented arch_thread_{get,set}_current_thread(). The thread structure is stored in SPRG2. It is set to NULL in arch_cpu_preboot_init(), now. A non-null current thread causes all kinds of undesired behavior in early boot code. * We establish the address space mappings we know from the Open Firmware as areas. At least those in kernel address space. The ones in userland address space are tougher. Fortunately on my Mac mini there aren't any save the boot_loader stack, which is not needed any longer anyway. * Added stack trace support to the kernel debugger. Mostly cloned and adjusted the x86 code. Some bits are still missing, like stack traces for other threads. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15890 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
67ea83c5667e414a793107a16e3904ad4b0308b2 |
|
07-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
We use the generic physical page mapper for PPC now. I realized that it is actually not that nice for PPC since we don't have large pages. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15860 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c8cd524c6736ec6bd11aaae124b0935ee07ba8d1 |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Refactored arch_vm_translation_map_init_post_area() a bit: Pulled out remapping stuff into separate functions and made them available to others. * Remap the exception handler space in arch_int_init_post_vm() into the kernel address space (same issue as with the page table). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15783 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
10a83ac31f2813e100440ef8aabb864bfb4c81fa |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added tlbia() and tlbie() macros. Replaced ptesync() by ppc_sync(); the fact that I couldn't find ptesync in an otherwise more complete documentation I downloaded yesterday made me suspicious. * arch_cpu_global_TLB_invalidate() uses tlbia now. The instruction is optional, but so is tlbie (how I understood it is that both exist, when the architecture implementation has a TLB). And the former loop looked just scary. * Implemented arch_cpu_user_TLB_invalidate(). It does just the same as arch_cpu_global_TLB_invalidate(). * Some changes with respect to synchronization required on page table and segment register updates. * Some more minor renaming. Pulled a new function remove_page_table_entry() out of unmap_tmap(). * In arch_vm_translation_map_init_post_area() we do now remap the page table into the kernel address space, if it was without before. The page table might actually be a good application for BAT, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15773 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b019d8c5f34186cc6ada95a86a64d413bf1013aa |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Renamed the static variables according to Haiku conventions. * Renamed occurrences of ASID/asid to VSID/vsid where appropriate. * vm_translation_map_arch_info::vsid_base is now the first usable VSID and doesn't need to be shifted anymore. * Changed the VSID base shift from 4 to 3, since we need only 8 VSIDs per team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15772 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b9b301b6c8068d6f96b4d2c0cb3c49a6a7ab477c |
|
01-Jan-2006 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Replace the arch_cpu_global_TLB_invalidate() sledge hammer in fill_page_table_entry() by a ptesync(). Mapping the kernel heap took about 2 minutes here before. * Added missing shift of the asid_base in ppc_translation_map_change_asid(). * Commented out the BAT stuff in arch_vm_translation_map_init_post_area(). Besides that I think it won't work that way, it made the page table unaccessible; though I'm not sure why. * Added a bit of documentation to the beginning of the file. Should give enough information to understand what happens here without further detailed knowledge about the architecture. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15769 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
31cfffdff4e497e3c6d9870784f0a3ff310cbf76 |
|
27-Dec-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added missing include. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15684 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4318316c65c5a56e0350126879bb771eaeac9c42 |
|
20-Dec-2005 |
Axel Dörfler <axeld@pinc-software.de> |
This should fix PPC build after recent changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15610 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2d690920ac4d0cd27eb3c118fb2b0862615869e0 |
|
13-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Renamed system/core to system/kernel. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12360 a95241bf-73f2-0310-859d-f6bbb57e9c96
|