1 /* 1 2 * This file is subject to the terms and condi 3 * License. See the file "COPYING" in the mai 4 * for more details. 5 * 6 * Derived from IRIX <sys/SN/SN0/addrs.h>, rev 7 * 8 * Copyright (C) 1992 - 1997, 1999 Silicon Gra 9 * Copyright (C) 1999 by Ralf Baechle 10 */ 11 #ifndef _ASM_SN_SN0_ADDRS_H 12 #define _ASM_SN_SN0_ADDRS_H 13 14 15 /* 16 * SN0 (on a T5) Address map 17 * 18 * This file contains a set of definitions and 19 * to reference into the major address spaces 20 * and UNCAC) used by the SN0 architecture. I 21 * for "major" statically locatable PROM/Kerne 22 * the partition table, the configuration data 23 * We make an implicit assumption that the pro 24 * follows the R10K's provisions for specifyin 25 * should this change, the base registers may 26 * dependent. 27 * 28 * For more information on the address spaces, 29 * chapter of the Hub specification. 30 * 31 * NOTE: This header file is included both by 32 * files. Please bracket any language-d 33 * appropriately. 34 */ 35 36 /* 37 * Some of the macros here need to be casted t 38 * from C. They definitely must not be casted 39 * use some new ANSI preprocessor stuff to pas 40 */ 41 42 /* 43 * The following couple of definitions will ev 44 * since the amount of address space assigned 45 * whether the system is running in N-mode (mo 46 * or M-mode (fewer nodes with more memory). 47 * be a while before we need to make this deci 48 * so for now we just use defines bracketed by 49 */ 50 51 #ifdef CONFIG_SGI_SN_N_MODE 52 53 #define NODE_SIZE_BITS 31 54 #define BWIN_SIZE_BITS 28 55 56 #define NASID_BITS 9 57 #define NASID_BITMASK (0x1ffLL) 58 #define NASID_SHFT 31 59 #define NASID_META_BITS 5 60 #define NASID_LOCAL_BITS 4 61 62 #define BDDIR_UPPER_MASK (UINT64_CAST 0 63 #define BDECC_UPPER_MASK (UINT64_CAST 0 64 65 #else /* !defined(CONFIG_SGI_SN_N_MODE), assum 66 67 #define NODE_SIZE_BITS 32 68 #define BWIN_SIZE_BITS 29 69 70 #define NASID_BITMASK (0xffLL) 71 #define NASID_BITS 8 72 #define NASID_SHFT 32 73 #define NASID_META_BITS 4 74 #define NASID_LOCAL_BITS 4 75 76 #define BDDIR_UPPER_MASK (UINT64_CAST 0 77 #define BDECC_UPPER_MASK (UINT64_CAST 0 78 79 #endif /* !defined(CONFIG_SGI_SN_N_MODE) */ 80 81 #define NODE_ADDRSPACE_SIZE (UINT64_CAST 1 82 83 #define NASID_MASK (UINT64_CAST N 84 #define NASID_GET(_pa) (int) ((UINT64 85 NASID_ 86 87 #if !defined(__ASSEMBLY__) 88 89 #define NODE_SWIN_BASE(nasid, widget) 90 ((widget == 0) ? NODE_BWIN_BASE((nasid 91 : RAW_NODE_SWIN_BASE(nasid, widget)) 92 #else /* __ASSEMBLY__ */ 93 #define NODE_SWIN_BASE(nasid, widget) \ 94 (NODE_IO_BASE(nasid) + (UINT64_CAST(widge 95 #endif /* __ASSEMBLY__ */ 96 97 /* 98 * The following definitions pertain to the IO 99 * space. They define the location of the big 100 * of any given node. 101 */ 102 103 #define BWIN_INDEX_BITS 3 104 #define BWIN_SIZE (UINT64_CAST 1 105 #define BWIN_SIZEMASK (BWIN_SIZE - 1 106 #define BWIN_WIDGET_MASK 0x7 107 #define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE( 108 #define NODE_BWIN_BASE(nasid, bigwin) (NODE_ 109 (UINT64_CAST(bigwin) < 110 111 #define BWIN_WIDGETADDR(addr) ((addr) & BWIN 112 #define BWIN_WINDOWNUM(addr) (((addr) >> BW 113 /* 114 * Verify if addr belongs to large window addr 115 * 116 * 117 * NOTE: "addr" is expected to be XKPHYS addre 118 * address 119 * 120 * 121 */ 122 123 #define NODE_BWIN_ADDR(nasid, addr) \ 124 (((addr) >= NODE_BWIN_BASE0(na 125 ((addr) < (NODE_BWIN_BASE(nas 126 BWIN_SIZE))) 127 128 /* 129 * The following define the major position-ind 130 * in SN0. 131 * CALIAS -- Varies in size, points to th 132 * on the reader's node. 133 */ 134 135 #define CALIAS_BASE CAC_BASE 136 137 #define SN0_WIDGET_BASE(_nasid, _wid) (NODE_ 138 139 /* Turn on sable logging for the processors wh 140 #define SABLE_LOG_TRIGGER(_map) 141 142 #ifndef __ASSEMBLY__ 143 #define KERN_NMI_ADDR(nasid, slice) 144 TO_NODE_UNCAC((nasid), IP2 145 (IP27_NMI_KR 146 #endif /* !__ASSEMBLY__ */ 147 148 #ifdef PROM 149 150 #define MISC_PROM_BASE PHYS_TO_K0(0x0 151 #define MISC_PROM_SIZE 0x200000 152 153 #define DIAG_BASE PHYS_TO_K0(0x0 154 #define DIAG_SIZE 0x300000 155 156 #define ROUTE_BASE PHYS_TO_K0(0x0 157 #define ROUTE_SIZE 0x200000 158 159 #define IP27PROM_FLASH_HDR PHYS_TO_K0(0x0 160 #define IP27PROM_FLASH_DATA PHYS_TO_K0(0x0 161 #define IP27PROM_CORP_MAX 32 162 #define IP27PROM_CORP PHYS_TO_K0(0x0 163 #define IP27PROM_CORP_SIZE 0x10000 164 #define IP27PROM_CORP_STK PHYS_TO_K0(0x0 165 #define IP27PROM_CORP_STKSIZE 0x2000 166 #define IP27PROM_DECOMP_BUF PHYS_TO_K0(0x0 167 #define IP27PROM_DECOMP_SIZE 0xfff00 168 169 #define IP27PROM_BASE PHYS_TO_K0(0x0 170 #define IP27PROM_BASE_MAPPED (UNCAC_BASE | 171 #define IP27PROM_SIZE_MAX 0x100000 172 173 #define IP27PROM_PCFG PHYS_TO_K0(0x0 174 #define IP27PROM_PCFG_SIZE 0xd0000 175 #define IP27PROM_ERRDMP PHYS_TO_K1(0x0 176 #define IP27PROM_ERRDMP_SIZE 0xf000 177 178 #define IP27PROM_INIT_START PHYS_TO_K1(0x0 179 #define IP27PROM_CONSOLE PHYS_TO_K1(0x0 180 #define IP27PROM_CONSOLE_SIZE 0x200 181 #define IP27PROM_NETUART PHYS_TO_K1(0x0 182 #define IP27PROM_NETUART_SIZE 0x100 183 #define IP27PROM_UNUSED1 PHYS_TO_K1(0x0 184 #define IP27PROM_UNUSED1_SIZE 0x500 185 #define IP27PROM_ELSC_BASE_A PHYS_TO_K0(0x0 186 #define IP27PROM_ELSC_BASE_B PHYS_TO_K0(0x0 187 #define IP27PROM_STACK_A PHYS_TO_K0(0x0 188 #define IP27PROM_STACK_B PHYS_TO_K0(0x0 189 #define IP27PROM_STACK_SHFT 16 190 #define IP27PROM_STACK_SIZE (1 << IP27PROM 191 #define IP27PROM_INIT_END PHYS_TO_K0(0x0 192 193 #define SLAVESTACK_BASE PHYS_TO_K0(0x0 194 #define SLAVESTACK_SIZE 0x40000 195 196 #define ENETBUFS_BASE PHYS_TO_K0(0x0 197 #define ENETBUFS_SIZE 0x20000 198 199 #define IO6PROM_BASE PHYS_TO_K0(0x0 200 #define IO6PROM_SIZE 0x400000 201 #define IO6PROM_BASE_MAPPED (UNCAC_BASE | 202 #define IO6DPROM_BASE PHYS_TO_K0(0x0 203 #define IO6DPROM_SIZE 0x200000 204 205 #define NODEBUGUNIX_ADDR PHYS_TO_K0(0x0 206 #define DEBUGUNIX_ADDR PHYS_TO_K0(0x0 207 208 #define IP27PROM_INT_LAUNCH 10 /* and 209 #define IP27PROM_INT_NETUART 12 /* thr 210 211 #endif /* PROM */ 212 213 /* 214 * needed by symmon so it needs to be outside 215 */ 216 #define IP27PROM_ELSC_SHFT 10 217 #define IP27PROM_ELSC_SIZE (1 << IP27PROM 218 219 /* 220 * This address is used by IO6PROM to build Me 221 * free memory. This address is important sinc 222 * at this address, and this memory has to be 223 * be loaded. 224 */ 225 226 #define FREEMEM_BASE PHYS_TO_K0(0x2 227 228 #define IO6PROM_STACK_SHFT 14 /* sta 229 #define IO6PROM_STACK_SIZE (1 << IO6PROM_ 230 231 /* 232 * IP27 PROM vectors 233 */ 234 235 #define IP27PROM_ENTRY PHYS_TO_COMPAT 236 #define IP27PROM_RESTART PHYS_TO_COMPAT 237 #define IP27PROM_SLAVELOOP PHYS_TO_COMPAT 238 #define IP27PROM_PODMODE PHYS_TO_COMPAT 239 #define IP27PROM_IOC3UARTPOD PHYS_TO_COMPAT 240 #define IP27PROM_FLASHLEDS PHYS_TO_COMPAT 241 #define IP27PROM_REPOD PHYS_TO_COMPAT 242 #define IP27PROM_LAUNCHSLAVE PHYS_TO_COMPAT 243 #define IP27PROM_WAITSLAVE PHYS_TO_COMPAT 244 #define IP27PROM_POLLSLAVE PHYS_TO_COMPAT 245 246 #define KL_UART_BASE LOCAL_HUB_ADDR(MD_UREG 247 #define KL_UART_CMD LOCAL_HUB_ADDR(MD_UREG 248 #define KL_UART_DATA LOCAL_HUB_ADDR(MD_UREG 249 #define KL_I2C_REG MD_UREG0_0 250 251 #ifndef __ASSEMBLY__ 252 253 /* Address 0x400 to 0x1000 ualias points to ca 254 * CACHE_ERR_SP_PTR could either contain an ad 255 * the stack could start at CACHE_ERR_SP_PTR 256 */ 257 #if defined(HUB_ERR_STS_WAR) 258 #define CACHE_ERR_EFRAME 0x480 259 #else /* HUB_ERR_STS_WAR */ 260 #define CACHE_ERR_EFRAME 0x400 261 #endif /* HUB_ERR_STS_WAR */ 262 263 #define CACHE_ERR_ECCFRAME (CACHE_ERR_EFR 264 #define CACHE_ERR_SP_PTR (0x1000 - 32) 265 #define CACHE_ERR_IBASE_PTR (0x1000 - 40) 266 #define CACHE_ERR_SP (CACHE_ERR_SP_ 267 #define CACHE_ERR_AREA_SIZE (ARCS_SPB_OFFS 268 269 #endif /* !__ASSEMBLY__ */ 270 271 #define _ARCSPROM 272 273 #if defined(HUB_ERR_STS_WAR) 274 275 #define ERR_STS_WAR_REGISTER IIO_IIBUSERR 276 #define ERR_STS_WAR_ADDR LOCAL_HUB_ADDR 277 #define ERR_STS_WAR_PHYSADDR TO_PHYS((__psu 278 /* Used to mat 279 #define OLD_ERR_STS_WAR_OFFSET ((MD_MEM_BANKS 280 281 #endif /* HUB_ERR_STS_WAR */ 282 283 #endif /* _ASM_SN_SN0_ADDRS_H */ 284
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.