/[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.22 - (show annotations)
Thu Jul 8 03:18:15 2004 UTC (9 years, 9 months ago) by rtoy
Branch: MAIN
CVS Tags: snapshot-2004-10, snapshot-2004-08, snapshot-2004-09, snapshot-2004-12, snapshot-2004-11, prm-before-macosx-merge-tag, snapshot-2005-01
Changes since 1.21: +2 -2 lines
File MIME type: text/plain
More compiler warning fixes:

* purify.c: fixup up fprintf warnings
* x86-validate.h:  LinkageSpaceStart is an unsigned, so cast it.
1 /*
2 *
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 * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.22 2004/07/08 03:18:15 rtoy Exp $
7 *
8 */
9
10 /*
11 * Address map:
12 *
13 * FreeBSD:
14 * 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 *
25 * OpenBSD:
26 * 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 *
37 * 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 * Linux:
49 * 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 *
60 * (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 */
64
65 #ifdef __FreeBSD__
66 #define READ_ONLY_SPACE_START (0x10000000)
67 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
68
69 #define STATIC_SPACE_START (0x28f00000)
70 #define STATIC_SPACE_SIZE (0x0f0ff000) /* 241MB - 1 page */
71
72 #define BINDING_STACK_START (0x38000000)
73 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
74
75 #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
80 #define DYNAMIC_0_SPACE_START (0x48000000)
81 #ifdef GENCGC
82 #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
83 #else
84 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
85 #endif
86 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
87 #ifdef LINKAGE_TABLE
88 #define FOREIGN_LINKAGE_SPACE_START ((unsigned long) LinkageSpaceStart)
89 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
90 #endif
91 #endif /* __FreeBSD__ */
92
93
94 #ifdef __OpenBSD__
95 #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 #define BINDING_STACK_START (0x38000000)
102 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
103
104 #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
110 #define DYNAMIC_0_SPACE_START (0x48000000)
111 #ifdef GENCGC
112 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
113 #else
114 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
115 #endif
116 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
117 #endif
118
119 #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 #define DYNAMIC_SPACE_SIZE (0x67800000) /* 1.656GB */
138 #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
148 #ifdef __linux__
149 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
150 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
151
152 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
153 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
154
155 #define BINDING_STACK_START (0x20000000)
156 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
157
158 #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
163 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
164
165 #ifdef GENCGC
166 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
167 #else
168 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
169 #endif
170 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
171 #ifdef LINKAGE_TABLE
172 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
173 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
174 #endif
175 #endif
176
177
178 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
179
180 /* Note that GENCGC only uses dynamic_space 0. */
181 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5