Changeset c6ae4c2 in mainline for uspace/lib/c/generic/as.c
- Timestamp:
- 2011-12-16T21:12:52Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c8751452
- Parents:
- e2718e1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/as.c
re2718e1 rc6ae4c2 117 117 /** Find mapping to physical address. 118 118 * 119 * @param address Virtual address in question (virtual). 120 * @param[out] frame Frame address (physical). 121 * @return Error code. 122 * @retval EOK No error, @p frame holds the translation. 123 * @retval ENOENT Mapping not found. 119 * @param virt Virtual address to find mapping for. 120 * @param[out] phys Physical adress. 121 * 122 * @return EOK on no error. 123 * @retval ENOENT if no mapping was found. 124 * 124 125 */ 125 int as_get_physical_mapping(const void * address, uintptr_t *frame)126 int as_get_physical_mapping(const void *virt, uintptr_t *phys) 126 127 { 127 uintptr_t tmp_frame; 128 uintptr_t virt = (uintptr_t) address; 129 130 int rc = (int) __SYSCALL2(SYS_PAGE_FIND_MAPPING, 131 (sysarg_t) virt, (sysarg_t) &tmp_frame); 132 if (rc != EOK) { 133 return rc; 134 } 135 136 if (frame != NULL) { 137 *frame = tmp_frame; 138 } 139 140 return EOK; 128 return (int) __SYSCALL2(SYS_PAGE_FIND_MAPPING, (sysarg_t) virt, 129 (sysarg_t) phys); 141 130 } 142 131
Note:
See TracChangeset
for help on using the changeset viewer.