Index: uspace/drv/bus/adb/cuda_adb/cuda_adb.c
===================================================================
--- uspace/drv/bus/adb/cuda_adb/cuda_adb.c	(revision e27e36e1fb9699de71e9900d126082ea33f88bc2)
+++ uspace/drv/bus/adb/cuda_adb/cuda_adb.c	(revision c188c62aa2ffa4dc0f6451547f7cdb1966d6eb8d)
@@ -148,5 +148,5 @@
 }
 
-int cuda_add(cuda_t *cuda)
+int cuda_add(cuda_t *cuda, cuda_res_t *res)
 {
 	adb_dev_t *kbd = NULL;
@@ -154,4 +154,6 @@
 	int rc;
 
+	cuda->phys_base = res->base;
+
 	rc = cuda_dev_create(cuda, "kbd", &kbd);
 	if (rc != EOK)
@@ -166,5 +168,4 @@
 
 	cuda->addr_dev[9] = mouse;
-
 
 	rc = cuda_init(cuda);
@@ -225,9 +226,6 @@
 	int rc;
 
-	if (sysinfo_get_value("cuda.address.physical", &(cuda->cuda_physical)) != EOK)
-		return EIO;
-
 	void *vaddr;
-	rc = pio_enable((void *) cuda->cuda_physical, sizeof(cuda_regs_t),
+	rc = pio_enable((void *) cuda->phys_base, sizeof(cuda_regs_t),
 	    &vaddr);
 	if (rc != EOK)
@@ -244,7 +242,7 @@
 	pio_write_8(&cuda->regs->ier, IER_CLR | ALL_INT);
 
-	cuda_irq_code.ranges[0].base = (uintptr_t) cuda->cuda_physical;
+	cuda_irq_code.ranges[0].base = (uintptr_t) cuda->phys_base;
 	cuda_irq_code.cmds[0].addr = (void *) &((cuda_regs_t *)
-	    cuda->cuda_physical)->ifr;
+	    cuda->phys_base)->ifr;
 	async_irq_subscribe(10, cuda_irq_handler, cuda, &cuda_irq_code);
 
Index: uspace/drv/bus/adb/cuda_adb/cuda_adb.h
===================================================================
--- uspace/drv/bus/adb/cuda_adb/cuda_adb.h	(revision e27e36e1fb9699de71e9900d126082ea33f88bc2)
+++ uspace/drv/bus/adb/cuda_adb/cuda_adb.h	(revision c188c62aa2ffa4dc0f6451547f7cdb1966d6eb8d)
@@ -57,4 +57,9 @@
 };
 
+typedef struct {
+	uintptr_t base;
+	int irq;
+} cuda_res_t;
+
 /** ADB bus device */
 typedef struct {
@@ -68,5 +73,5 @@
 typedef struct cude {
 	struct cuda_regs *regs;
-	uintptr_t cuda_physical;
+	uintptr_t phys_base;
 	ddf_dev_t *dev;
 
@@ -82,5 +87,5 @@
 } cuda_t;
 
-extern int cuda_add(cuda_t *);
+extern int cuda_add(cuda_t *, cuda_res_t *);
 extern int cuda_remove(cuda_t *);
 extern int cuda_gone(cuda_t *);
Index: uspace/drv/bus/adb/cuda_adb/main.c
===================================================================
--- uspace/drv/bus/adb/cuda_adb/main.c	(revision e27e36e1fb9699de71e9900d126082ea33f88bc2)
+++ uspace/drv/bus/adb/cuda_adb/main.c	(revision c188c62aa2ffa4dc0f6451547f7cdb1966d6eb8d)
@@ -35,4 +35,5 @@
 #include <ddf/driver.h>
 #include <ddf/log.h>
+#include <device/hw_res_parsed.h>
 #include <errno.h>
 #include <stdio.h>
@@ -61,9 +62,45 @@
 };
 
