/[cmucl]/src/lisp/x86-validate.h
ViewVC logotype

Contents of /src/lisp/x86-validate.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (hide annotations)
Wed Jul 7 15:13:05 2004 UTC (9 years, 9 months ago) by rtoy
Branch: MAIN
Changes since 1.20: +14 -3 lines
File MIME type: text/plain
Correct some comments for NetBSD memory map.
1 ram 1.1 /*
2 dtc 1.7 *
3     * This code was written as part of the CMU Common Lisp project at
4     * Carnegie Mellon University, and has been placed in the public domain.
5     *
6 rtoy 1.21 * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.21 2004/07/07 15:13:05 rtoy Exp $
7 dtc 1.7 *
8     */
9    
10     /*
11     * Address map:
12     *
13     * FreeBSD:
14 toy 1.19 * 0x00000000->0x0E000000 224M C program and memory allocation.
15     * 0x0E000000->0x10000000 32M Foreign segment.
16     * 0x10000000->0x20000000 256M Read-Only Space.
17     * 0x20000000->0x28000000 128M Reserved for shared libraries.
18     * 0x28000000->0x38000000 256M Static Space.
19     * 0x38000000->0x40000000 128M Binding stack growing up.
20     * 0x40000000->0x48000000 128M Control stack growing down.
21     * 0x48000000->0xB0000000 1664M Dynamic Space.
22     * 0xB0000000->0xB1000000 Foreign Linkage Table
23     * 0xE0000000-> 256M C stack - Alien stack.
24 dtc 1.9 *
25 rtoy 1.21 * OpenBSD:
26 toy 1.19 * 0x00000000->0x0E000000 224M C program and memory allocation.
27     * 0x0E000000->0x10000000 32M Foreign segment.
28     * 0x10000000->0x20000000 256M Read-Only Space.
29     * 0x20000000->0x28000000 128M Binding stack growing up.
30     * 0x28000000->0x38000000 256M Static Space.
31     * 0x38000000->0x40000000 128M Control stack growing down.
32     * 0x40000000->0x48000000 128M Reserved for shared libraries.
33     * 0x48000000->0xB0000000 1664M Dynamic Space.
34     * 0xB0000000->0xB1000000 16M Foreign Linkage Table
35     * 0xE0000000-> 256M C stack - Alien stack.
36 pmai 1.13 *
37 rtoy 1.21 * NetBSD:
38     * 0x00000000->0x0E000000 224M C program and memory allocation.
39     * 0x0E000000->0x10000000 32M Foreign segment.
40     * 0x10000000->0x20000000 256M Read-Only Space.
41     * 0x28000000->0x38000000 256M Static Space.
42     * 0x38000000->0x40000000 128M Binding stack growing up.
43     * 0x40000000->0x48000000 128M Control stack growing down.
44     * 0x48800000->0xB0000000 1656M Dynamic Space.
45     * 0xB0000000->0xB1000000 16M Foreign Linkage Table
46     * 0xE0000000-> 256M C stack - Alien stack.
47     *
48 dtc 1.11 * Linux:
49 toy 1.19 * 0x00000000->0x08000000 128M Unused.
50     * 0x08000000->0x10000000 128M C program and memory allocation.
51     * 0x10000000->0x20000000 256M Read-Only Space.
52     * 0x20000000->0x28000000 128M Binding stack growing up.
53     * 0x28000000->0x38000000 256M Static Space.
54     * 0x38000000->0x40000000 128M Control stack growing down.
55     * 0x40000000->0x48000000 128M Reserved for shared libraries.
56     * 0x58000000->0xBE000000 1632M Dynamic Space.
57     * 0xBE000000->0xBF000000 16M Foreign Linkage Table
58     * 0xBFFF0000->0xC0000000 Unknown Linux mapping
59 dtc 1.7 *
60 toy 1.19 * (Note: 0x58000000 allows us to run on a Linux system on an AMD
61     * x86-64. Hence we have a gap of unused memory starting at
62     * 0x48000000.)
63 dtc 1.7 */
64    
65 dtc 1.9 #ifdef __FreeBSD__
66 dtc 1.7 #define READ_ONLY_SPACE_START (0x10000000)
67     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
68    
69 moore 1.15 #define STATIC_SPACE_START (0x28f00000)
70     #define STATIC_SPACE_SIZE (0x0f0ff000) /* 241MB - 1 page */
71 dtc 1.7
72     #define BINDING_STACK_START (0x38000000)
73     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
74 dtc 1.9
75 gerd 1.17 #define CONTROL_STACK_START 0x40000000
76     #define CONTROL_STACK_SIZE 0x07fd8000 /* 128MB - SIGSTKSZ */
77     #define SIGNAL_STACK_START 0x47fd8000
78     #define SIGNAL_STACK_SIZE SIGSTKSZ
79 dtc 1.9
80     #define DYNAMIC_0_SPACE_START (0x48000000)
81     #ifdef GENCGC
82     #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
83 pmai 1.13 #else
84     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
85     #endif
86     #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
87 moore 1.16 #ifdef LINKAGE_TABLE
88 toy 1.18 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
89 moore 1.16 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
90 pmai 1.13 #endif
91 moore 1.16 #endif /* __FreeBSD__ */
92 pmai 1.13
93    
94 rtoy 1.20 #ifdef __OpenBSD__
95 pmai 1.13 #define READ_ONLY_SPACE_START (0x10000000)
96     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
97    
98     #define STATIC_SPACE_START (0x28000000)
99     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
100    
101 rtoy 1.20 #define BINDING_STACK_START (0x38000000)
102 pmai 1.13 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
103    
104 rtoy 1.20 #define CONTROL_STACK_START (0x40000000)
105     #define CONTROL_STACK_SIZE (0x07fd8000) /* 128MB - SIGSTKSZ */
106    
107     #define SIGNAL_STACK_START (0x47fd8000)
108     #define SIGNAL_STACK_SIZE SIGSTKSZ
109 pmai 1.13
110     #define DYNAMIC_0_SPACE_START (0x48000000)
111     #ifdef GENCGC
112     #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
113 dtc 1.9 #else
114     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
115 dtc 1.7 #endif
116 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
117 dtc 1.9 #endif
118    
119 rtoy 1.20 #ifdef __NetBSD__
120     #define READ_ONLY_SPACE_START (0x10000000)
121     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
122    
123     #define STATIC_SPACE_START (0x28000000)
124     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
125    
126     #define BINDING_STACK_START (0x38000000)
127     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
128    
129     #define CONTROL_STACK_START (0x40000000)
130     #define CONTROL_STACK_SIZE (0x07fd8000) /* 128MB - SIGSTKSZ */
131    
132     #define SIGNAL_STACK_START (0x47fd8000)
133     #define SIGNAL_STACK_SIZE SIGSTKSZ
134    
135     #define DYNAMIC_0_SPACE_START (0x48800000)
136     #ifdef GENCGC
137 rtoy 1.21 #define DYNAMIC_SPACE_SIZE (0x67800000) /* 1.656GB */
138 rtoy 1.20 #else
139     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
140     #endif
141     #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
142     #ifdef LINKAGE_TABLE
143     #define FOREIGN_LINKAGE_SPACE_START (0xb0000000)
144     #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
145     #endif
146     #endif
147 ram 1.1
148 dtc 1.7 #ifdef __linux__
149 toy 1.18 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
150 dtc 1.11 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
151 dtc 1.9
152 toy 1.18 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
153 dtc 1.11 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
154 dtc 1.9
155 dtc 1.10 #define BINDING_STACK_START (0x20000000)
156 dtc 1.7 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
157 dtc 1.9
158 gerd 1.17 #define CONTROL_STACK_START 0x38000000
159     #define CONTROL_STACK_SIZE (0x07fff000 - 8192)
160     #define SIGNAL_STACK_START CONTROL_STACK_END
161     #define SIGNAL_STACK_SIZE 8192
162 ram 1.1
163 toy 1.18 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
164    
165 dtc 1.4 #ifdef GENCGC
166 dtc 1.12 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
167 dtc 1.3 #else
168 dtc 1.4 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
169 dtc 1.3 #endif
170 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
171 moore 1.16 #ifdef LINKAGE_TABLE
172 toy 1.18 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
173 moore 1.16 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
174     #endif
175 dtc 1.9 #endif
176 dtc 1.10
177 ram 1.1
178 dtc 1.9 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
179    
180     /* Note that GENCGC only uses dynamic_space 0. */
181 dtc 1.7 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5