diff --git a/libflashrom.c b/libflashrom.c
index af62002..dbc5129 100644
--- a/libflashrom.c
+++ b/libflashrom.c
@@ -104,7 +104,142 @@
  * @{
  */
 
-/* TBD */
+/**
+ * @brief Returns flashrom version
+ * @return flashrom version
+ */
+const char *flashrom_version_info(void)
+{
+	return flashrom_version;
+}
+
+/**
+ * @brief Returns list of supported programmers
+ * @return List of supported programmers, or NULL if an error occurred
+ */
+const char **flashrom_supported_programmers(void)
+{
+	enum programmer p = 0;
+	const char **supported_programmers = malloc((PROGRAMMER_INVALID + 1) * sizeof(char*));
+
+	if (supported_programmers != NULL) {
+		for (; p < PROGRAMMER_INVALID; ++p) {
+			supported_programmers[p] = programmer_table[p].name;
+		}
+	} else {
+		msg_gerr("Memory allocation error!\n");
+	}
+
+	return supported_programmers;
+}
+
+/**
+ * @brief Returns list of supported flash chips
+ * @return List of supported flash chips, or NULL if an error occurred
+ */
+struct flashrom_flashchip_info *flashrom_supported_flash_chips(void)
+{
+	int i = 0;
+	struct flashrom_flashchip_info *supported_flashchips =
+		malloc(flashchips_size * sizeof(*supported_flashchips));
+
+	if (supported_flashchips != NULL) {
+		for (; i < flashchips_size; ++i) {
+			supported_flashchips[i].vendor = flashchips[i].vendor;
+			supported_flashchips[i].name = flashchips[i].name;
+			supported_flashchips[i].tested.erase =
+				(enum flashrom_test_state)flashchips[i].tested.erase;
+			supported_flashchips[i].tested.probe =
+				(enum flashrom_test_state)flashchips[i].tested.probe;
+			supported_flashchips[i].tested.read =
+				(enum flashrom_test_state)flashchips[i].tested.read;
+			supported_flashchips[i].tested.write =
+				(enum flashrom_test_state)flashchips[i].tested.write;
+			supported_flashchips[i].total_size = flashchips[i].total_size;
+		}
+	} else {
+		msg_gerr("Memory allocation error!\n");
+	}
+
+	return supported_flashchips;
+}
+
+/**
+ * @brief Returns list of supported mainboards
+ * @return List of supported mainboards, or NULL if an error occurred
+ */
+struct flashrom_board_info *flashrom_supported_boards(void)
+{
+	int boards_known_size = 0;
+	int i = 0;
+	const struct board_info *binfo = boards_known;
+
+	while ((binfo++)->vendor)
+		++boards_known_size;
+	binfo = boards_known;
+	/* add place for {0} */
+	++boards_known_size;
+
+	struct flashrom_board_info *supported_boards =
+		malloc(boards_known_size * sizeof(*binfo));
+
+	if (supported_boards != NULL) {
+		for (; i < boards_known_size; ++i) {
+			supported_boards[i].vendor = binfo[i].vendor;
+			supported_boards[i].name = binfo[i].name;
+			supported_boards[i].working = binfo[i].working;
+		}
+	} else {
+		msg_gerr("Memory allocation error!\n");
+	}
+
+	return supported_boards;
+}
+
+/**
+ * @brief Returns list of supported chipsets
+ * @return List of supported chipsets, or NULL if an error occurred
+ */
+struct flashrom_chipset_info *flashrom_supported_chipsets(void)
+{
+	int chipset_enables_size = 0;
+	int i = 0;
+	const struct penable *chipset = chipset_enables;
+
+	while ((chipset++)->vendor_name)
+		++chipset_enables_size;
+	chipset = chipset_enables;
+	/* add place for {0}*/
+	++chipset_enables_size;
+
+	struct flashrom_chipset_info *supported_chipsets =
+		malloc(chipset_enables_size * sizeof(*supported_chipsets));
+
+	if (supported_chipsets != NULL) {
+		for (; i < chipset_enables_size; ++i) {
+			supported_chipsets[i].vendor = chipset[i].vendor_name;
+			supported_chipsets[i].chipset = chipset[i].device_name;
+			supported_chipsets[i].vendor_id = chipset[i].vendor_id;
+			supported_chipsets[i].chipset_id = chipset[i].device_id;
+			supported_chipsets[i].status = chipset[i].status;
+	  }
+	} else {
+		msg_gerr("Memory allocation error!\n");
+	}
+
+	return supported_chipsets;
+}
+
+/**
+ * @brief Frees memory allocated by libflashrom API
+ * @param Pointer to block of memory which should be freed
+ * @return 0 on success
+ */
+int flashrom_data_free(void *const p)
+{
+	free(p);
+	return 0;
+}
 
 /** @} */ /* end flashrom-query */
 
diff --git a/libflashrom.h b/libflashrom.h
index 38c95d2..a0da6df 100644
--- a/libflashrom.h
+++ b/libflashrom.h
@@ -37,6 +37,50 @@
 typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format, va_list);
 void flashrom_set_log_callback(flashrom_log_callback *);
 
+/** @ingroup flashrom-query */
+enum flashrom_test_state {
+	FLASHROM_TESTED_OK  = 0,
+	FLASHROM_TESTED_NT  = 1,
+	FLASHROM_TESTED_BAD = 2,
+	FLASHROM_TESTED_DEP = 3,
+	FLASHROM_TESTED_NA  = 4,
+};
+
+struct flashrom_flashchip_info {
+	const char *vendor;
+	const char *name;
+	unsigned int total_size;
+	struct flashrom_tested {
+		enum flashrom_test_state probe;
+		enum flashrom_test_state read;
+		enum flashrom_test_state erase;
+		enum flashrom_test_state write;
+	} tested;
+};
+
+struct flashrom_board_info {
+	const char *vendor;
+	const char *name;
+	enum flashrom_test_state working;
+};
+
+struct flashrom_chipset_info {
+	const char *vendor;
+	const char *chipset;
+	uint16_t vendor_id;
+	uint16_t chipset_id;
+	enum flashrom_test_state status;
+};
+
+const char *flashrom_version_info(void);
+void flashrom_system_info(void);
+const char **flashrom_supported_programmers(void);
+struct flashrom_flashchip_info *flashrom_supported_flash_chips(void);
+struct flashrom_board_info *flashrom_supported_boards(void);
+struct flashrom_chipset_info *flashrom_supported_chipsets(void);
+int flashrom_data_free(void *const p);
+
+/** @ingroup flashrom-prog */
 struct flashrom_programmer;
 int flashrom_programmer_init(struct flashrom_programmer **, const char *prog_name, const char *prog_params);
 int flashrom_programmer_shutdown(struct flashrom_programmer *);
diff --git a/libflashrom.map b/libflashrom.map
index 3c287ff..d6dd24d 100644
--- a/libflashrom.map
+++ b/libflashrom.map
@@ -1,7 +1,11 @@
 LIBFLASHROM_1.0 {
   global:
+    flashrom_board_info;
+    flashrom_chipset_info;
+    flashrom_data_free;
     flashrom_flag_get;
     flashrom_flag_set;
+    flashrom_flashchip_info;
     flashrom_flash_erase;
     flashrom_flash_getsize;
     flashrom_flash_probe;
@@ -20,5 +24,8 @@
     flashrom_programmer_shutdown;
     flashrom_set_log_callback;
     flashrom_shutdown;
+    flashrom_supported_programmers;
+    flashrom_system_info;
+    flashrom_version_info;
   local: *;
 };
