summaryrefslogtreecommitdiff
path: root/arch/x86/machine/pmap.c
AgeCommit message (Collapse)Author
2018-02-24New errno.h standard headerRichard Braun
Use standard errno codes. This change also adds strerror to string.h.
2018-02-21x86/pmap: add TODO entryRichard Braun
2017-10-10x86/pmap: remove useless header inclusionRichard Braun
2017-10-04Fix some header inclusionsRichard Braun
2017-09-27x86/pmap: add assertion on CPU IDRichard Braun
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-06-25Use the C11 alignas and noreturn macrosRichard 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-06-10Use log functions where appropriateRichard Braun
2017-05-30Move assert.h to the include directoryRichard Braun
This turns assert.h into a standard header.
2017-04-29New stdio.h standard headerRichard Braun
Make kernel code obtain definitions for the printf family of functions through the inclusion of the standard stdio.h header.
2017-04-29kern/printk: rename to printfRichard Braun
The printk functions are close enough to the printf ones to bear the same names.
2017-04-10Rename section end symbolsRichard Braun
2017-03-16Update system counter namesRichard Braun
Now that event counters have been replaced with system counters, drop the convention of naming the counter as the event it tracks.
2017-03-15kern/syscnt: replace the evcnt moduleRichard Braun
The syscnt module supports more generic counters, in addition to atomic access from any context on any architecture.
2017-03-14x86/pmap: make syncer threads use a high fair-scheduling priorityRichard Braun
2017-03-14Use the X15 namespace consistently for macros defined by autoconfRichard Braun
2017-03-06x86/pmap: use spinlocks for sync requestsRichard 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-27x86/pmap: add assertion on mapping creationRichard Braun
The function is described not to allow mapping creation on virtual addresses for which a valid mapping already exists. Add an assertion to make sure that's the case.
2017-01-24Add brackets around one-line conditional statementsRichard Braun
Complete what was started in commit 39c13b3b84b34e0938220126c8f147d2b0b6ac89.
2017-01-24kern/thread: add the THREAD_KERNEL_PREFIX macroRichard Braun
This macro is used to build kernel thread names.
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-10x86/pmap: actually allow removal on invalid mappingsRichard Braun
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.
2016-12-09Force brackets around one-line conditional statementsRichard Braun
This change was done using astyle, with a few manual editing here and there.
2016-09-02x86/biosmem: rename biosmem_directmap_sizeRichard Braun
Rename this function to biosmem_directmap_end, to better reflect what it actually does.
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
2014-12-06x86/pmap: minor name changeRichard Braun
Use the term "skip" instead of "shift" to align with radix tree terminology.
2014-11-17vm/vm_kmem: minor interface updatesRichard Braun
Make functions accept and return pointers instead of integers. Most users of the kernel allocator directly use the returned addresses. Pointers make that more practical.
2014-09-10x86/pmap: fix initialization of percpu variablesRichard Braun
Application processors should never initialize data that are shared with other processors. In this case, it leaded to a race which could make pmap_update access uninitialized percpu data. But, since percpu areas are initially copies of the percpu section (which is the percpu area of the main processor), uninitialized percpu variables would actually have valid values, those inherited from the main processor. This would result in hard-to-debug data corruption.
2014-09-05x86/pmap: use percpu variablesRichard Braun
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-05-30x86/pmap: rework update operation listsRichard Braun
Having per-processor requests in each oplist doesn't scale with the number of processors. Instead, make these arrays of requests per-processor instead of per-thread and make pmap_update() acquire the local array.
2014-05-20x86/pmap: fix physical mapping removalRichard Braun
2014-05-20x86/pmap: free syncer threads oplistsRichard Braun
2014-05-20x86/pmap: fix implicit updatesRichard Braun
2014-05-20x86/pmap: fix oplist constructorRichard Braun
2014-05-14x86/pmap: release page table pagesRichard Braun
2014-05-14x86/pmap: fix PTEs accounting on page table duplicationRichard Braun
2014-05-14x86/pmap: fix allocation of reserved mappingsRichard Braun