Changeset 9426c1a3 in mainline


Ignore:
Timestamp:
2006-04-14T09:08:45Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
523fad8
Parents:
6a347b1e
Message:

Userspace support for SYS_ENABLE_IOSPACE syscall.

Location:
libc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libc/generic/ddi.c

    r6a347b1e r9426c1a3  
    4949{
    5050        task_id_t task_id;
    51         ddi_arg_t arg;
     51        ddi_memarg_t arg;
    5252
    5353        arg.task_id = id;
     
    5959        return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
    6060}
     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 */
     74int 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}
  • libc/include/ddi.h

    r6a347b1e r9426c1a3  
    3333
    3434extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable);
     35extern int enable_iospace(task_id_t id, void *ioaddr, unsigned long size);
    3536
    3637#endif
Note: See TracChangeset for help on using the changeset viewer.