Index: generic/include/ddi/ddi_arg.h
===================================================================
--- generic/include/ddi/ddi_arg.h	(revision 46fc2f9324ff6ec5e31b68cb451363c2e7a3c050)
+++ generic/include/ddi/ddi_arg.h	(revision 6212095a5f8f2d683b1a3e823a12400c54f8efbf)
@@ -36,5 +36,5 @@
 	void *virt_base;		/** Virtual address of starting page. */
 	unsigned long pages;		/** Number of pages to map. */
-	int writable;			/** True if the mapping should be writable. */
+	int flags;			/** Address space area flags for the mapping. */
 } ddi_memarg_t;
 
Index: generic/src/ddi/ddi.c
===================================================================
--- generic/src/ddi/ddi.c	(revision 46fc2f9324ff6ec5e31b68cb451363c2e7a3c050)
+++ generic/src/ddi/ddi.c	(revision 6212095a5f8f2d683b1a3e823a12400c54f8efbf)
@@ -54,5 +54,5 @@
  * @param vp Virtual page address of the starting page.
  * @param pages Number of pages to map.
- * @param writable If true, the mapping will be created writable.
+ * @param flags Address space area flags for the mapping.
  *
  * @return 0 on success, EPERM if the caller lacks capabilities to use this syscall,
@@ -60,10 +60,9 @@
  *	   there was a problem in creating address space area.
  */
-static int ddi_physmem_map(task_id_t id, __address pf, __address vp, count_t pages, bool writable)
+static int ddi_physmem_map(task_id_t id, __address pf, __address vp, count_t pages, int flags)
 {
 	ipl_t ipl;
 	cap_t caps;
 	task_t *t;
-	int flags;
 	mem_backend_data_t backend_data;
 
@@ -102,7 +101,4 @@
 	spinlock_unlock(&tasks_lock);
 	
-	flags = AS_AREA_READ;
-	if (writable)
-		flags |= AS_AREA_WRITE;
 	if (!as_area_create(t->as, flags, pages * PAGE_SIZE, vp, AS_AREA_ATTR_NONE,
 		&phys_backend, &backend_data)) {
@@ -196,5 +192,5 @@
 	return (__native) ddi_physmem_map((task_id_t) arg.task_id, ALIGN_DOWN((__address) arg.phys_base, FRAME_SIZE),
 					  ALIGN_DOWN((__address) arg.virt_base, PAGE_SIZE), (count_t) arg.pages,
-					  (bool) arg.writable);
+					  (int) arg.flags);
 }
 
