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 * Derived from IRIX <sys/SN/gda.h>.
8 * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
10 * gda.h -- Contains the data structure for the global data area,
11 * The GDA contains information communicated between the
12 * PROM, SYMMON, and the kernel.
17 #include <asm/sn/addrs.h>
19 #define GDA_MAGIC 0x58464552
25 * -------------+-------------------------------------------------------
26 * 1 | Initial SN0 version
27 * 2 | Prom sets g_partid field to the partition number. 0 IS
28 * | a valid partition #.
31 #define GDA_VERSION 2 /* Current GDA version # */
34 #define G_VERSIONOFF 4
38 #define G_HKDNORMOFF 16
39 #define G_HKDUTLBOFF 24
40 #define G_HKDXUTLBOFF 32
41 #define G_PARTIDOFF 40
42 #define G_TABLEOFF 128
47 u32 g_magic
; /* GDA magic number */
48 u16 g_version
; /* Version of this structure */
49 u16 g_masterid
; /* The NASID:CPUNUM of the master cpu */
50 u32 g_promop
; /* Passes requests from the kernel to prom */
51 u32 g_vds
; /* Store the virtual dipswitches here */
52 void **g_hooked_norm
;/* ptr to pda loc for norm hndlr */
53 void **g_hooked_utlb
;/* ptr to pda loc for utlb hndlr */
54 void **g_hooked_xtlb
;/* ptr to pda loc for xtlb hndlr */
55 int g_partid
; /* partition id */
56 int g_symmax
; /* Max symbols in name table. */
57 void *g_dbstab
; /* Address of idbg symbol table */
58 char *g_nametab
; /* Address of idbg name table */
59 void *g_ktext_repmask
;
60 /* Pointer to a mask of nodes with copies
62 char g_padding
[56]; /* pad out to 128 bytes */
63 nasid_t g_nasidtable
[MAX_NUMNODES
]; /* NASID of each node */
66 #define GDA ((gda_t*) GDA_ADDR(get_nasid()))
68 #endif /* !__ASSEMBLY__ */
70 * Define: PART_GDA_VERSION
71 * Purpose: Define the minimum version of the GDA required, lower
72 * revisions assume GDA is NOT set up, and read partition
73 * information from the board info.
75 #define PART_GDA_VERSION 2
78 * The following requests can be sent to the PROM during startup.
81 #define PROMOP_MAGIC 0x0ead0000
82 #define PROMOP_MAGIC_MASK 0x0fff0000
84 #define PROMOP_BIST_SHIFT 11
85 #define PROMOP_BIST_MASK (0x3 << 11)
87 #define PROMOP_REG PI_ERR_STACK_ADDR_A
89 #define PROMOP_INVALID (PROMOP_MAGIC | 0x00)
90 #define PROMOP_HALT (PROMOP_MAGIC | 0x10)
91 #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20)
92 #define PROMOP_RESTART (PROMOP_MAGIC | 0x30)
93 #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40)
94 #define PROMOP_IMODE (PROMOP_MAGIC | 0x50)
96 #define PROMOP_CMD_MASK 0x00f0
97 #define PROMOP_OPTIONS_MASK 0xfff0
99 #define PROMOP_SKIP_DIAGS 0x0100 /* don't bother running diags */
100 #define PROMOP_SKIP_MEMINIT 0x0200 /* don't bother initing memory */
101 #define PROMOP_SKIP_DEVINIT 0x0400 /* don't bother initing devices */
102 #define PROMOP_BIST1 0x0800 /* keep track of which BIST ran */
103 #define PROMOP_BIST2 0x1000 /* keep track of which BIST ran */
105 #endif /* _ASM_SN_GDA_H */