diff options
Diffstat (limited to 'kernel/include')
-rw-r--r-- | kernel/include/comus/memory.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/kernel/include/comus/memory.h b/kernel/include/comus/memory.h index 92525da..408521b 100644 --- a/kernel/include/comus/memory.h +++ b/kernel/include/comus/memory.h @@ -124,6 +124,13 @@ void *mem_mapaddr(mem_ctx_t ctx, void *phys, void *virt, size_t len, void mem_unmapaddr(mem_ctx_t ctx, const void *virt); /** + * Gets the physical address for a given vitural address + * @param ctx - the memory context + * @param virt - the vitural address + */ +void *mem_get_phys(mem_ctx_t ctx, const void *virt); + +/** * Allocate a single page of memory with the given paging structure * * @param ctx - the memory context @@ -195,6 +202,12 @@ void *kmapaddr(void *phys, void *virt, size_t len, unsigned int flags); void *kmapuseraddr(mem_ctx_t ctx, const void *virt, size_t len); /** + * Gets the physical address for a given vitural address + * @param virt - the vitural address + */ +void *kget_phys(const void *virt); + +/** * Unmaps mapped address from the kmapaddr function * @param virt - the vitural address returned from kmapaddr */ |