Commit 8881cdce authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Linus Torvalds

dmi: log board, system, and BIOS information

Put basic system information in the dmesg log.  There are lots of dmesg
logs on the web, and it would be useful if they contained this information
for debugging platform problems.  "BOARD/PRODUCT" format copied from
show_regs_common(), which is used in the oops path.
Signed-off-by: default avatarBjorn Helgaas <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: "H. Peter Anvin" <>
Cc: Alan Cox <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent d31eb519
......@@ -2,6 +2,7 @@
#include <linux/string.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ctype.h>
#include <linux/dmi.h>
#include <linux/efi.h>
#include <linux/bootmem.h>
......@@ -361,6 +362,33 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)
static void __init print_filtered(const char *info)
const char *p;
if (!info)
for (p = info; *p; p++)
if (isprint(*p))
printk(KERN_CONT "%c", *p);
printk(KERN_CONT "\\x%02x", *p & 0xff);
static void __init dmi_dump_ids(void)
printk(KERN_DEBUG "DMI: ");
printk(KERN_CONT "/");
printk(KERN_CONT ", BIOS ");
printk(KERN_CONT " ");
printk(KERN_CONT "\n");
static int __init dmi_present(const char __iomem *p)
u8 buf[15];
......@@ -381,8 +409,10 @@ static int __init dmi_present(const char __iomem *p)
buf[14] >> 4, buf[14] & 0xF);
printk(KERN_INFO "DMI present.\n");
if (dmi_walk_early(dmi_decode) == 0)
if (dmi_walk_early(dmi_decode) == 0) {
return 0;
return 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment