Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * This file is subject to the terms and conditions of the GNU General Public
0003  * License.  See the file "COPYING" in the main directory of this archive
0004  * for more details.
0005  *
0006  * Derived from IRIX <sys/SN/gda.h>.
0007  *
0008  * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
0009  *
0010  * gda.h -- Contains the data structure for the global data area,
0011  *  The GDA contains information communicated between the
0012  *  PROM, SYMMON, and the kernel.
0013  */
0014 #ifndef _ASM_SN_GDA_H
0015 #define _ASM_SN_GDA_H
0016 
0017 #include <asm/sn/addrs.h>
0018 
0019 #define GDA_MAGIC   0x58464552
0020 
0021 /*
0022  * GDA Version History
0023  *
0024  * Version #    | Change
0025  * -------------+-------------------------------------------------------
0026  *  1   | Initial SN0 version
0027  *  2   | Prom sets g_partid field to the partition number. 0 IS
0028  *      | a valid partition #.
0029  */
0030 
0031 #define GDA_VERSION 2   /* Current GDA version # */
0032 
0033 #define G_MAGICOFF  0
0034 #define G_VERSIONOFF    4
0035 #define G_PROMOPOFF 6
0036 #define G_MASTEROFF 8
0037 #define G_VDSOFF    12
0038 #define G_HKDNORMOFF    16
0039 #define G_HKDUTLBOFF    24
0040 #define G_HKDXUTLBOFF   32
0041 #define G_PARTIDOFF 40
0042 #define G_TABLEOFF  128
0043 
0044 #ifndef __ASSEMBLY__
0045 
0046 typedef struct gda {
0047     u32 g_magic;    /* GDA magic number */
0048     u16 g_version;  /* Version of this structure */
0049     u16 g_masterid; /* The NASID:CPUNUM of the master cpu */
0050     u32 g_promop;   /* Passes requests from the kernel to prom */
0051     u32 g_vds;      /* Store the virtual dipswitches here */
0052     void    **g_hooked_norm;/* ptr to pda loc for norm hndlr */
0053     void    **g_hooked_utlb;/* ptr to pda loc for utlb hndlr */
0054     void    **g_hooked_xtlb;/* ptr to pda loc for xtlb hndlr */
0055     int g_partid;   /* partition id */
0056     int g_symmax;   /* Max symbols in name table. */
0057     void    *g_dbstab;  /* Address of idbg symbol table */
0058     char    *g_nametab; /* Address of idbg name table */
0059     void    *g_ktext_repmask;
0060                 /* Pointer to a mask of nodes with copies
0061                  * of the kernel. */
0062     char    g_padding[56];  /* pad out to 128 bytes */
0063     nasid_t g_nasidtable[MAX_NUMNODES]; /* NASID of each node */
0064 } gda_t;
0065 
0066 #define GDA ((gda_t*) GDA_ADDR(get_nasid()))
0067 
0068 #endif /* !__ASSEMBLY__ */
0069 /*
0070  * Define:  PART_GDA_VERSION
0071  * Purpose: Define the minimum version of the GDA required, lower
0072  *      revisions assume GDA is NOT set up, and read partition
0073  *      information from the board info.
0074  */
0075 #define PART_GDA_VERSION    2
0076 
0077 /*
0078  * The following requests can be sent to the PROM during startup.
0079  */
0080 
0081 #define PROMOP_MAGIC        0x0ead0000
0082 #define PROMOP_MAGIC_MASK   0x0fff0000
0083 
0084 #define PROMOP_BIST_SHIFT   11
0085 #define PROMOP_BIST_MASK    (0x3 << 11)
0086 
0087 #define PROMOP_REG      PI_ERR_STACK_ADDR_A
0088 
0089 #define PROMOP_INVALID      (PROMOP_MAGIC | 0x00)
0090 #define PROMOP_HALT     (PROMOP_MAGIC | 0x10)
0091 #define PROMOP_POWERDOWN    (PROMOP_MAGIC | 0x20)
0092 #define PROMOP_RESTART      (PROMOP_MAGIC | 0x30)
0093 #define PROMOP_REBOOT       (PROMOP_MAGIC | 0x40)
0094 #define PROMOP_IMODE        (PROMOP_MAGIC | 0x50)
0095 
0096 #define PROMOP_CMD_MASK     0x00f0
0097 #define PROMOP_OPTIONS_MASK 0xfff0
0098 
0099 #define PROMOP_SKIP_DIAGS   0x0100      /* don't bother running diags */
0100 #define PROMOP_SKIP_MEMINIT 0x0200      /* don't bother initing memory */
0101 #define PROMOP_SKIP_DEVINIT 0x0400      /* don't bother initing devices */
0102 #define PROMOP_BIST1        0x0800      /* keep track of which BIST ran */
0103 #define PROMOP_BIST2        0x1000      /* keep track of which BIST ran */
0104 
0105 #endif /* _ASM_SN_GDA_H */