aboutsummaryrefslogtreecommitdiffstats
path: root/flash.h
diff options
context:
space:
mode:
authorMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-01-20 14:14:11 +0000
committerMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>2010-01-20 14:14:11 +0000
commit6701ee833c31ab5152757ac1366a41bf103dc342 (patch)
treeb33e9eda381e265189c43ab65e24ca6c62da11e5 /flash.h
parent012a31e201de4eac7635753aefda1067642516eb (diff)
downloadflashrom-6701ee833c31ab5152757ac1366a41bf103dc342.tar.gz
flashrom-6701ee833c31ab5152757ac1366a41bf103dc342.tar.bz2
flashrom-6701ee833c31ab5152757ac1366a41bf103dc342.zip
Matching board via DMI
If a board is not uniquely identifiable by PCI device/subsystem IDs, a string can be specified to be looked for (case-sensitive, substring or anchored) for now in one of the following DMI items in addition to matching the PCI IDs: - System Manufacturer - System Product Name - System Version - Baseboard Manufacturer - Baseboard Product Name - Baseboard Version Strings are anchored re-like (^ at the beginning, $ at the end), but there are no plans to support full regular expressions and matched to any of the mentioned fields. The match is only made if DMI info is available and the string matches. If no DMI info is available and the PCI IDs match, a warning is printed as the board can not be autodetected. It's still open to discussion whether we add an DMI override switch to specify a string that will definitely match, and whether this switch is only used if no DMI is available or whether it overrides or augments DMI data. DMI data is currently read using dmidecode. This tool is available for all major platforms except MacOS X. I heard that there also is a MacOS X version of dmidecode, but didn't investigate that. Corresponding to flashrom svn r874. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Luc Verhaegen <libv@skynet.be> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'flash.h')
-rw-r--r--flash.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/flash.h b/flash.h
index 65fa685e..308e19bd 100644
--- a/flash.h
+++ b/flash.h
@@ -265,6 +265,9 @@ struct board_pciid_enable {
uint16_t second_card_vendor;
uint16_t second_card_device;
+ /* Pattern to match DMI entries */
+ const char *dmi_pattern;
+
/* The vendor / part name from the coreboot table. */
const char *lb_vendor;
const char *lb_part;
@@ -343,6 +346,11 @@ int coreboot_init(void);
extern char *lb_part, *lb_vendor;
extern int partvendor_from_cbtable;
+/* dmi.c */
+extern int has_dmi_support;
+void dmi_init(void);
+int dmi_match(const char *pattern);
+
/* internal.c */
#if NEED_PCI == 1
struct superio {