18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Derived from IRIX <sys/SN/kldir.h>, revision 1.21. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 1992 - 1997, 1999, 2000 Silicon Graphics, Inc. 68c2ecf20Sopenharmony_ci * Copyright (C) 1999, 2000 by Ralf Baechle 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci#ifndef _ASM_SN_SN0_KLDIR_H 98c2ecf20Sopenharmony_ci#define _ASM_SN_SN0_KLDIR_H 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* 138c2ecf20Sopenharmony_ci * The kldir memory area resides at a fixed place in each node's memory and 148c2ecf20Sopenharmony_ci * provides pointers to most other IP27 memory areas. This allows us to 158c2ecf20Sopenharmony_ci * resize and/or relocate memory areas at a later time without breaking all 168c2ecf20Sopenharmony_ci * firmware and kernels that use them. Indices in the array are 178c2ecf20Sopenharmony_ci * permanently dedicated to areas listed below. Some memory areas (marked 188c2ecf20Sopenharmony_ci * below) reside at a permanently fixed location, but are included in the 198c2ecf20Sopenharmony_ci * directory for completeness. 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci/* 238c2ecf20Sopenharmony_ci * The upper portion of the memory map applies during boot 248c2ecf20Sopenharmony_ci * only and is overwritten by IRIX/SYMMON. 258c2ecf20Sopenharmony_ci * 268c2ecf20Sopenharmony_ci * MEMORY MAP PER NODE 278c2ecf20Sopenharmony_ci * 288c2ecf20Sopenharmony_ci * 0x2000000 (32M) +-----------------------------------------+ 298c2ecf20Sopenharmony_ci * | IO6 BUFFERS FOR FLASH ENET IOC3 | 308c2ecf20Sopenharmony_ci * 0x1F80000 (31.5M) +-----------------------------------------+ 318c2ecf20Sopenharmony_ci * | IO6 TEXT/DATA/BSS/stack | 328c2ecf20Sopenharmony_ci * 0x1C00000 (30M) +-----------------------------------------+ 338c2ecf20Sopenharmony_ci * | IO6 PROM DEBUG TEXT/DATA/BSS/stack | 348c2ecf20Sopenharmony_ci * 0x0800000 (28M) +-----------------------------------------+ 358c2ecf20Sopenharmony_ci * | IP27 PROM TEXT/DATA/BSS/stack | 368c2ecf20Sopenharmony_ci * 0x1B00000 (27M) +-----------------------------------------+ 378c2ecf20Sopenharmony_ci * | IP27 CFG | 388c2ecf20Sopenharmony_ci * 0x1A00000 (26M) +-----------------------------------------+ 398c2ecf20Sopenharmony_ci * | Graphics PROM | 408c2ecf20Sopenharmony_ci * 0x1800000 (24M) +-----------------------------------------+ 418c2ecf20Sopenharmony_ci * | 3rd Party PROM drivers | 428c2ecf20Sopenharmony_ci * 0x1600000 (22M) +-----------------------------------------+ 438c2ecf20Sopenharmony_ci * | | 448c2ecf20Sopenharmony_ci * | Free | 458c2ecf20Sopenharmony_ci * | | 468c2ecf20Sopenharmony_ci * +-----------------------------------------+ 478c2ecf20Sopenharmony_ci * | UNIX DEBUG Version | 488c2ecf20Sopenharmony_ci * 0x190000 (2M--) +-----------------------------------------+ 498c2ecf20Sopenharmony_ci * | SYMMON | 508c2ecf20Sopenharmony_ci * | (For UNIX Debug only) | 518c2ecf20Sopenharmony_ci * 0x34000 (208K) +-----------------------------------------+ 528c2ecf20Sopenharmony_ci * | SYMMON STACK [NUM_CPU_PER_NODE] | 538c2ecf20Sopenharmony_ci * | (For UNIX Debug only) | 548c2ecf20Sopenharmony_ci * 0x25000 (148K) +-----------------------------------------+ 558c2ecf20Sopenharmony_ci * | KLCONFIG - II (temp) | 568c2ecf20Sopenharmony_ci * | | 578c2ecf20Sopenharmony_ci * | ---------------------------- | 588c2ecf20Sopenharmony_ci * | | 598c2ecf20Sopenharmony_ci * | UNIX NON-DEBUG Version | 608c2ecf20Sopenharmony_ci * 0x19000 (100K) +-----------------------------------------+ 618c2ecf20Sopenharmony_ci * 628c2ecf20Sopenharmony_ci * 638c2ecf20Sopenharmony_ci * The lower portion of the memory map contains information that is 648c2ecf20Sopenharmony_ci * permanent and is used by the IP27PROM, IO6PROM and IRIX. 658c2ecf20Sopenharmony_ci * 668c2ecf20Sopenharmony_ci * 0x19000 (100K) +-----------------------------------------+ 678c2ecf20Sopenharmony_ci * | | 688c2ecf20Sopenharmony_ci * | PI Error Spools (32K) | 698c2ecf20Sopenharmony_ci * | | 708c2ecf20Sopenharmony_ci * 0x12000 (72K) +-----------------------------------------+ 718c2ecf20Sopenharmony_ci * | Unused | 728c2ecf20Sopenharmony_ci * 0x11c00 (71K) +-----------------------------------------+ 738c2ecf20Sopenharmony_ci * | CPU 1 NMI Eframe area | 748c2ecf20Sopenharmony_ci * 0x11a00 (70.5K) +-----------------------------------------+ 758c2ecf20Sopenharmony_ci * | CPU 0 NMI Eframe area | 768c2ecf20Sopenharmony_ci * 0x11800 (70K) +-----------------------------------------+ 778c2ecf20Sopenharmony_ci * | CPU 1 NMI Register save area | 788c2ecf20Sopenharmony_ci * 0x11600 (69.5K) +-----------------------------------------+ 798c2ecf20Sopenharmony_ci * | CPU 0 NMI Register save area | 808c2ecf20Sopenharmony_ci * 0x11400 (69K) +-----------------------------------------+ 818c2ecf20Sopenharmony_ci * | GDA (1k) | 828c2ecf20Sopenharmony_ci * 0x11000 (68K) +-----------------------------------------+ 838c2ecf20Sopenharmony_ci * | Early cache Exception stack | 848c2ecf20Sopenharmony_ci * | and/or | 858c2ecf20Sopenharmony_ci * | kernel/io6prom nmi registers | 868c2ecf20Sopenharmony_ci * 0x10800 (66k) +-----------------------------------------+ 878c2ecf20Sopenharmony_ci * | cache error eframe | 888c2ecf20Sopenharmony_ci * 0x10400 (65K) +-----------------------------------------+ 898c2ecf20Sopenharmony_ci * | Exception Handlers (UALIAS copy) | 908c2ecf20Sopenharmony_ci * 0x10000 (64K) +-----------------------------------------+ 918c2ecf20Sopenharmony_ci * | | 928c2ecf20Sopenharmony_ci * | | 938c2ecf20Sopenharmony_ci * | KLCONFIG - I (permanent) (48K) | 948c2ecf20Sopenharmony_ci * | | 958c2ecf20Sopenharmony_ci * | | 968c2ecf20Sopenharmony_ci * | | 978c2ecf20Sopenharmony_ci * 0x4000 (16K) +-----------------------------------------+ 988c2ecf20Sopenharmony_ci * | NMI Handler (Protected Page) | 998c2ecf20Sopenharmony_ci * 0x3000 (12K) +-----------------------------------------+ 1008c2ecf20Sopenharmony_ci * | ARCS PVECTORS (master node only) | 1018c2ecf20Sopenharmony_ci * 0x2c00 (11K) +-----------------------------------------+ 1028c2ecf20Sopenharmony_ci * | ARCS TVECTORS (master node only) | 1038c2ecf20Sopenharmony_ci * 0x2800 (10K) +-----------------------------------------+ 1048c2ecf20Sopenharmony_ci * | LAUNCH [NUM_CPU] | 1058c2ecf20Sopenharmony_ci * 0x2400 (9K) +-----------------------------------------+ 1068c2ecf20Sopenharmony_ci * | Low memory directory (KLDIR) | 1078c2ecf20Sopenharmony_ci * 0x2000 (8K) +-----------------------------------------+ 1088c2ecf20Sopenharmony_ci * | ARCS SPB (1K) | 1098c2ecf20Sopenharmony_ci * 0x1000 (4K) +-----------------------------------------+ 1108c2ecf20Sopenharmony_ci * | Early cache Exception stack | 1118c2ecf20Sopenharmony_ci * | and/or | 1128c2ecf20Sopenharmony_ci * | kernel/io6prom nmi registers | 1138c2ecf20Sopenharmony_ci * 0x800 (2k) +-----------------------------------------+ 1148c2ecf20Sopenharmony_ci * | cache error eframe | 1158c2ecf20Sopenharmony_ci * 0x400 (1K) +-----------------------------------------+ 1168c2ecf20Sopenharmony_ci * | Exception Handlers | 1178c2ecf20Sopenharmony_ci * 0x0 (0K) +-----------------------------------------+ 1188c2ecf20Sopenharmony_ci */ 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci/* 1218c2ecf20Sopenharmony_ci * This is defined here because IP27_SYMMON_STK_SIZE must be at least what 1228c2ecf20Sopenharmony_ci * we define here. Since it's set up in the prom. We can't redefine it later 1238c2ecf20Sopenharmony_ci * and expect more space to be allocated. The way to find out the true size 1248c2ecf20Sopenharmony_ci * of the symmon stacks is to divide SYMMON_STK_SIZE by SYMMON_STK_STRIDE 1258c2ecf20Sopenharmony_ci * for a particular node. 1268c2ecf20Sopenharmony_ci */ 1278c2ecf20Sopenharmony_ci#define SYMMON_STACK_SIZE 0x8000 1288c2ecf20Sopenharmony_ci 1298c2ecf20Sopenharmony_ci#if defined(PROM) 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci/* 1328c2ecf20Sopenharmony_ci * These defines are prom version dependent. No code other than the IP27 1338c2ecf20Sopenharmony_ci * prom should attempt to use these values. 1348c2ecf20Sopenharmony_ci */ 1358c2ecf20Sopenharmony_ci#define IP27_LAUNCH_OFFSET 0x2400 1368c2ecf20Sopenharmony_ci#define IP27_LAUNCH_SIZE 0x400 1378c2ecf20Sopenharmony_ci#define IP27_LAUNCH_COUNT 2 1388c2ecf20Sopenharmony_ci#define IP27_LAUNCH_STRIDE 0x200 1398c2ecf20Sopenharmony_ci 1408c2ecf20Sopenharmony_ci#define IP27_KLCONFIG_OFFSET 0x4000 1418c2ecf20Sopenharmony_ci#define IP27_KLCONFIG_SIZE 0xc000 1428c2ecf20Sopenharmony_ci#define IP27_KLCONFIG_COUNT 1 1438c2ecf20Sopenharmony_ci#define IP27_KLCONFIG_STRIDE 0 1448c2ecf20Sopenharmony_ci 1458c2ecf20Sopenharmony_ci#define IP27_NMI_OFFSET 0x3000 1468c2ecf20Sopenharmony_ci#define IP27_NMI_SIZE 0x40 1478c2ecf20Sopenharmony_ci#define IP27_NMI_COUNT 2 1488c2ecf20Sopenharmony_ci#define IP27_NMI_STRIDE 0x40 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci#define IP27_PI_ERROR_OFFSET 0x12000 1518c2ecf20Sopenharmony_ci#define IP27_PI_ERROR_SIZE 0x4000 1528c2ecf20Sopenharmony_ci#define IP27_PI_ERROR_COUNT 1 1538c2ecf20Sopenharmony_ci#define IP27_PI_ERROR_STRIDE 0 1548c2ecf20Sopenharmony_ci 1558c2ecf20Sopenharmony_ci#define IP27_SYMMON_STK_OFFSET 0x25000 1568c2ecf20Sopenharmony_ci#define IP27_SYMMON_STK_SIZE 0xe000 1578c2ecf20Sopenharmony_ci#define IP27_SYMMON_STK_COUNT 2 1588c2ecf20Sopenharmony_ci/* IP27_SYMMON_STK_STRIDE must be >= SYMMON_STACK_SIZE */ 1598c2ecf20Sopenharmony_ci#define IP27_SYMMON_STK_STRIDE 0x7000 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define IP27_FREEMEM_OFFSET 0x19000 1628c2ecf20Sopenharmony_ci#define IP27_FREEMEM_SIZE -1 1638c2ecf20Sopenharmony_ci#define IP27_FREEMEM_COUNT 1 1648c2ecf20Sopenharmony_ci#define IP27_FREEMEM_STRIDE 0 1658c2ecf20Sopenharmony_ci 1668c2ecf20Sopenharmony_ci#endif /* PROM */ 1678c2ecf20Sopenharmony_ci/* 1688c2ecf20Sopenharmony_ci * There will be only one of these in a partition so the IO6 must set it up. 1698c2ecf20Sopenharmony_ci */ 1708c2ecf20Sopenharmony_ci#define IO6_GDA_OFFSET 0x11000 1718c2ecf20Sopenharmony_ci#define IO6_GDA_SIZE 0x400 1728c2ecf20Sopenharmony_ci#define IO6_GDA_COUNT 1 1738c2ecf20Sopenharmony_ci#define IO6_GDA_STRIDE 0 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci/* 1768c2ecf20Sopenharmony_ci * save area of kernel nmi regs in the prom format 1778c2ecf20Sopenharmony_ci */ 1788c2ecf20Sopenharmony_ci#define IP27_NMI_KREGS_OFFSET 0x11400 1798c2ecf20Sopenharmony_ci#define IP27_NMI_KREGS_CPU_SIZE 0x200 1808c2ecf20Sopenharmony_ci/* 1818c2ecf20Sopenharmony_ci * save area of kernel nmi regs in eframe format 1828c2ecf20Sopenharmony_ci */ 1838c2ecf20Sopenharmony_ci#define IP27_NMI_EFRAME_OFFSET 0x11800 1848c2ecf20Sopenharmony_ci#define IP27_NMI_EFRAME_SIZE 0x200 1858c2ecf20Sopenharmony_ci 1868c2ecf20Sopenharmony_ci#endif /* _ASM_SN_SN0_KLDIR_H */ 187