[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [POWERPC][XEN] Fix definition of SCOMC register



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID a3762039dc23f731977befa7a00710c7584d41f0
# Parent  fd79d6295111cda53b2709ee5a88bd932a2dd7fb
[POWERPC][XEN] Fix definition of SCOMC register
Fix some typos aroung machine check too.

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 xen/arch/powerpc/powerpc64/ppc970.c              |    2 +-
 xen/arch/powerpc/powerpc64/ppc970_machinecheck.c |    2 +-
 xen/arch/powerpc/powerpc64/ppc970_scom.c         |   17 +++++++++--------
 3 files changed, 11 insertions(+), 10 deletions(-)

diff -r fd79d6295111 -r a3762039dc23 xen/arch/powerpc/powerpc64/ppc970.c
--- a/xen/arch/powerpc/powerpc64/ppc970.c       Fri Sep 15 18:20:55 2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970.c       Mon Sep 18 08:14:46 2006 -0400
@@ -168,7 +168,7 @@ void cpu_initialize(int cpuid)
     hid0.bits.nhr = 1;      /* Not Hard Reset */
     hid0.bits.hdice_en = 1; /* enable HDEC */
     hid0.bits.en_therm = 0; /* ! Enable ext thermal ints */
-    /* onlu debug Xen should do this */
+    /* only debug Xen should activate ATTN */
     hid0.bits.en_attn = 1;  /* Enable attn instruction */
     hid0.bits.en_mck = 1;   /* Enable external machine check interrupts */
 
diff -r fd79d6295111 -r a3762039dc23 
xen/arch/powerpc/powerpc64/ppc970_machinecheck.c
--- a/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c  Fri Sep 15 18:20:55 
2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c  Mon Sep 18 08:14:46 
2006 -0400
@@ -66,7 +66,7 @@ int cpu_machinecheck(struct cpu_user_reg
     switch (regs->msr & MCK_SRR1_CAUSE_MASK) {
     case 0:
         printk("0b00: Likely caused by an asynchronous machine check,\n"
-               "see SCOM Asynchronous Machine Check Register\n");
+               "      see SCOM Asynchronous Machine Check Register\n");
         break;
     case MCK_SRR1_CAUSE_SLB_PAR:
         printk("0b01: Exception caused by an SLB parity error detected\n"
diff -r fd79d6295111 -r a3762039dc23 xen/arch/powerpc/powerpc64/ppc970_scom.c
--- a/xen/arch/powerpc/powerpc64/ppc970_scom.c  Fri Sep 15 18:20:55 2006 -0400
+++ b/xen/arch/powerpc/powerpc64/ppc970_scom.c  Mon Sep 18 08:14:46 2006 -0400
@@ -21,6 +21,7 @@
 #include <xen/config.h>
 #include <xen/types.h>
 #include <xen/lib.h>
+#include <xen/console.h>
 
 #define SPRN_SCOMC 276
 #define SPRN_SCOMD 277
@@ -55,7 +56,8 @@ union scomc {
         ulong addr:           16;
         ulong RW:              1;
         ulong _reserved_49_55: 7;
-        ulong _reserved_56_57: 2;
+        ulong _reserved_56:    1;
+        ulong proto_error:     1;
         ulong addr_error:      1;
         ulong iface_error:     1;
         ulong disabled:        1;
@@ -90,7 +92,7 @@ static inline void write_scom(ulong addr
 
     c.word = 0;
     c.bits.addr = addr;
-    c.bits.RW = 0;
+    c.bits.RW = 1;
 
     mtscomd(val);
     mtscomc(c.word);
@@ -103,14 +105,13 @@ static inline void write_scom(ulong addr
 #define SCOM_AMCS_AND_MASK 0x022700
 #define SCOM_AMCS_OR_MASK  0x022800
 #define SCOM_CMCE          0x030901
+#define SCOM_PMCR          0x400801
 
 void cpu_scom_init(void)
 {
-#ifdef not_yet    
-    write_scom(SCOM_AMCS_AND_MASK, 0);
-    
-    printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE));
-    write_scom(SCOM_CMCE, ~0UL);
-    printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE));
+#ifdef not_yet
+    console_start_sync();
+    printk("scom PMCR: 0x%016lx\n", read_scom(SCOM_PMCR));
+    console_end_sync();
 #endif
 }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.