- Timestamp:
- 2011-01-21T14:24:05Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c2020f7
- Parents:
- e8ad0de (diff), aa9f0a4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- kernel/generic
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/mm/page.h
re8ad0de rc431a83 37 37 38 38 #include <typedefs.h> 39 #include <proc/task.h> 39 40 #include <mm/as.h> 40 41 #include <memstr.h> … … 62 63 extern uintptr_t hw_map(uintptr_t, size_t); 63 64 65 extern sysarg_t sys_page_find_mapping(uintptr_t, uintptr_t *); 66 64 67 #endif 65 68 -
kernel/generic/include/syscall/syscall.h
re8ad0de rc431a83 59 59 SYS_AS_AREA_DESTROY, 60 60 61 SYS_PAGE_FIND_MAPPING, 62 61 63 SYS_IPC_CALL_SYNC_FAST, 62 64 SYS_IPC_CALL_SYNC_SLOW, -
kernel/generic/src/adt/avl.c
re8ad0de rc431a83 723 723 void avltree_walk(avltree_t *t, avltree_walker_t walker, void *arg) 724 724 { 725 _avltree_walk(t->root, walker, arg); 725 if (t->root) 726 _avltree_walk(t->root, walker, arg); 726 727 } 727 728 -
kernel/generic/src/mm/page.c
re8ad0de rc431a83 60 60 61 61 #include <mm/page.h> 62 #include <genarch/mm/page_ht.h> 63 #include <genarch/mm/page_pt.h> 62 64 #include <arch/mm/page.h> 63 65 #include <arch/mm/asid.h> … … 70 72 #include <debug.h> 71 73 #include <arch.h> 74 #include <syscall/copy.h> 75 #include <errno.h> 72 76 73 77 /** Virtual operations for page subsystem. */ … … 173 177 } 174 178 179 /** Syscall wrapper for getting mapping of a virtual page. 180 * 181 * @retval EOK Everything went find, @p uspace_frame and @p uspace_node 182 * contains correct values. 183 * @retval ENOENT Virtual address has no mapping. 184 */ 185 sysarg_t sys_page_find_mapping(uintptr_t virt_address, 186 uintptr_t *uspace_frame) 187 { 188 mutex_lock(&AS->lock); 189 190 pte_t *pte = page_mapping_find(AS, virt_address); 191 if (!PTE_VALID(pte) || !PTE_PRESENT(pte)) { 192 mutex_unlock(&AS->lock); 193 194 return (sysarg_t) ENOENT; 195 } 196 197 uintptr_t phys_address = PTE_GET_FRAME(pte); 198 199 mutex_unlock(&AS->lock); 200 201 int rc = copy_to_uspace(uspace_frame, 202 &phys_address, sizeof(phys_address)); 203 if (rc != EOK) { 204 return (sysarg_t) rc; 205 } 206 207 return EOK; 208 } 209 175 210 /** @} 176 211 */ -
kernel/generic/src/syscall/syscall.c
re8ad0de rc431a83 41 41 #include <proc/program.h> 42 42 #include <mm/as.h> 43 #include <mm/page.h> 43 44 #include <print.h> 44 45 #include <arch.h> … … 144 145 (syshandler_t) sys_as_area_destroy, 145 146 147 /* Page mapping related syscalls. */ 148 (syshandler_t) sys_page_find_mapping, 149 146 150 /* IPC related syscalls. */ 147 151 (syshandler_t) sys_ipc_call_sync_fast,
Note:
See TracChangeset
for help on using the changeset viewer.