Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision d770deb686cbe3b24d8a1ef9c1e9aedb4003dbdc)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision e092dc56c3804f8365d83bc68eed5905e3340c2f)
@@ -71,4 +71,7 @@
 #define NAMESPACE  "bd"
 
+/** Number of defined legacy controller base addresses. */
+#define LEGACY_CTLS 4
+
 /** Physical block size. Should be always 512. */
 static const size_t block_size = 512;
@@ -78,7 +81,15 @@
 
 /** I/O base address of the command registers. */
-static uintptr_t cmd_physical = 0x1f0;
+static uintptr_t cmd_physical;
 /** I/O base address of the control registers. */
-static uintptr_t ctl_physical = 0x170;
+static uintptr_t ctl_physical;
+
+/** I/O base addresses for legacy (ISA-compatible) controllers. */
+static ata_base_t legacy_base[LEGACY_CTLS] = {
+	{ 0x1f0, 0x3f0 },
+	{ 0x170, 0x370 },
+	{ 0x1e8, 0x3e8 },
+	{ 0x168, 0x368 }
+};
 
 static ata_cmd_t *cmd;
@@ -88,4 +99,5 @@
 static disk_t disk[MAX_DISKS];
 
+static void print_syntax(void);
 static int ata_bd_init(void);
 static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall);
@@ -111,9 +123,25 @@
 	int i, rc;
 	int n_disks;
+	unsigned ctl_num;
+	char *eptr;
 
 	printf(NAME ": ATA disk driver\n");
 
-	printf("I/O address %p/%p\n", (void *) ctl_physical,
-	    (void *) cmd_physical);
+	if (argc > 1) {
+		ctl_num = strtoul(argv[1], &eptr, 0);
+		if (*eptr != '\0' || ctl_num == 0 || ctl_num > 4) {
+			printf("Invalid argument.\n");
+			print_syntax();
+			return -1;
+		}
+	} else {
+		ctl_num = 1;
+	}
+
+	cmd_physical = legacy_base[ctl_num - 1].cmd;
+	ctl_physical = legacy_base[ctl_num - 1].ctl;
+
+	printf("I/O address %p/%p\n", (void *) cmd_physical,
+	    (void *) ctl_physical);
 
 	if (ata_bd_init() != EOK)
@@ -140,5 +168,5 @@
 			continue;
 		
-		snprintf(name, 16, "%s/disk%d", NAMESPACE, i);
+		snprintf(name, 16, "%s/ata%udisk%d", NAMESPACE, ctl_num, i);
 		rc = devmap_device_register(name, &disk[i].devmap_handle);
 		if (rc != EOK) {
@@ -161,4 +189,11 @@
 	/* Not reached */
 	return 0;
+}
+
+
+static void print_syntax(void)
+{
+	printf("Syntax: " NAME " <controller_number>\n");
+	printf("Controller number = 1..4\n");
 }
 
Index: uspace/srv/bd/ata_bd/ata_bd.h
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.h	(revision d770deb686cbe3b24d8a1ef9c1e9aedb4003dbdc)
+++ uspace/srv/bd/ata_bd/ata_bd.h	(revision e092dc56c3804f8365d83bc68eed5905e3340c2f)
@@ -39,4 +39,10 @@
 #include <fibril_synch.h>
 #include <str.h>
+
+/** Base addresses for ATA I/O blocks. */
+typedef struct {
+	uintptr_t cmd;	/**< Command block base address. */
+	uintptr_t ctl;	/**< Control block base address. */
+} ata_base_t;
 
 /** Timeout definitions. Unit is 10 ms. */
@@ -81,4 +87,5 @@
 } block_coord_t;
 
+/** ATA device state structure. */
 typedef struct {
 	bool present;
