summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.h
AgeCommit message (Collapse)Author
2018-04-14Fix left-over reserved identifiersRichard Braun
For some reason, commit be5b9d6ab9f7e7a81c367e4bb0823ba11f85940f didn't take care of all reserved identifiers.
2017-09-21New build systemRichard Braun
The new build system, called xbuild, is a minimalistic kbuild-like make-based build system, also using kconfig for scalable configurations.
2017-09-07Use accessors when referring to global kernel objectsRichard Braun
The kernel_map/kernel_pmap/kernel_task/etc... names were reused as they were in the Mach source code. They've been a (mostly harmless) long-standing violation of the coding rules.
2017-09-06vm: rename min/max macros to start/end variantsRichard Braun
The real problem actually only applies to "max" names, for which the value is ambiguous, as "max" usually implies the value is included in the associated range, which is not the case for these macros.
2017-09-05x86/{pmap,tcb}: don't use tsd for the update oplistRichard Braun
2017-07-13Switch to initialization operationsRichard Braun
2017-07-02vm/vm_kmem: create a VM object to track mapped kernel pagesRichard Braun
2017-06-25Remove the param moduleRichard Braun
Move the page properties into the new x86/page module, and the virtual memory layout macros into the x86/pmap module.
2017-03-14Use the X15 namespace consistently for macros defined by autoconfRichard Braun
2017-02-04Clean up compilationRichard Braun
Instead of mixing standard headers and internal redefinitions of standard types, completely rely on the compiler for what is guaranteed for a free standing environment. This results in the removal of kern/stddef.h and kern/stdint.h. The kern/types.h header is reintroduced for the different (and saner) purpose of defining types not specified in standard C, namely ssize_t for now.
2017-02-04kern/types: split into module-specific type headersRichard Braun
Using a single header for all types causing inclusion circular dependencies isn't very elegant and doesn't scale.
2017-01-14x86/pmap: minor renameRichard Braun
Talk about entries "per page table" instead of "per page table page". This is made obvious by the new PAE hierarchy, where the root page table isn't a page.
2017-01-13Replace unsigned long with uintptr_t for integer/pointer conversionsRichard Braun
This is mostly done for the machine-independent part.
2017-01-10x86/pmap: rework PAERichard Braun
Instead of presenting PAE mode as a two-level hierarchy (the same as non-PAE 32-bits) with a page directory 4 pages wide, present it as a three-level hierarchy. The purpose of this change is to break the requirement of the page directory being 4 contiguous pages, which is likely to fail because of fragmentation.
2017-01-09x86/pmap: report pmap update failuresRichard Braun
Update the test_vm_page_fill module accordingly. The vm_kmem module needs to be reworked in order to correctly handle failures.
2014-12-10x86/pmap: directmap updateRichard Braun
This module is probably the most impacted by the direct physical mapping. First, it establishes the direct physical mapping before paging is enabled, and uses the largest available page size when doing so. In addition, the recursive mapping of PTEs is removed, since all page table pages are allocated from the direct physical mapping. This changes the way mapping requests are processed. The ability to access any page table page at any time removes the need for virtual addresses reserved for temporary mappings. Since it's now perfectly possible to return physical address 0 for a kernel mapping, change the interface of the pmap_extract function and rename it to pmap_kextract to stress the fact that it should only be used for kernel mappings.
2014-12-06x86/pmap: remove page table accountingRichard Braun
This kind of strict accounting can lead to a kind of thrashing where one or more tables can get allocated and released very frequently. For now, take the naive approach of not freeing page table pages until the complete tree is torn down. Remove the now irrelevant x86_pmap_remove_ptp test module.
2014-12-06x86/pmap: minor name changeRichard Braun
Use the term "skip" instead of "shift" to align with radix tree terminology.
2014-09-03x86/cpu: improve percpu supportRichard Braun
- declare CPU descriptors as percpu variables - make the percpu segment register point to the percpu area instead of the CPU descriptor - remove the ugly accessors for the local CPU descriptor, pmap and TCB and use percpu variables for them instead - implement the cpu_local accessors as described in the percpu documentation
2014-06-19x86/pmap: fix typoRichard Braun
2014-06-19x86/cpu: unconditionnally call pmap_mp_setupRichard Braun
2014-05-08x86/pmap: per-CPU page tablesRichard Braun
Although currently not very useful since all pmap operations are global, this change enables the precise targeting of processors when maintaining the consistency of physical maps. It is essential to a scalable virtual memory system where non-overlapping mapping operations can be processed concurrently. It also temporarily removes some functionalities such as the ability to manipulate non-kernel pmaps and lazy TLB invalidation. These will be added again in the future.
2014-01-14Rework bootstrappingRichard Braun
Start application processors once the kernel is completely initialized, right before starting the scheduler. This simplifies the procedure with regard to inter-processor pmap updates.
2013-08-15x86/pmap: minor naming changesRichard Braun
Explicitely show levels start from 0 in macro names, and use clearer names for base addresses in the recursive mapping as well as for the number of PTEs per PTP.
2013-07-30x86/pmap: minor naming changeRichard Braun
Use "ptp" to refer to page table page(s), making it clearly different from "pt" which is used to denote paging translation.
2013-07-23x86/pmap: count PTEs per PTP at initializationRichard Braun
This is required in order to properly release page table pages when removing mappings from the kernel physical map.
2013-07-20x86/pmap: remove kernel-specific functionsRichard Braun
Remove the pmap_klimit, pmap_kgrow, pmap_kenter and pmap_kremove functions from the pmap interface. The regular pmap_enter and pmap_remove functions are now used instead. The kernel physical map is handled almost exactly like user physical maps, except shared root page table pages need special care. The pmap_kenter and pmap_kremove functions still exist but are private to the pmap implementation.
2013-07-20x86/pmap: minor pmap member type and name changeRichard Braun
The root_pt member of the pmap structure is ambiguous. Explicitely declare it as a physical address and add the _pa suffix to its name.
2013-07-03x86/pmap: new pmap_enter functionRichard Braun
2013-07-03x86/pmap: change pmap_kenter to pass protectionRichard Braun
2013-07-01x86/pmap: improve TLB invalidationRichard Braun
Add a processor bitmap per physical map to determine processors on which a pmap is loaded, so that only those processors receive update IPIs. In addition, implement lazy TLB invalidation by not loading page tables when switching to a kernel thread. To finish with, the thread module now calls pmap_load unconditionally without making assumptions about pmap optimizations.
2013-06-28x86/pmap: replace pmap_kupdate with pmap_updateRichard Braun
Similar to pmap_protect and pmap_extract, pmap_update is meant to handle both kernel and regular pmap updates.
2013-06-28x86/pmap: replace pmap_kextract with pmap_extractRichard Braun
As it was done for pmap_protect, replace a kernel-specific call with one that can handle both the kernel and regular pmaps. The new function isn't complete yet and cannot handle physical maps that aren't the kernel pmap or the currently loaded pmap.
2013-06-28x86/pmap: replace pmap_kprotect with pmap_protectRichard Braun
This change is merely a slight interface modification to get rid of a function that shouldn't be exported and replace it with the true entry point for setting physical mapping protection. The new function isn't complete yet and cannot handle physical maps that aren't the kernel pmap or the currently loaded pmap.
2013-04-21x86/pmap: replace spin locks with mutexes where relevantRichard Braun
2012-12-29kern/thread: handle address space on context switchRichard Braun
2012-12-28x86/pmap: reintroduce the kernel pmapRichard Braun
It is expected some future processes will require the kernel to have its own separate low level address space instead of always using the high part of user tasks. It also simplifies collecting statistics and managing other kernel specific data in a generic way. In addition, this change removes some duplicated boot data and makes boot code use more virtual to physical translations.
2012-12-27x86/pmap: adjust comments about kernel page tablesRichard Braun
2012-12-27x86/pmap: make pmap_kgrow flush updated TLB entriesRichard Braun
The rule of thumb of page table management is to flush the TLB whenever the page tables are changed in a way that requires it (e.g. to prevent inconsistencies due to prefetching). The recursive mapping entries are no exception and must abide by this rule.
2012-12-22x86/pmap: physical map creationRichard Braun
2012-12-22x86/param: don't depend on pmap declarationsRichard Braun
In order to avoid circular dependencies, the param.h header shouldn't include anything that may cause them. Move the ptemap size there and remove the machine/pmap.h inclusion.
2012-12-22x86/pmap: rename pmap_growkernel to pmap_kgrowRichard Braun
2012-12-22x86/pmap: minor comment updateRichard Braun
2012-12-12Simplify requirements on interrupts during initializationRichard Braun
Don't involve the pmap module directly, as there could be others. Make the cpu module completely responsible for synchronizing all processors on kernel entry so that interrupts can be explicitely enabled there.
2012-12-11Adjust interrupts configuration on kernel entryRichard Braun
2012-12-09x86/pmap: inter-processor TLB updatesRichard Braun
Scheduling is temporarily disabled until the thread module is able to cope with multiple processors.
2012-11-23x86/pmap: make pmap_zero_page staticRichard Braun
2012-11-21x86/pmap: remove the kernel pmapRichard Braun
Let the pmap module internally handle kernel mapping requests.
2012-11-21x86/pmap: turn pmap_klimit into a functionRichard Braun
Let the pmap module internally handle the mapping limit.
2012-11-03Merge lib into kernRichard Braun
There are no precise enough criteria to justify the separation of these two directories.