kldir.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:11k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /* $Id$
  2.  *
  3.  * This file is subject to the terms and conditions of the GNU General Public
  4.  * License.  See the file "COPYING" in the main directory of this archive
  5.  * for more details.
  6.  *
  7.  * Copyright (C) 1992 - 1997, 2000 Silicon Graphics, Inc.
  8.  * Copyright (C) 2000 by Colin Ngam
  9.  */
  10. #ifndef _ASM_SN_SN1_KLDIR_H
  11. #define _ASM_SN_SN1_KLDIR_H
  12. /*
  13.  * The upper portion of the memory map applies during boot
  14.  * only and is overwritten by IRIX/SYMMON.  The minimum memory bank
  15.  * size on IP35 is 64M, which provides a limit on the amount of space
  16.  * the PROM can assume it has available.
  17.  *
  18.  * Most of the addresses below are defined as macros in this file, or
  19.  * in SN/addrs.h or SN/SN1/addrs.h.
  20.  *
  21.  *                                    MEMORY MAP PER NODE
  22.  *
  23.  * 0x4000000 (64M)         +-----------------------------------------+
  24.  *                         |                                         |
  25.  *                         |                                         |
  26.  *                         |      IO7 TEXT/DATA/BSS/stack            |
  27.  * 0x3000000 (48M)         +-----------------------------------------+
  28.  *                         |      Free                               |
  29.  * 0x2102000 (>33M)        +-----------------------------------------+
  30.  *                         |      IP35 Topology (PCFG) + misc data   |
  31.  * 0x2000000 (32M)         +-----------------------------------------+
  32.  *                         |      IO7 BUFFERS FOR FLASH ENET IOC3    |
  33.  * 0x1F80000 (31.5M)       +-----------------------------------------+
  34.  *                         |      Free                               |
  35.  * 0x1C00000 (28M)         +-----------------------------------------+
  36.  *                         |      IP35 PROM TEXT/DATA/BSS/stack      |
  37.  * 0x1A00000 (26M)         +-----------------------------------------+
  38.  *                         |      Routing temp. space                |
  39.  * 0x1800000 (24M)         +-----------------------------------------+
  40.  *                         |      Diagnostics temp. space            |
  41.  * 0x1500000 (21M)         +-----------------------------------------+
  42.  *                         |      Free                               |
  43.  * 0x1400000 (20M)         +-----------------------------------------+
  44.  *                         |      IO7 PROM temporary copy            |
  45.  * 0x1300000 (19M)         +-----------------------------------------+
  46.  *                         |                                         |
  47.  *                         |      Free                               |
  48.  *                         |      (UNIX DATA starts above 0x1000000) |
  49.  *                         |                                         |
  50.  *                         +-----------------------------------------+
  51.  *                         |      UNIX DEBUG Version                 |
  52.  * 0x0310000 (3.1M)        +-----------------------------------------+
  53.  *                         |      SYMMON, loaded just below UNIX     |
  54.  *                         |      (For UNIX Debug only)              |
  55.  *                         |                                         |
  56.  *                         |                                         |
  57.  * 0x006C000 (432K)        +-----------------------------------------+
  58.  *                         |      SYMMON STACK [NUM_CPU_PER_NODE]    |
  59.  *                         |      (For UNIX Debug only)              |
  60.  * 0x004C000 (304K)        +-----------------------------------------+
  61.  *                         |                                         |
  62.  *                         |                                         |
  63.  *                         |      UNIX NON-DEBUG Version             |
  64.  * 0x0040000 (256K)        +-----------------------------------------+
  65.  *
  66.  *
  67.  * The lower portion of the memory map contains information that is
  68.  * permanent and is used by the IP35PROM, IO7PROM and IRIX.
  69.  *
  70.  * 0x40000 (256K)          +-----------------------------------------+
  71.  *                         |                                         |
  72.  *                         |      KLCONFIG (64K)                     |
  73.  *                         |                                         |
  74.  * 0x30000 (192K)          +-----------------------------------------+
  75.  *                         |                                         |
  76.  *                         |      PI Error Spools (64K)              |
  77.  *                         |                                         |
  78.  * 0x20000 (128K)          +-----------------------------------------+
  79.  *                         |                                         |
  80.  *                         |      Unused                             |
  81.  *                         |                                         |
  82.  * 0x19000 (100K)          +-----------------------------------------+
  83.  *                         |      Early cache Exception stack (CPU 3)|
  84.  * 0x18800 (98K)           +-----------------------------------------+
  85.  *    |      cache error eframe (CPU 3)      |
  86.  * 0x18400 (97K)           +-----------------------------------------+
  87.  *                         |      Exception Handlers (CPU 3)         |
  88.  * 0x18000 (96K)           +-----------------------------------------+
  89.  *                         |                                         |
  90.  *                         |      Unused                             |
  91.  *                         |                                         |
  92.  * 0x13c00 (79K)           +-----------------------------------------+
  93.  *                         |      GPDA (8k)                          |
  94.  * 0x11c00 (71K)           +-----------------------------------------+
  95.  *                         |      Early cache Exception stack (CPU 2)|
  96.  * 0x10800 (66k)    +-----------------------------------------+
  97.  *    |      cache error eframe (CPU 2)      |
  98.  * 0x10400 (65K)           +-----------------------------------------+
  99.  *                         |      Exception Handlers (CPU 2)         |
  100.  * 0x10000 (64K)           +-----------------------------------------+
  101.  *                         |                                         |
  102.  *                         |      Unused                             |
  103.  *                         |                                         |
  104.  * 0x0b400 (45K)           +-----------------------------------------+
  105.  *                         |      GDA (1k)                           |
  106.  * 0x0b000 (44K)           +-----------------------------------------+
  107.  *                         |      NMI Eframe areas (4)             |
  108.  * 0x0a000 (40K)           +-----------------------------------------+
  109.  *                         |      NMI Register save areas (4)        |
  110.  * 0x09000 (36K)           +-----------------------------------------+
  111.  *                         |      Early cache Exception stack (CPU 1)|
  112.  * 0x08800 (34K)           +-----------------------------------------+
  113.  *    |      cache error eframe (CPU 1)      |
  114.  * 0x08400 (33K)           +-----------------------------------------+
  115.  *                         |      Exception Handlers (CPU 1)         |
  116.  * 0x08000 (32K)           +-----------------------------------------+
  117.  *                         |                                         |
  118.  *                         |                                         |
  119.  *                         |      Unused                             |
  120.  *                         |                                         |
  121.  *                         |                                         |
  122.  * 0x04000 (16K)           +-----------------------------------------+
  123.  *                         |      NMI Handler (Protected Page)       |
  124.  * 0x03000 (12K)           +-----------------------------------------+
  125.  *                         |      ARCS PVECTORS (master node only)   |
  126.  * 0x02c00 (11K)           +-----------------------------------------+
  127.  *                         |      ARCS TVECTORS (master node only)   |
  128.  * 0x02800 (10K)           +-----------------------------------------+
  129.  *                         |      LAUNCH [NUM_CPU]                   |
  130.  * 0x02400 (9K)            +-----------------------------------------+
  131.  *                         |      Low memory directory (KLDIR)       |
  132.  * 0x02000 (8K)            +-----------------------------------------+
  133.  *                         |      ARCS SPB (1K)                      |
  134.  * 0x01000 (4K)            +-----------------------------------------+
  135.  *                         |      Early cache Exception stack (CPU 0)|
  136.  * 0x00800 (2k)            +-----------------------------------------+
  137.  *    |      cache error eframe (CPU 0)      |
  138.  * 0x00400 (1K)            +-----------------------------------------+
  139.  *                         |      Exception Handlers (CPU 0)         |
  140.  * 0x00000 (0K)            +-----------------------------------------+
  141.  */
  142. /*
  143.  * NOTE:  To change the kernel load address, you must update:
  144.  *  - the appropriate elspec files in irix/kern/master.d
  145.  *  - NODEBUGUNIX_ADDR in SN/SN1/addrs.h
  146.  *  - IP27_FREEMEM_OFFSET below
  147.  *  - KERNEL_START_OFFSET below (if supporting cells)
  148.  */
  149. /*
  150.  * This is defined here because IP27_SYMMON_STK_SIZE must be at least what
  151.  * we define here.  Since it's set up in the prom.  We can't redefine it later
  152.  * and expect more space to be allocated.  The way to find out the true size
  153.  * of the symmon stacks is to divide SYMMON_STK_SIZE by SYMMON_STK_STRIDE
  154.  * for a particular node.
  155.  */
  156. #define SYMMON_STACK_SIZE 0x8000
  157. #if defined (PROM) || defined (SABLE)
  158. /*
  159.  * These defines are prom version dependent.  No code other than the IP35
  160.  * prom should attempt to use these values.
  161.  */
  162. #define IP27_LAUNCH_OFFSET 0x2400
  163. #define IP27_LAUNCH_SIZE 0x400
  164. #define IP27_LAUNCH_COUNT 4
  165. #define IP27_LAUNCH_STRIDE 0x100 /* could be as small as 0x80 */
  166. #define IP27_KLCONFIG_OFFSET 0x30000
  167. #define IP27_KLCONFIG_SIZE 0x10000
  168. #define IP27_KLCONFIG_COUNT 1
  169. #define IP27_KLCONFIG_STRIDE 0
  170. #define IP27_NMI_OFFSET 0x3000
  171. #define IP27_NMI_SIZE 0x100
  172. #define IP27_NMI_COUNT 4
  173. #define IP27_NMI_STRIDE 0x40
  174. #define IP27_PI_ERROR_OFFSET 0x20000
  175. #define IP27_PI_ERROR_SIZE 0x10000
  176. #define IP27_PI_ERROR_COUNT 1
  177. #define IP27_PI_ERROR_STRIDE 0
  178. #define IP27_SYMMON_STK_OFFSET 0x4c000
  179. #define IP27_SYMMON_STK_SIZE 0x20000
  180. #define IP27_SYMMON_STK_COUNT 4
  181. /* IP27_SYMMON_STK_STRIDE must be >= SYMMON_STACK_SIZE */
  182. #define IP27_SYMMON_STK_STRIDE 0x8000
  183. #define IP27_FREEMEM_OFFSET 0x40000
  184. #define IP27_FREEMEM_SIZE -1
  185. #define IP27_FREEMEM_COUNT 1
  186. #define IP27_FREEMEM_STRIDE 0
  187. #endif /* PROM || SABLE*/
  188. /*
  189.  * There will be only one of these in a partition so the IO7 must set it up.
  190.  */
  191. #define IO6_GDA_OFFSET 0xb000
  192. #define IO6_GDA_SIZE 0x400
  193. #define IO6_GDA_COUNT 1
  194. #define IO6_GDA_STRIDE 0
  195. /*
  196.  * save area of kernel nmi regs in the prom format
  197.  */
  198. #define IP27_NMI_KREGS_OFFSET 0x9000
  199. #define IP27_NMI_KREGS_CPU_SIZE 0x400
  200. /*
  201.  * save area of kernel nmi regs in eframe format 
  202.  */
  203. #define IP27_NMI_EFRAME_OFFSET 0xa000
  204. #define IP27_NMI_EFRAME_SIZE 0x400
  205. #define GPDA_OFFSET 0x11c00
  206. #endif /* _ASM_SN_SN1_KLDIR_H */