Changes in uspace/lib/c/generic/ddi.c [fd6bd6d:28f8f170] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/ddi.c
rfd6bd6d r28f8f170 75 75 } 76 76 77 int dmamem_map(dmamem_t *dmamem, size_t pages, unsigned int map_flags,78 unsigned int dma_flags)79 {80 // FIXME TODO81 return -1;82 }83 84 int dmamem_unmap(dmamem_t *dmamem)85 {86 // FIXME TODO87 return -1;88 }89 90 int dmamem_lock(void *virt, void **phys, size_t pages)91 {92 // FIXME TODO93 return -1;94 }95 96 int dmamem_unlock(void *virt, size_t pages)97 {98 // FIXME TODO99 return -1;100 }101 102 77 /** Enable I/O space range to task. 103 78 * 104 79 * Caller of this function must have the IO_MEM_MANAGER capability. 105 80 * 106 * @param id 107 * @param ioaddr 108 * @param size 81 * @param id Task ID. 82 * @param ioaddr Starting address of the I/O range. 83 * @param size Size of the range. 109 84 * 110 * @return EOK on success 111 * @return EPERM if the caller lacks the CAP_IO_MANAGER capability 112 * @return ENOENT if there is no task with specified ID 113 * @return ENOMEM if there was some problem in allocating memory. 114 * 85 * @return 0 on success, EPERM if the caller lacks the 86 * CAP_IO_MANAGER capability, ENOENT if there is no task 87 * with specified ID and ENOMEM if there was some problem 88 * in allocating memory. 115 89 */ 116 90 int iospace_enable(task_id_t id, void *ioaddr, unsigned long size) 117 91 { 118 92 ddi_ioarg_t arg; 119 93 120 94 arg.task_id = id; 121 95 arg.ioaddr = ioaddr; 122 96 arg.size = size; 123 97 124 98 return __SYSCALL1(SYS_IOSPACE_ENABLE, (sysarg_t) &arg); 125 99 } … … 127 101 /** Enable PIO for specified I/O range. 128 102 * 129 * @param pio_addr 130 * @param size 131 * @param use_addr Address where the final address for132 * application's PIOwill be stored.103 * @param pio_addr I/O start address. 104 * @param size Size of the I/O region. 105 * @param use_addr Address where the final address for application's PIO 106 * will be stored. 133 107 * 134 * @return Zero on success or negative error code. 135 * 108 * @return Zero on success or negative error code. 136 109 */ 137 110 int pio_enable(void *pio_addr, size_t size, void **use_addr) … … 141 114 size_t offset; 142 115 unsigned int pages; 143 116 144 117 #ifdef IO_SPACE_BOUNDARY 145 118 if (pio_addr < IO_SPACE_BOUNDARY) { … … 148 121 } 149 122 #endif 150 123 151 124 phys = (void *) ALIGN_DOWN((uintptr_t) pio_addr, PAGE_SIZE); 152 125 offset = pio_addr - phys;
Note:
See TracChangeset
for help on using the changeset viewer.