Index: libc/generic/ddi.c
===================================================================
--- libc/generic/ddi.c	(revision 6a347b1e3ccafd6fcaaca3d1b6a51b0df77b2d70)
+++ libc/generic/ddi.c	(revision 9426c1a3ced9f02b670da8e772a7ee850789f2d8)
@@ -49,5 +49,5 @@
 {
 	task_id_t task_id;
-	ddi_arg_t arg;
+	ddi_memarg_t arg;
 
 	arg.task_id = id;
@@ -59,2 +59,26 @@
 	return __SYSCALL1(SYS_MAP_PHYSMEM, (sysarg_t) &arg);
 }
+
+/** Enable I/O space range to task.
+ *
+ * Caller of this function must have the IO_MEM_MANAGER capability.
+ *
+ * @param id Task ID.
+ * @param ioaddr Starting address of the I/O range.
+ * @param size Size of the range.
+ *
+ * @return 0 on success, EPERM if the caller lacks the CAP_IO_MANAGER capability,
+ *	   ENOENT if there is no task with specified ID and ENOMEM if there
+ *	   was some problem in allocating memory.
+ */
+int enable_iospace(task_id_t id, void *ioaddr, unsigned long size)
+{
+	task_id_t task_id;
+	ddi_ioarg_t arg;
+
+	arg.task_id = id;
+	arg.ioaddr = ioaddr;
+	arg.size = size;
+
+	return __SYSCALL1(SYS_ENABLE_IOSPACE, (sysarg_t) &arg);
+}
Index: libc/include/ddi.h
===================================================================
--- libc/include/ddi.h	(revision 6a347b1e3ccafd6fcaaca3d1b6a51b0df77b2d70)
+++ libc/include/ddi.h	(revision 9426c1a3ced9f02b670da8e772a7ee850789f2d8)
@@ -33,4 +33,5 @@
 
 extern int map_physmem(task_id_t id, void *pf, void *vp, unsigned long pages, int writable);
+extern int enable_iospace(task_id_t id, void *ioaddr, unsigned long size);
 
 #endif
