Changes in uspace/lib/c/generic/as.c [8d70937:56273bb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/as.c
r8d70937 r56273bb 35 35 #include <as.h> 36 36 #include <libc.h> 37 #include <errno.h>38 37 #include <unistd.h> 39 38 #include <align.h> … … 115 114 } 116 115 117 /** Find mapping to physical address.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.124 */125 int as_get_physical_mapping(const void *address, uintptr_t *frame)126 {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;141 }142 143 116 /** @} 144 117 */
Note:
See TracChangeset
for help on using the changeset viewer.