diff options
Diffstat (limited to 'mem/docs/vmap.9.scd')
| -rw-r--r-- | mem/docs/vmap.9.scd | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/mem/docs/vmap.9.scd b/mem/docs/vmap.9.scd index 89faca7..4ef9c32 100644 --- a/mem/docs/vmap.9.scd +++ b/mem/docs/vmap.9.scd @@ -28,8 +28,8 @@ Translation is the action of taking a virtual address and obtaining its physical The *mem_vmap_translate()* function translates a virtual address into its physical one in software. This can be useful for a few reasons and this mechanism is used internally by MemVmap implementation themselves. *mem_vmap_translate()* takes the following arguments: - _inner_ The *MemVmap* to use - _virt_ The virtual address to translate + - _inner_ The *MemVmap* to use + - _virt_ The virtual address to translate If the translation lands on an unmapped region of the virtual address space, the miss flag is set. @@ -37,11 +37,11 @@ If the translation lands on an unmapped region of the virtual address space, the The *mem_vmap_map()* function maps a region of physical memory into the specified virtual address space, around a specified virtual address, with some flags. *mem_vmap_map()* takes the following arguments: - _inner_ The *MemVmap* to use - _phys_ The beginning of the physical memory region that will back the map - _virt_ The beginning of the virtual memory region to which the physical memory shall be mapped - _len_ The length of the region in char-sized units - _flags_ The flags with which the region must be mapped + - _inner_ The *MemVmap* to use + - _phys_ The beginning of the physical memory region that will back the map + - _virt_ The beginning of the virtual memory region to which the physical memory shall be mapped + - _len_ The length of the region in char-sized units + - _flags_ The flags with which the region must be mapped The mapping operation may fail for reasons, such as: - The requested mapping overlaps with a pre-existing mapping @@ -52,9 +52,9 @@ Unmapping is the inverse operation of mapping, it removes a particular map from The *mem_vmap_unmap()* function is used to perform the unmap operation on a particular address space at a specified virtual address. *mem_vmap_unmap()* takes the following arguments: - _inner_ The *MemVmap* to use - _virt_ The beginning of the virtual memory region that must be unmapped - _len_ The length of the virtual memory region that must be unmapped + - _inner_ The *MemVmap* to use + - _virt_ The beginning of the virtual memory region that must be unmapped + - _len_ The length of the virtual memory region that must be unmapped Note: it is not an error to unmap a region of virtual memory that is not already mapped. The unmap operation, if properly implemented, should not fail. @@ -71,6 +71,7 @@ XXX todo, unimplemented yet # RETURN VALUES *mem_vmap_translate()* returns a physical address on success, 0 in case of error or miss + *mem_vmap_map()* returns 0 in case of success, or a non-zero value in case of error Refer to mem/errors.h for the list of error codes pertaining to the _mem_ module |
