Index: uspace/lib/c/generic/ddi.c
===================================================================
--- uspace/lib/c/generic/ddi.c	(revision 6b8e5b74427c3a66a192963cdac8b0ddbc45e451)
+++ uspace/lib/c/generic/ddi.c	(revision 8f5b4d44b3c4c5a7695d3d4126e2b7cb52c4e459)
@@ -53,22 +53,24 @@
 }
 
-/** Map piece of physical memory to task.
+/** Map a piece of physical memory to task.
  *
  * Caller of this function must have the CAP_MEM_MANAGER capability.
  *
- * @param pf		Physical address of the starting frame.
- * @param vp		Virtual address of the starting page.
- * @param pages		Number of pages to map.
- * @param flags		Flags for the new address space area.
+ * @param pf    Physical address of the starting frame.
+ * @param vp    Virtual address of the starting page.
+ * @param pages Number of pages to map.
+ * @param flags Flags for the new address space area.
  *
- * @return 		0 on success, EPERM if the caller lacks the
- *			CAP_MEM_MANAGER capability, ENOENT if there is no task
- *			with specified ID and ENOMEM if there was some problem
- *			in creating address space area.
+ * @return EOK on success
+ * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability
+ * @return ENOENT if there is no task with specified ID
+ * @return ENOMEM if there was some problem in creating
+ *         the address space area.
+ *
  */
-int physmem_map(void *pf, void *vp, unsigned long pages, int flags)
+int physmem_map(void *pf, void *vp, size_t pages, unsigned int flags)
 {
-	return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp, pages,
-	    flags);
+	return __SYSCALL4(SYS_PHYSMEM_MAP, (sysarg_t) pf, (sysarg_t) vp,
+	    pages, flags);
 }
 
Index: uspace/lib/c/include/ddi.h
===================================================================
--- uspace/lib/c/include/ddi.h	(revision 6b8e5b74427c3a66a192963cdac8b0ddbc45e451)
+++ uspace/lib/c/include/ddi.h	(revision 8f5b4d44b3c4c5a7695d3d4126e2b7cb52c4e459)
@@ -41,5 +41,5 @@
 
 extern int device_assign_devno(void);
-extern int physmem_map(void *, void *, unsigned long, int);
+extern int physmem_map(void *, void *, size_t, unsigned int);
 extern int iospace_enable(task_id_t, void *, unsigned long);
 extern int pio_enable(void *, size_t, void **);
