Index: uspace/srv/bd/ata_bd/ata_bd.c
===================================================================
--- uspace/srv/bd/ata_bd/ata_bd.c	(revision 86ffa27f45682aa2a5736f665f400ad262ce5baf)
+++ uspace/srv/bd/ata_bd/ata_bd.c	(revision b0f00a9ed1b00bda8a286a4c4bbe625a7f410bc6)
@@ -118,4 +118,6 @@
 static int ata_pcmd_inquiry(int dev_idx, void *obuf, size_t obuf_size);
 static int ata_pcmd_read_12(int dev_idx, uint64_t ba, size_t cnt,
+    void *obuf, size_t obuf_size);
+static int ata_pcmd_read_toc(int dev_idx, uint8_t ses,
     void *obuf, size_t obuf_size);
 static void disk_print_summary(disk_t *d);
@@ -353,4 +355,12 @@
 			    UPPER32(disk[disk_id].blocks));
 			continue;
+		case BD_READ_TOC:
+			cnt = IPC_GET_ARG1(call);
+			if (disk[disk_id].dev_type == ata_pkt_dev)
+				retval = ata_pcmd_read_toc(disk_id, cnt, fs_va,
+				    disk[disk_id].block_size);
+			else
+				retval = EINVAL;
+			break;
 		default:
 			retval = EINVAL;
@@ -810,4 +820,43 @@
 }
 
+/** Issue ATAPI read TOC command.
+ *
+ * Read TOC in 'multi-session' format (first and last session number
+ * with last session LBA).
+ *
+ * http://suif.stanford.edu/~csapuntz/specs/INF-8020.PDF page 171
+ *
+ * Output buffer must be large enough to hold the data, otherwise the
+ * function will fail.
+ *
+ * @param dev_idx	Device index (0 or 1)
+ * @param session	Starting session
+ * @param obuf		Buffer for storing inquiry data read from device
+ * @param obuf_size	Size of obuf in bytes
+ *
+ * @return EOK on success, EIO on error.
+ */
+static int ata_pcmd_read_toc(int dev_idx, uint8_t session, void *obuf,
+    size_t obuf_size)
+{
+	ata_pcmd_read_toc_t cp;
+	int rc;
+
+	memset(&cp, 0, sizeof(cp));
+
+	cp.opcode = PCMD_READ_TOC;
+	cp.msf = 0;
+	cp.format = 0x01; /* 0x01 = multi-session mode */
+	cp.start = session;
+	cp.size = host2uint16_t_be(obuf_size);
+	cp.oldformat = 0x40; /* 0x01 = multi-session mode (shifted to MSB) */
+	
+	rc = ata_cmd_packet(0, &cp, sizeof(cp), obuf, obuf_size);
+	if (rc != EOK)
+		return rc;
+	
+	return EOK;
+}
+
 /** Read a physical from the device.
  *
