2  * This file is subject to the terms and conditions of the GNU General Public
 
   3  * License.  See the file "COPYING" in the main directory of this archive
 
   6  * Copyright (C) 1992 - 1997 Silicon Graphics, Inc.
 
  11 #ident "$Revision: 1.5 $"
 
  13 #include <asm/sn/addrs.h>
 
  16  * The launch data structure resides at a fixed place in each node's memory
 
  17  * and is used to communicate between the master processor and the slave
 
  20  * The master stores launch parameters in the launch structure
 
  21  * corresponding to a target processor that is in a slave loop, then sends
 
  22  * an interrupt to the slave processor.  The slave calls the desired
 
  23  * function, followed by an optional rendezvous function, then returns to
 
  24  * the slave loop.  The master does not wait for the slaves before
 
  27  * There is an array of launch structures, one per CPU on the node.  One
 
  28  * interrupt level is used per CPU.
 
  31 #define NMI_MAGIC               0x48414d4d455201
 
  32 #define NMI_SIZEOF              0x40
 
  34 #define NMI_OFF_MAGIC           0x00    /* Struct offsets for assembly      */
 
  35 #define NMI_OFF_FLAGS           0x08
 
  36 #define NMI_OFF_CALL            0x10
 
  37 #define NMI_OFF_CALLC           0x18
 
  38 #define NMI_OFF_CALLPARM        0x20
 
  39 #define NMI_OFF_GMASTER         0x28
 
  42  * The NMI routine is called only if the complement address is
 
  45  * Before control is transferred to a routine, the complement address
 
  46  * is zeroed (invalidated) to prevent an accidental call from a spurious
 
  53 typedef struct nmi_s {
 
  54         volatile unsigned long   magic;         /* Magic number */
 
  55         volatile unsigned long   flags;         /* Combination of flags above */
 
  56         volatile void *call_addr;       /* Routine for slave to call        */
 
  57         volatile void *call_addr_c;     /* 1's complement of address        */
 
  58         volatile void *call_parm;       /* Single parm passed to call       */
 
  59         volatile unsigned long   gmaster;       /* Flag true only on global master*/
 
  62 #endif /* !__ASSEMBLY__ */
 
  64 /* Following definitions are needed both in the prom & the kernel
 
  65  * to identify the format of the nmi cpu register save area in the
 
  66  * low memory on each node.
 
  71         unsigned long   gpr[32];
 
  76         unsigned long   error_epc;
 
  77         unsigned long   cache_err;
 
  81 #endif /* !__ASSEMBLY__ */
 
  83 /* These are the assembly language offsets into the reg_struct structure */
 
 118 #define CAUSE_OFF       0x108
 
 119 #define EPC_OFF         0x110
 
 120 #define BADVA_OFF       0x118
 
 121 #define ERROR_EPC_OFF   0x120
 
 122 #define CACHE_ERR_OFF   0x128
 
 123 #define NMISR_OFF       0x130
 
 125 #endif /* __ASM_SN_NMI_H */