Subversion Repositories HelenOS-historic

Rev

Rev 1279 | Rev 1493 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1279 Rev 1430
Line 37... Line 37...
37
 *
37
 *
38
 * @param id Task ID.
38
 * @param id Task ID.
39
 * @param pf Physical address of the starting frame.
39
 * @param pf Physical address of the starting frame.
40
 * @param vp Virtual address of the sterting page.
40
 * @param vp Virtual address of the sterting page.
41
 * @param pages Number of pages to map.
41
 * @param pages Number of pages to map.
42
 * @param writable If true, the mapping will be created writable.
42
 * @param flags Flags for the new address space area.
43
 *
43
 *
44
 * @return 0 on success, EPERM if the caller lacks the CAP_MEM_MANAGER capability,
44
 * @return 0 on success, EPERM if the caller lacks the CAP_MEM_MANAGER capability,
45
 *     ENOENT if there is no task with specified ID and ENOMEM if there
45
 *     ENOENT if there is no task with specified ID and ENOMEM if there
46
 *     was some problem in creating address space area.
46
 *     was some problem in creating address space area.
47
 */
47
 */
48
int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable)
48
int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int flags)
49
{
49
{
50
    task_id_t task_id;
50
    task_id_t task_id;
51
    ddi_memarg_t arg;
51
    ddi_memarg_t arg;
52
 
52
 
53
    arg.task_id = id;
53
    arg.task_id = id;
54
    arg.phys_base = pf;
54
    arg.phys_base = pf;
55
    arg.virt_base = vp;
55
    arg.virt_base = vp;
56
    arg.pages = pages;
56
    arg.pages = pages;
57
    arg.writable = writable;
57
    arg.flags = flags;
58
 
58
 
59
    return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
59
    return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
60
}
60
}
61
 
61
 
62
/** Enable I/O space range to task.
62
/** Enable I/O space range to task.