direct-io.hg

changeset 11525:a3762039dc23

[POWERPC][XEN] Fix definition of SCOMC register
Fix some typos aroung machine check too.

Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Mon Sep 18 08:14:46 2006 -0400 (2006-09-18)
parents fd79d6295111
children ce9c34c049c5
files xen/arch/powerpc/powerpc64/ppc970.c xen/arch/powerpc/powerpc64/ppc970_machinecheck.c xen/arch/powerpc/powerpc64/ppc970_scom.c
line diff
     1.1 --- a/xen/arch/powerpc/powerpc64/ppc970.c	Fri Sep 15 18:20:55 2006 -0400
     1.2 +++ b/xen/arch/powerpc/powerpc64/ppc970.c	Mon Sep 18 08:14:46 2006 -0400
     1.3 @@ -168,7 +168,7 @@ void cpu_initialize(int cpuid)
     1.4      hid0.bits.nhr = 1;      /* Not Hard Reset */
     1.5      hid0.bits.hdice_en = 1; /* enable HDEC */
     1.6      hid0.bits.en_therm = 0; /* ! Enable ext thermal ints */
     1.7 -    /* onlu debug Xen should do this */
     1.8 +    /* only debug Xen should activate ATTN */
     1.9      hid0.bits.en_attn = 1;  /* Enable attn instruction */
    1.10      hid0.bits.en_mck = 1;   /* Enable external machine check interrupts */
    1.11  
     2.1 --- a/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c	Fri Sep 15 18:20:55 2006 -0400
     2.2 +++ b/xen/arch/powerpc/powerpc64/ppc970_machinecheck.c	Mon Sep 18 08:14:46 2006 -0400
     2.3 @@ -66,7 +66,7 @@ int cpu_machinecheck(struct cpu_user_reg
     2.4      switch (regs->msr & MCK_SRR1_CAUSE_MASK) {
     2.5      case 0:
     2.6          printk("0b00: Likely caused by an asynchronous machine check,\n"
     2.7 -               "see SCOM Asynchronous Machine Check Register\n");
     2.8 +               "      see SCOM Asynchronous Machine Check Register\n");
     2.9          break;
    2.10      case MCK_SRR1_CAUSE_SLB_PAR:
    2.11          printk("0b01: Exception caused by an SLB parity error detected\n"
     3.1 --- a/xen/arch/powerpc/powerpc64/ppc970_scom.c	Fri Sep 15 18:20:55 2006 -0400
     3.2 +++ b/xen/arch/powerpc/powerpc64/ppc970_scom.c	Mon Sep 18 08:14:46 2006 -0400
     3.3 @@ -21,6 +21,7 @@
     3.4  #include <xen/config.h>
     3.5  #include <xen/types.h>
     3.6  #include <xen/lib.h>
     3.7 +#include <xen/console.h>
     3.8  
     3.9  #define SPRN_SCOMC 276
    3.10  #define SPRN_SCOMD 277
    3.11 @@ -55,7 +56,8 @@ union scomc {
    3.12          ulong addr:           16;
    3.13          ulong RW:              1;
    3.14          ulong _reserved_49_55: 7;
    3.15 -        ulong _reserved_56_57: 2;
    3.16 +        ulong _reserved_56:    1;
    3.17 +        ulong proto_error:     1;
    3.18          ulong addr_error:      1;
    3.19          ulong iface_error:     1;
    3.20          ulong disabled:        1;
    3.21 @@ -90,7 +92,7 @@ static inline void write_scom(ulong addr
    3.22  
    3.23      c.word = 0;
    3.24      c.bits.addr = addr;
    3.25 -    c.bits.RW = 0;
    3.26 +    c.bits.RW = 1;
    3.27  
    3.28      mtscomd(val);
    3.29      mtscomc(c.word);
    3.30 @@ -103,14 +105,13 @@ static inline void write_scom(ulong addr
    3.31  #define SCOM_AMCS_AND_MASK 0x022700
    3.32  #define SCOM_AMCS_OR_MASK  0x022800
    3.33  #define SCOM_CMCE          0x030901
    3.34 +#define SCOM_PMCR          0x400801
    3.35  
    3.36  void cpu_scom_init(void)
    3.37  {
    3.38 -#ifdef not_yet    
    3.39 -    write_scom(SCOM_AMCS_AND_MASK, 0);
    3.40 -    
    3.41 -    printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE));
    3.42 -    write_scom(SCOM_CMCE, ~0UL);
    3.43 -    printk("scom MCKE: 0x%016lx\n", read_scom(SCOM_CMCE));
    3.44 +#ifdef not_yet
    3.45 +    console_start_sync();
    3.46 +    printk("scom PMCR: 0x%016lx\n", read_scom(SCOM_PMCR));
    3.47 +    console_end_sync();
    3.48  #endif
    3.49  }