public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] DMI: log system, BIOS, and board information
@ 2010-09-29 18:24 Bjorn Helgaas
  2010-09-29 21:26 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2010-09-29 18:24 UTC (permalink / raw)
  To: Andrew Morton; +Cc: x86, linux-kernel


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.

DMI often doesn't supply a board name, but I assume the others are pretty
standard.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---

 drivers/firmware/dmi_scan.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)


diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index b3d22d6..ea6719f 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -364,6 +364,7 @@ static void __init dmi_decode(const struct dmi_header *dm, void *dummy)
 static int __init dmi_present(const char __iomem *p)
 {
 	u8 buf[15];
+	const char *board, *label = " board ";
 
 	memcpy_fromio(buf, p, 15);
 	if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) {
@@ -381,8 +382,20 @@ static int __init dmi_present(const char __iomem *p)
 			       buf[14] >> 4, buf[14] & 0xF);
 		else
 			printk(KERN_INFO "DMI present.\n");
-		if (dmi_walk_early(dmi_decode) == 0)
+		if (dmi_walk_early(dmi_decode) == 0) {
+			board = dmi_get_system_info(DMI_BOARD_NAME);
+			if (!board) {
+				board = "";
+				label = "";
+			}
+			printk(KERN_DEBUG "DMI: %s %s BIOS %s %s%s%s\n",
+			       dmi_get_system_info(DMI_SYS_VENDOR),
+			       dmi_get_system_info(DMI_PRODUCT_NAME),
+			       dmi_get_system_info(DMI_BIOS_VERSION),
+			       dmi_get_system_info(DMI_BIOS_DATE),
+			       label, board);
 			return 0;
+		}
 	}
 	return 1;
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] DMI: log system, BIOS, and board information
  2010-09-29 18:24 [PATCH] DMI: log system, BIOS, and board information Bjorn Helgaas
@ 2010-09-29 21:26 ` Alan Cox
  2010-09-29 21:35   ` Bjorn Helgaas
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Cox @ 2010-09-29 21:26 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: Andrew Morton, x86, linux-kernel

On Wed, 29 Sep 2010 12:24:02 -0600
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:

> 
> 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.
> 
> DMI often doesn't supply a board name, but I assume the others are pretty
> standard.

You need to filter the characters before printing them in the log. Some
platforms contain binary garbage.

So NAK.

It's also the wrong thing in most cases because the key data is in sysfs
so your bug capturing tool can collect it.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] DMI: log system, BIOS, and board information
  2010-09-29 21:26 ` Alan Cox
@ 2010-09-29 21:35   ` Bjorn Helgaas
  0 siblings, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2010-09-29 21:35 UTC (permalink / raw)
  To: Alan Cox; +Cc: Andrew Morton, x86, linux-kernel

On Wednesday, September 29, 2010 03:26:23 pm Alan Cox wrote:
> On Wed, 29 Sep 2010 12:24:02 -0600
> Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> > 
> > 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.
> > 
> > DMI often doesn't supply a board name, but I assume the others are pretty
> > standard.
> 
> You need to filter the characters before printing them in the log. Some
> platforms contain binary garbage.

Oh, good point.  Filtering sounds feasible in concept, at least.

> It's also the wrong thing in most cases because the key data is in sysfs
> so your bug capturing tool can collect it.

Sure, there's no question that this information and a lot more is
easily available elsewhere.

Most of the bug reports I see are not generated by bug capturing
tools; they're generated by Joe User posting a dmesg log.  For many
platform issues, it would be quite useful if that log already contained
a hint about what platform it is.  The collection of dmesg logs on
the web + Google indexing + a platform ID would be a great help in
locating similar failures and contacting testers.

Bjorn

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-29 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 18:24 [PATCH] DMI: log system, BIOS, and board information Bjorn Helgaas
2010-09-29 21:26 ` Alan Cox
2010-09-29 21:35   ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox