Rev 1180 | Rev 1213 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1180 | Rev 1192 | ||
---|---|---|---|
Line 46... | Line 46... | ||
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 writable) |
49 | { |
49 | { |
50 | task_id_t task_id; |
50 | task_id_t task_id; |
51 | ddi_arg_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.writable = writable; |
58 | 58 | ||
59 | return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg); |
59 | return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg); |
60 | } |
60 | } |
- | 61 | ||
- | 62 | /** Enable I/O space range to task. |
|
- | 63 | * |
|
- | 64 | * Caller of this function must have the IO_MEM_MANAGER capability. |
|
- | 65 | * |
|
- | 66 | * @param id Task ID. |
|
- | 67 | * @param ioaddr Starting address of the I/O range. |
|
- | 68 | * @param size Size of the range. |
|
- | 69 | * |
|
- | 70 | * @return 0 on success, EPERM if the caller lacks the CAP_IO_MANAGER capability, |
|
- | 71 | * ENOENT if there is no task with specified ID and ENOMEM if there |
|
- | 72 | * was some problem in allocating memory. |
|
- | 73 | */ |
|
- | 74 | int enable_iospace(task_id_t id, void *ioaddr, unsigned long size) |
|
- | 75 | { |
|
- | 76 | task_id_t task_id; |
|
- | 77 | ddi_ioarg_t arg; |
|
- | 78 | ||
- | 79 | arg.task_id = id; |
|
- | 80 | arg.ioaddr = ioaddr; |
|
- | 81 | arg.size = size; |
|
- | 82 | ||
- | 83 | return __SYSCALL1(SYS_ENABLE_IOSPACE, (sysarg_t) &arg); |
|
- | 84 | } |