Age | Commit message (Collapse) | Author |
|
This reverts commit 9c7906d8ad6ebec014b22b8757d916e9cad7d6d3.
|
|
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.
|
|
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.
|
|
This makes sure symbols referenced by assert uses may not be generated
if unused. The recently introduced __unused macro is used to suppress
compiler warnings resulting from this change.
|
|
Talk about "bytes" instead of "addresses" for better clarity.
|
|
|
|
|
|
Move the page properties into the new x86/page module, and the virtual
memory layout macros into the x86/pmap module.
|
|
|
|
This turns assert.h into a standard header.
|
|
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.
|
|
Using a single header for all types causing inclusion circular
dependencies isn't very elegant and doesn't scale.
|
|
|
|
This is mostly done for the machine-independent part.
|
|
Update the test_vm_page_fill module accordingly. The vm_kmem module
needs to be reworked in order to correctly handle failures.
|
|
This change was done using astyle, with a few manual editing here and
there.
|
|
|
|
This function is now unused, and there shouldn't be any need for it in
the future.
|
|
Now that a direct physical mapping is available, memory can be allocated
out of it without the need of an early virtual memory allocator.
|
|
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.
|
|
Update interface so that it's closer to the standard mmap() call. Fix
some offset declarations as uint64_t.
|
|
Although not yet clearly stated since it's not yet decided whether it will
remain the normal behaviour, the pmap functions assume physical mappings
to be valid on removal or protection update. But the kernel virtual memory
allocation function vm_kmem_alloc would merely call vm_kmem_free if a page
couldn't be allocated, resulting on the unconditional removal of the
underlying physical mappings of the whole range, including addresses for
which no mapping was created.
|
|
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.
|
|
|
|
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.
|
|
|
|
The original idea was to separate physical page allocation from page list
management, but it doesn't make much sense any more.
|
|
|
|
Similar to pmap_protect and pmap_extract, pmap_update is meant to handle
both kernel and regular pmap updates.
|
|
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.
|
|
Add vm/vm_adv.h for VM_ADV_xxx advice macros, and directly use
VM_{ADV,INHERIT,PROT}_xxx macros in the "packed" format used for mapping
requests and in map entries. This allows simpler comparisons between
stored flags and user provided values.
|
|
Use slightly shorter names, add WILLNEED and DONTNEED, and update users.
|
|
|
|
|
|
|
|
Scheduling is temporarily disabled until the thread module is able to
cope with multiple processors.
|
|
Instead of using a red-black tree, rely on the VM system to store kmem
specific private data.
|
|
Let the pmap module internally handle the mapping limit.
|
|
There are no precise enough criteria to justify the separation of these
two directories.
|
|
This new code handles 32-bit (including PAE, as before) and 64-bit
paging. A few macros and tables only are adjusted depending on the
selected mode.
|
|
|
|
|