+static int cuda_get_res(ddf_dev_t *dev, cuda_res_t *res)
+{
+	async_sess_t *parent_sess;
+	hw_res_list_parsed_t hw_res;
+	int rc;
+
+	parent_sess = ddf_dev_parent_sess_create(dev);
+	if (parent_sess == NULL)
+		return ENOMEM;
+
+	hw_res_list_parsed_init(&hw_res);
+	rc = hw_res_get_list_parsed(parent_sess, &hw_res, 0);
+	if (rc != EOK)
+		return rc;
+
+	if (hw_res.io_ranges.count != 1) {
+		rc = EINVAL;
+		goto error;
+	}
+
+	res->base = RNGABS(hw_res.io_ranges.ranges[0]);
+
+	if (hw_res.irqs.count != 1) {
+		rc = EINVAL;
+		goto error;
+	}
+
+	res->irq = hw_res.irqs.irqs[0];
+
+	return EOK;
+error:
+	hw_res_list_parsed_clean(&hw_res);
+	return rc;
+}
+
 static int cuda_dev_add(ddf_dev_t *dev)
 {
 	cuda_t *cuda;
+	cuda_res_t cuda_res;
+	int rc;
 
-	printf("cuda_dev_add\n");
         ddf_msg(LVL_DEBUG, "cuda_dev_add(%p)", dev);
 	cuda = ddf_dev_data_alloc(dev, sizeof(cuda_t));
@@ -75,8 +112,12 @@
 	cuda->dev = dev;
 	list_initialize(&cuda->devs);
-	printf("call cuda_add\n");
-        int rc = cuda_add(cuda);
-        printf("cuda_add->%d\n", rc);
-        return rc;
+
+	rc = cuda_get_res(dev, &cuda_res);
+	if (rc != EOK) {
+		ddf_msg(LVL_ERROR, "Failed getting hardware resource list.\n");
+		return EIO;
+	}
+
+	return cuda_add(cuda, &cuda_res);
 }
 
Index: uspace/drv/platform/mac/mac.c
===================================================================
--- uspace/drv/platform/mac/mac.c	(revision e27e36e1fb9699de71e9900d126082ea33f88bc2)
+++ uspace/drv/platform/mac/mac.c	(revision c188c62aa2ffa4dc0f6451547f7cdb1966d6eb8d)
@@ -1,4 +1,5 @@
 /*
  * Copyright (c) 2011 Martin Decky
+ * Copyright (c) 2017 Jiri Svoboda
  * All rights reserved.
  *
@@ -40,4 +41,5 @@
 #include <errno.h>
 #include <ops/hw_res.h>
+#include <ops/pio_window.h>
 #include <stdio.h>
 #include <sysinfo.h>
@@ -47,7 +49,8 @@
 typedef struct {
 	hw_resource_list_t hw_resources;
+	pio_window_t pio_window;
 } mac_fun_t;
 
-static hw_resource_t adb_regs[] = {
+static hw_resource_t adb_res[] = {
 	{
 		.type = IO_RANGE,
@@ -55,6 +58,12 @@
 			.address = 0,
 			.size = 0x2000,
-			.relative = false,
+			.relative = true,
 			.endianness = BIG_ENDIAN
+		}
+	},
+	{
+		.type = INTERRUPT,
+		.res.interrupt = {
+			.irq = 0 /* patched at run time */
 		}
 	},
@@ -63,6 +72,12 @@
 static mac_fun_t adb_data = {
 	.hw_resources = {
-		1,
-		adb_regs
+		sizeof(adb_res) / sizeof(adb_res[0]),
+		adb_res
+	},
+	.pio_window = {
+		.io = {
+			.base = 0, /* patched at run time */
+			.size = 0x2000
+		}
 	}
 };
@@ -99,7 +114,13 @@
 
 /** Obtain function soft-state from DDF function node */
-static mac_fun_t *mac_fun(ddf_fun_t *fnode)
-{
-	return ddf_fun_data_get(fnode);
+static mac_fun_t *mac_fun(ddf_fun_t *ddf_fun)
+{
+	return ddf_fun_data_get(ddf_fun);
+}
+
+static pio_window_t *mac_get_pio_window(ddf_fun_t *ddf_fun)
+{
+	mac_fun_t *fun = mac_fun(ddf_fun);
+	return &fun->pio_window;
 }
 
@@ -159,4 +180,5 @@
 	int rc;
 	uintptr_t cuda_physical;
+	sysarg_t cuda_inr;
 #if 0
 	/* Register functions */
@@ -171,6 +193,10 @@
 	if (rc != EOK)
 		return EIO;
-
-	adb_regs[0].res.io_range.address = cuda_physical;
+	rc = sysinfo_get_value("cuda.inr", &cuda_inr);
+	if (rc != EOK)
+		return EIO;
+
+	adb_data.pio_window.io.base = cuda_physical;
+	adb_res[1].res.interrupt.irq = cuda_inr;
 
 	if (!mac_add_fun(dev, "adb", "cuda_adb", &adb_data)) {
@@ -208,4 +234,8 @@
 }
 
+static pio_window_ops_t fun_pio_window_ops = {
+        .get_pio_window = &mac_get_pio_window
+};
+
 static hw_res_ops_t fun_hw_res_ops = {
    	.get_resource_list = &mac_get_resources,
@@ -218,4 +248,5 @@
 	ddf_log_init(NAME);
 	mac_fun_ops.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops;
+	mac_fun_ops.interfaces[PIO_WINDOW_DEV_IFACE] = &fun_pio_window_ops;
 	return ddf_driver_main(&mac_driver);
 }
