diff --git a/board_enable.c b/board_enable.c
index 2cf677625e15eff11c3170de454a46b209564b35..2efc710f0e713d51975523245f9d145aaafc5fea 100644
--- a/board_enable.c
+++ b/board_enable.c
@@ -2463,6 +2463,36 @@ const struct board_match board_matches[] = {
 	{     0,      0,      0,      0,       0,      0,      0,      0, NULL,         NULL, NULL,           P3, NULL,          NULL,                    0,   NT, NULL}, /* end marker */
 };
 
+int selfcheck_board_enables(void)
+{
+	if (board_matches[ARRAY_SIZE(board_matches) - 1].vendor_name != NULL) {
+		msg_gerr("Board enables table miscompilation!\n");
+		return 1;
+	}
+
+	int ret = 0;
+	unsigned int i;
+	for (i = 0; i < ARRAY_SIZE(board_matches) - 1; i++) {
+		const struct board_match *b = &board_matches[i];
+		if (b->vendor_name == NULL || b->board_name == NULL) {
+			msg_gerr("ERROR: Board enable #%d does not define a vendor and board name.\n"
+				 "Please report a bug at flashrom@flashrom.org\n", i);
+			ret = 1;
+			continue;
+		}
+		if ((b->first_vendor == 0 || b->first_device == 0 ||
+		     b->second_vendor == 0 || b->second_device == 0) ||
+		    ((b->lb_vendor == NULL) ^ (b->lb_part == NULL)) ||
+		    (b->max_rom_decode_parallel == 0 && b->enable == NULL)) {
+			msg_gerr("ERROR: Board enable for %s %s is misdefined.\n"
+				 "Please report a bug at flashrom@flashrom.org\n",
+				 b->vendor_name, b->board_name);
+			ret = 1;
+		}
+	}
+	return ret;
+}
+
 /* Parse the <vendor>:<board> string specified by the user as part of -p internal:mainboard=<vendor>:<board>.
  * Parameters vendor and model will be overwritten. Returns 0 on success.
  * Note: strtok modifies the original string, so we work on a copy and allocate memory for the results.
diff --git a/flashrom.c b/flashrom.c
index c9e0d016f4baf3183300044a4f79993715997c17..8e5d36393367aaaffae7362cdb1986c72b0cbdca 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -1758,6 +1758,10 @@ int selfcheck(void)
 		}
 	}
 
+#if CONFIG_INTERNAL == 1
+	ret |= selfcheck_board_enables();
+#endif
+
 	/* TODO: implement similar sanity checks for other arrays where deemed necessary. */
 	return ret;
 }
diff --git a/programmer.h b/programmer.h
index d29965629498c316d588d11e90e1bee3f6571288..b0df2ba7fdb5552fa3c111ee92053566d7f4a3a6 100644
--- a/programmer.h
+++ b/programmer.h
@@ -260,6 +260,7 @@ void internal_delay(unsigned int usecs);
 
 #if CONFIG_INTERNAL == 1
 /* board_enable.c */
+int selfcheck_board_enables(void);
 int board_parse_parameter(const char *boardstring, const char **vendor, const char **model);
 void w836xx_ext_enter(uint16_t port);
 void w836xx_ext_leave(uint16_t port);