aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiang, Chao <chao.jiang@intel.com>2010-12-08 10:57:18 +0000
committerAlan Cox <alan@linux.intel.com>2010-12-08 10:57:18 +0000
commit492e907a449c0c7a6be309297d03116f7af5d50e (patch)
treef79744a6759edd41ab44ac87b309add36b3856c9
parent0bdf443432c04afa0738971016b785407b980ad2 (diff)
downloadmrst-s0i3-test-492e907a449c0c7a6be309297d03116f7af5d50e.tar.gz
mrst-s0i3-test-492e907a449c0c7a6be309297d03116f7af5d50e.tar.xz
mrst-s0i3-test-492e907a449c0c7a6be309297d03116f7af5d50e.zip
commit ca5b841302468ce8e03686f5799a9fb1c4e2cd13
support to overwrite DMI board info support to overwrite board vendor/version/name information by editing /boot/cmdline file. Format example: board_vendor="XXX company" board_version=DV3.0 Signed-off-by: Jiang, Chao <chao.jiang@intel.com> [Added Documentation as requested] Signed-off-by: Alan Cox <alan@linux.intel.com>
-rw-r--r--Documentation/kernel-parameters.txt20
-rw-r--r--drivers/firmware/dmi_scan.c37
2 files changed, 55 insertions, 2 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index cdd2a6e8a3b..3634e57b4f8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -43,11 +43,12 @@ parameter is applicable:
AVR32 AVR32 architecture is enabled.
AX25 Appropriate AX.25 support is enabled.
BLACKFIN Blackfin architecture is enabled.
+ DMI Desktop Management Interface is enabled
+ DRM Direct Rendering Management support is enabled.
+ DYNAMIC_DEBUG Build in debug messages and enable them at runtime
EDD BIOS Enhanced Disk Drive Services (EDD) is enabled
EFI EFI Partitioning (GPT) is enabled
EIDE EIDE/ATAPI support is enabled.
- DRM Direct Rendering Management support is enabled.
- DYNAMIC_DEBUG Build in debug messages and enable them at runtime
FB The frame buffer device is enabled.
GCOV GCOV profiling is enabled.
HW Appropriate hardware is enabled.
@@ -390,6 +391,21 @@ and is between 256 and 4096 characters. It is defined in the file
Format: <io>,<irq>,<mode>
See header of drivers/net/hamradio/baycom_ser_hdx.c.
+ board_name= [DMI]
+ Override reported name in firmware DMI data. Used
+ for testing and for checking board specific
+ workarounds
+
+ board_vendor= [DMI]
+ Override reported vendor in firmware DMI data. Used
+ for testing and for checking board specific
+ workarounds
+
+ board_version= [DMI]
+ Override reported version in firmware DMI data. Used
+ for testing and for checking board specific
+ workarounds
+
boot_delay= Milliseconds to delay each printk during boot.
Values larger than 10 seconds (10000) are changed to
no delay (0).
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index e28e4166817..c1d20841047 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -742,3 +742,40 @@ bool dmi_match(enum dmi_field f, const char *str)
return !strcmp(info, str);
}
EXPORT_SYMBOL_GPL(dmi_match);
+
+static int __init dmi_override(int slot, char *str)
+{
+ size_t len;
+ char *p;
+ if (!str)
+ return -EINVAL;
+ len = strlen(str) + 1;
+ p = dmi_alloc(len);
+ if (p != NULL)
+ strcpy(p, str);
+ else {
+ printk(KERN_ERR "dm_override: cannot allocate %Zu bytes.\n",
+ len);
+ return -ENOMEM;
+ }
+ dmi_ident[slot] = p;
+ return 0;
+}
+
+static int __init override_dmi_board_vendor(char *str)
+{
+ return dmi_override(DMI_BOARD_VENDOR, str);
+}
+early_param("board_vendor", override_dmi_board_vendor);
+
+static int __init override_dmi_board_version(char *str)
+{
+ return dmi_override(DMI_BOARD_VERSION, str);
+}
+early_param("board_version", override_dmi_board_version);
+
+static int __init override_dmi_board_name(char *str)
+{
+ return dmi_override(DMI_BOARD_NAME, str);
+}
+early_param("board_name", override_dmi_board_name);