Changeset 6212095 in mainline
- Timestamp:
- 2006-05-28T10:01:08Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c93e805
- Parents:
- 46fc2f9
- Location:
- generic
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/ddi/ddi_arg.h
r46fc2f9 r6212095 36 36 void *virt_base; /** Virtual address of starting page. */ 37 37 unsigned long pages; /** Number of pages to map. */ 38 int writable; /** True if the mapping should be writable. */38 int flags; /** Address space area flags for the mapping. */ 39 39 } ddi_memarg_t; 40 40 -
generic/src/ddi/ddi.c
r46fc2f9 r6212095 54 54 * @param vp Virtual page address of the starting page. 55 55 * @param pages Number of pages to map. 56 * @param writable If true, the mapping will be created writable.56 * @param flags Address space area flags for the mapping. 57 57 * 58 58 * @return 0 on success, EPERM if the caller lacks capabilities to use this syscall, … … 60 60 * there was a problem in creating address space area. 61 61 */ 62 static int ddi_physmem_map(task_id_t id, __address pf, __address vp, count_t pages, bool writable)62 static int ddi_physmem_map(task_id_t id, __address pf, __address vp, count_t pages, int flags) 63 63 { 64 64 ipl_t ipl; 65 65 cap_t caps; 66 66 task_t *t; 67 int flags;68 67 mem_backend_data_t backend_data; 69 68 … … 102 101 spinlock_unlock(&tasks_lock); 103 102 104 flags = AS_AREA_READ;105 if (writable)106 flags |= AS_AREA_WRITE;107 103 if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE, 108 104 &phys_backend, &backend_data)) { … … 196 192 return (__native) ddi_physmem_map((task_id_t) arg.task_id, ALIGN_DOWN((__address) arg.phys_base, FRAME_SIZE), 197 193 ALIGN_DOWN((__address) arg.virt_base, PAGE_SIZE), (count_t) arg.pages, 198 ( bool) arg.writable);194 (int) arg.flags); 199 195 } 200 196
Note:
See TracChangeset
for help on using the changeset viewer.