WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Machine check now inspects

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][POWERPC] Machine check now inspects the SCOM for more information
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 13 Dec 2006 17:34:17 +0000
Delivery-date: Wed, 13 Dec 2006 09:34:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 7f3ae39112cd5fb662621d7d6e7a43e39ecb335a
# Parent  95cead06e4abd4b81c995ce4a70273b74eff929b
[XEN][POWERPC] Machine check now inspects the SCOM for more information
Also fixes suggested by <segher@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/powerpc64/ppc970_machinecheck.c |    7 +++
 xen/arch/powerpc/powerpc64/ppc970_scom.c         |   41 ++++++++++-------------
 2 files changed, 25 insertions(+), 23 deletions(-)

diff -r 95cead06e4ab -r 7f3ae39112cd 
xen/arch/powerpc/powerpc64/ppc970_machinecheck.c
--- a/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c  Thu Sep 21 13:48:24 
2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c  Fri Sep 22 11:02:47 
2006 -0400
@@ -24,6 +24,8 @@
 #include <public/xen.h>
 #include <asm/processor.h>
 #include <asm/percpu.h>
+#include <asm/debugger.h>
+#include "scom.h"
 
 #define MCK_SRR1_INSN_FETCH_UNIT    0x0000000000200000 /* 42 */
 #define MCK_SRR1_LOAD_STORE         0x0000000000100000 /* 43 */
@@ -54,6 +56,8 @@ int cpu_machinecheck(struct cpu_user_reg
     if (mck_cpu_stats[mfpir()] != 0)
         printk("While in CI IO\n");
 
+    show_backtrace_regs(regs);
+
     printk("SRR1: 0x%016lx\n", regs->msr);
     if (regs->msr & MCK_SRR1_INSN_FETCH_UNIT)
         printk("42: Exception caused by Instruction Fetch Unit (IFU)\n"
@@ -67,6 +71,7 @@ int cpu_machinecheck(struct cpu_user_reg
     case 0:
         printk("0b00: Likely caused by an asynchronous machine check,\n"
                "      see SCOM Asynchronous Machine Check Register\n");
+        cpu_scom_AMCR();
         break;
     case MCK_SRR1_CAUSE_SLB_PAR:
         printk("0b01: Exception caused by an SLB parity error detected\n"
@@ -116,5 +121,5 @@ int cpu_machinecheck(struct cpu_user_reg
         dump_segments(0);
     }
 
-    return 0; /* for now lets not recover; */
+    return 0; /* for now lets not recover */
 }
diff -r 95cead06e4ab -r 7f3ae39112cd xen/arch/powerpc/powerpc64/ppc970_scom.c
--- a/xen/arch/powerpc/powerpc64/ppc970_scom.c  Thu Sep 21 13:48:24 2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970_scom.c  Fri Sep 22 11:02:47 2006 -0400
@@ -24,6 +24,7 @@
 #include <xen/console.h>
 #include <xen/errno.h>
 #include <asm/delay.h>
+#include "scom.h"
 
 #define SPRN_SCOMC 276
 #define SPRN_SCOMD 277
@@ -48,7 +49,7 @@ union scomc {
 };
 
 
-static inline int read_scom(uint addr, ulong *d)
+int cpu_scom_read(uint addr, ulong *d)
 {
     union scomc c;
     ulong flags;
@@ -56,9 +57,9 @@ static inline int read_scom(uint addr, u
     /* drop the low 8bits (including parity) */
     addr >>= 8;
 
-    /* these give iface errors because the address is ambiguous after
-     * the above bit dropping */
-    BUG_ON(addr == 0x8000);
+    /* these give iface errors because the addresses are not software
+     * accessible */
+    BUG_ON(addr & 0x8000);
 
     for (;;) {
         c.word = 0;
@@ -100,7 +101,7 @@ static inline int read_scom(uint addr, u
     }
 }
 
-static inline int write_scom(uint addr, ulong d)
+int cpu_scom_write(uint addr, ulong d)
 {
     union scomc c;
     ulong flags;
@@ -108,9 +109,9 @@ static inline int write_scom(uint addr, 
     /* drop the low 8bits (including parity) */
     addr >>= 8;
 
-    /* these give iface errors because the address is ambiguous after
-     * the above bit dropping */
-    BUG_ON(addr == 0x8000);
+    /* these give iface errors because the addresses are not software
+     * accessible */
+    BUG_ON(addr & 0x8000);
 
     for (;;) {
         c.word = 0;
@@ -150,25 +151,21 @@ static inline int write_scom(uint addr, 
     }
 }
 
-/* SCOMC addresses are 16bit but we are given 24 bits in the
- * books. The low oerder 8 bits are some kinda parity thin and should
- * be ignored */
-#define SCOM_AMCS_REG      0x022601
-#define SCOM_AMCS_AND_MASK 0x022700
-#define SCOM_AMCS_OR_MASK  0x022800
-#define SCOM_CMCE          0x030901
-#define SCOM_PMCR          0x400801
-#define SCOM_PTSR          0x408001
-
-/* cannot access these since only top 16bits are considered */
-#define SCOM_STATUS        0x800003
-
 void cpu_scom_init(void)
 {
     ulong val;
     console_start_sync();
-    if (!read_scom(SCOM_PTSR, &val))
+    if (!cpu_scom_read(SCOM_PTSR, &val))
         printk("SCOM PTSR: 0x%016lx\n", val);
 
     console_end_sync();
 }
+
+void cpu_scom_AMCR(void)
+{
+    ulong val;
+
+    cpu_scom_read(SCOM_AMC_REG, &val);
+    printk("SCOM AMCR: 0x%016lx\n", val);
+}
+

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN][POWERPC] Machine check now inspects the SCOM for more information, Xen patchbot-unstable <=