1384740dcSRalf Baechle /* 2384740dcSRalf Baechle * This file is subject to the terms and conditions of the GNU General Public 3384740dcSRalf Baechle * License. See the file "COPYING" in the main directory of this archive 4384740dcSRalf Baechle * for more details. 5384740dcSRalf Baechle * 6384740dcSRalf Baechle * Derived from IRIX <sys/SN/gda.h>. 7384740dcSRalf Baechle * 8384740dcSRalf Baechle * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc. 9384740dcSRalf Baechle * 10384740dcSRalf Baechle * gda.h -- Contains the data structure for the global data area, 11384740dcSRalf Baechle * The GDA contains information communicated between the 12384740dcSRalf Baechle * PROM, SYMMON, and the kernel. 13384740dcSRalf Baechle */ 14384740dcSRalf Baechle #ifndef _ASM_SN_GDA_H 15384740dcSRalf Baechle #define _ASM_SN_GDA_H 16384740dcSRalf Baechle 17384740dcSRalf Baechle #include <asm/sn/addrs.h> 18384740dcSRalf Baechle 19384740dcSRalf Baechle /* 20384740dcSRalf Baechle * GDA Version History 21384740dcSRalf Baechle * 22384740dcSRalf Baechle * Version # | Change 23384740dcSRalf Baechle * -------------+------------------------------------------------------- 24384740dcSRalf Baechle * 1 | Initial SN0 version 25384740dcSRalf Baechle * 2 | Prom sets g_partid field to the partition number. 0 IS 26384740dcSRalf Baechle * | a valid partition #. 27384740dcSRalf Baechle */ 28384740dcSRalf Baechle 29384740dcSRalf Baechle #define GDA_VERSION 2 /* Current GDA version # */ 30384740dcSRalf Baechle 31384740dcSRalf Baechle #define G_MAGICOFF 0 32384740dcSRalf Baechle #define G_VERSIONOFF 4 33384740dcSRalf Baechle #define G_PROMOPOFF 6 34384740dcSRalf Baechle #define G_MASTEROFF 8 35384740dcSRalf Baechle #define G_VDSOFF 12 36384740dcSRalf Baechle #define G_HKDNORMOFF 16 37384740dcSRalf Baechle #define G_HKDUTLBOFF 24 38384740dcSRalf Baechle #define G_HKDXUTLBOFF 32 39384740dcSRalf Baechle #define G_PARTIDOFF 40 40384740dcSRalf Baechle #define G_TABLEOFF 128 41384740dcSRalf Baechle 42384740dcSRalf Baechle #ifndef __ASSEMBLY__ 43384740dcSRalf Baechle 44384740dcSRalf Baechle typedef struct gda { 45384740dcSRalf Baechle u32 g_magic; /* GDA magic number */ 46384740dcSRalf Baechle u16 g_version; /* Version of this structure */ 47384740dcSRalf Baechle u16 g_masterid; /* The NASID:CPUNUM of the master cpu */ 48384740dcSRalf Baechle u32 g_promop; /* Passes requests from the kernel to prom */ 49384740dcSRalf Baechle u32 g_vds; /* Store the virtual dipswitches here */ 50384740dcSRalf Baechle void **g_hooked_norm;/* ptr to pda loc for norm hndlr */ 51384740dcSRalf Baechle void **g_hooked_utlb;/* ptr to pda loc for utlb hndlr */ 52384740dcSRalf Baechle void **g_hooked_xtlb;/* ptr to pda loc for xtlb hndlr */ 53384740dcSRalf Baechle int g_partid; /* partition id */ 54384740dcSRalf Baechle int g_symmax; /* Max symbols in name table. */ 55384740dcSRalf Baechle void *g_dbstab; /* Address of idbg symbol table */ 56384740dcSRalf Baechle char *g_nametab; /* Address of idbg name table */ 57384740dcSRalf Baechle void *g_ktext_repmask; 58384740dcSRalf Baechle /* Pointer to a mask of nodes with copies 59384740dcSRalf Baechle * of the kernel. */ 60384740dcSRalf Baechle char g_padding[56]; /* pad out to 128 bytes */ 61c80b4896SThomas Bogendoerfer nasid_t g_nasidtable[MAX_NUMNODES]; /* NASID of each node */ 62384740dcSRalf Baechle } gda_t; 63384740dcSRalf Baechle 64384740dcSRalf Baechle #define GDA ((gda_t*) GDA_ADDR(get_nasid())) 65384740dcSRalf Baechle 66384740dcSRalf Baechle #endif /* !__ASSEMBLY__ */ 67384740dcSRalf Baechle /* 68384740dcSRalf Baechle * Define: PART_GDA_VERSION 69384740dcSRalf Baechle * Purpose: Define the minimum version of the GDA required, lower 70384740dcSRalf Baechle * revisions assume GDA is NOT set up, and read partition 71384740dcSRalf Baechle * information from the board info. 72384740dcSRalf Baechle */ 73384740dcSRalf Baechle #define PART_GDA_VERSION 2 74384740dcSRalf Baechle 75384740dcSRalf Baechle /* 76384740dcSRalf Baechle * The following requests can be sent to the PROM during startup. 77384740dcSRalf Baechle */ 78384740dcSRalf Baechle 79384740dcSRalf Baechle #define PROMOP_MAGIC 0x0ead0000 80384740dcSRalf Baechle #define PROMOP_MAGIC_MASK 0x0fff0000 81384740dcSRalf Baechle 82384740dcSRalf Baechle #define PROMOP_BIST_SHIFT 11 83384740dcSRalf Baechle #define PROMOP_BIST_MASK (0x3 << 11) 84384740dcSRalf Baechle 85384740dcSRalf Baechle #define PROMOP_REG PI_ERR_STACK_ADDR_A 86384740dcSRalf Baechle 87384740dcSRalf Baechle #define PROMOP_INVALID (PROMOP_MAGIC | 0x00) 88384740dcSRalf Baechle #define PROMOP_HALT (PROMOP_MAGIC | 0x10) 89384740dcSRalf Baechle #define PROMOP_POWERDOWN (PROMOP_MAGIC | 0x20) 90384740dcSRalf Baechle #define PROMOP_RESTART (PROMOP_MAGIC | 0x30) 91384740dcSRalf Baechle #define PROMOP_REBOOT (PROMOP_MAGIC | 0x40) 92384740dcSRalf Baechle #define PROMOP_IMODE (PROMOP_MAGIC | 0x50) 93384740dcSRalf Baechle 94384740dcSRalf Baechle #define PROMOP_CMD_MASK 0x00f0 95384740dcSRalf Baechle #define PROMOP_OPTIONS_MASK 0xfff0 96384740dcSRalf Baechle 97384740dcSRalf Baechle #define PROMOP_SKIP_DIAGS 0x0100 /* don't bother running diags */ 98384740dcSRalf Baechle #define PROMOP_SKIP_MEMINIT 0x0200 /* don't bother initing memory */ 99384740dcSRalf Baechle #define PROMOP_SKIP_DEVINIT 0x0400 /* don't bother initing devices */ 100384740dcSRalf Baechle #define PROMOP_BIST1 0x0800 /* keep track of which BIST ran */ 101384740dcSRalf Baechle #define PROMOP_BIST2 0x1000 /* keep track of which BIST ran */ 102384740dcSRalf Baechle 103384740dcSRalf Baechle #endif /* _ASM_SN_GDA_H */ 104