All of lore.kernel.org
 help / color / mirror / Atom feed
From: linas@austin.ibm.com
To: paulus@au1.ibm.com, paulus@samba.org
Cc: linuxppc64-dev@lists.linuxppc.org, linux-kernel@vger.kernel.org
Subject: [PATCH] [2.6] PPC64: log firmware errors during boot.
Date: Tue, 29 Jun 2004 19:10:46 -0500	[thread overview]
Message-ID: <20040629191046.Q21634@forte.austin.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 846 bytes --]


Paul,

Here's the fourth patch ... please apply.

Firmware can report errors at any time, and not atypically during boot.
However, these reports were being discarded until th rtasd comes up,
which occurs fairly late in the boot cycle.  As a result, firmware
errors during boot were being silently ignored. 

This patch at least gets them printk'ed so that at least they show 
up in boot.msg/syslog.  There are two other logging mechanisms,
nvram and rtas, that I didn't touch because I don't understand 
the reprecussions.  In particular, nvram logging isn't enabled
until late in the boot ... but what's the point of nvram logging
if not to catch messages that occured very early in boot ?? 

Please apply the patch, and discussion welcome on how nvram
logging works/should work ... 

Signed-off-by: Linas Vepstas <linas@linas.org>

--linas




[-- Attachment #2: rtas-log-boot-msgs.patch --]
[-- Type: text/plain, Size: 1421 bytes --]

--- arch/ppc64/kernel/rtasd.c.orig	2004-06-28 15:33:12.000000000 -0500
+++ arch/ppc64/kernel/rtasd.c	2004-06-29 18:51:31.000000000 -0500
@@ -57,6 +57,8 @@ volatile int error_log_cnt = 0;
  */
 static unsigned char logdata[RTAS_ERROR_LOG_MAX];
 
+static int get_eventscan_parms(void);
+		  
 /* To see this info, grep RTAS /var/log/messages and each entry
  * will be collected together with obvious begin/end.
  * There will be a unique identifier on the begin and end lines.
@@ -121,6 +123,9 @@ static int log_rtas_len(char * buf)
 		len += err->extended_log_length;
 	}
 
+	if (rtas_error_log_max == 0) {
+		get_eventscan_parms();
+	}
 	if (len > rtas_error_log_max)
 		len = rtas_error_log_max;
 
@@ -148,7 +153,6 @@ void pSeries_log_error(char *buf, unsign
 	int len = 0;
 
 	DEBUG("logging event\n");
-
 	if (buf == NULL)
 		return;
 
@@ -171,6 +175,13 @@ void pSeries_log_error(char *buf, unsign
 	if (!no_more_logging && !(err_type & ERR_FLAG_BOOT))
 		nvram_write_error_log(buf, len, err_type);
 
+	/* rtas errors can occur during boot, and we do want to capture
+	 * those somewhere, even if nvram isn't ready (why not?), and even 
+	 * if rtasd isn't ready. Put them into the boot log, at least.  */
+	if ((err_type & ERR_TYPE_MASK) == ERR_TYPE_RTAS_LOG) {
+		printk_log_rtas(buf, len);
+	}
+	
 	/* Check to see if we need to or have stopped logging */
 	if (fatal || no_more_logging) {
 		no_more_logging = 1;

             reply	other threads:[~2004-06-30  0:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-30  0:10 linas [this message]
2004-06-30 10:55 ` [PATCH] [2.6] PPC64: log firmware errors during boot Paul Mackerras
2004-07-01 21:06   ` linas
2004-07-02  5:36     ` Greg KH
2004-07-02 10:44     ` Paul Mackerras
2004-07-02 14:15       ` Hollis Blanchard
2004-07-02 16:18         ` Nathan Fontenot
2004-07-02 17:29           ` Hollis Blanchard
2004-07-02 18:13             ` linas
2004-07-02 18:27               ` Greg KH
2004-07-02 18:55                 ` Dave Hansen
2004-07-02 19:44                   ` Greg KH
2004-07-06 13:24             ` Jake Moilanen
2004-07-06 13:41   ` Jake Moilanen
2004-07-08 16:03     ` linas
2004-07-08 17:55       ` Jake Moilanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040629191046.Q21634@forte.austin.ibm.com \
    --to=linas@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc64-dev@lists.linuxppc.org \
    --cc=paulus@au1.ibm.com \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.