/[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.29 - (hide annotations)
Fri Dec 18 04:03:24 2009 UTC (4 years, 4 months ago) by agoncharov
Branch: MAIN
CVS Tags: snapshot-2010-01, snapshot-2010-02
Changes since 1.28: +6 -6 lines
File MIME type: text/plain
of (FresBSD+) Get rid of gcc warnings: int != ulong; char *strdup() != int strdup; lisp space
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 agoncharov 1.29 * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.29 2009/12/18 04:03:24 agoncharov Exp $
7 dtc 1.7 *
8     */
9    
10 fgilham 1.23 #ifndef _X86_VALIDATE_H_
11     #define _X86_VALIDATE_H_
12    
13 dtc 1.7 /*
14 rtoy 1.27 * Also look in compiler/x86/parms.lisp for some of the parameters.
15     *
16 dtc 1.7 * Address map:
17     *
18     * FreeBSD:
19 toy 1.19 * 0x00000000->0x0E000000 224M C program and memory allocation.
20     * 0x0E000000->0x10000000 32M Foreign segment.
21     * 0x10000000->0x20000000 256M Read-Only Space.
22     * 0x20000000->0x28000000 128M Reserved for shared libraries.
23     * 0x28000000->0x38000000 256M Static Space.
24     * 0x38000000->0x40000000 128M Binding stack growing up.
25     * 0x40000000->0x48000000 128M Control stack growing down.
26     * 0x48000000->0xB0000000 1664M Dynamic Space.
27     * 0xB0000000->0xB1000000 Foreign Linkage Table
28     * 0xE0000000-> 256M C stack - Alien stack.
29 dtc 1.9 *
30 rtoy 1.21 * OpenBSD:
31 toy 1.19 * 0x00000000->0x0E000000 224M C program and memory allocation.
32     * 0x0E000000->0x10000000 32M Foreign segment.
33     * 0x10000000->0x20000000 256M Read-Only Space.
34     * 0x20000000->0x28000000 128M Binding stack growing up.
35     * 0x28000000->0x38000000 256M Static Space.
36     * 0x38000000->0x40000000 128M Control stack growing down.
37     * 0x40000000->0x48000000 128M Reserved for shared libraries.
38     * 0x48000000->0xB0000000 1664M Dynamic Space.
39     * 0xB0000000->0xB1000000 16M Foreign Linkage Table
40     * 0xE0000000-> 256M C stack - Alien stack.
41 pmai 1.13 *
42 rtoy 1.21 * NetBSD:
43     * 0x00000000->0x0E000000 224M C program and memory allocation.
44     * 0x0E000000->0x10000000 32M Foreign segment.
45     * 0x10000000->0x20000000 256M Read-Only Space.
46     * 0x28000000->0x38000000 256M Static Space.
47     * 0x38000000->0x40000000 128M Binding stack growing up.
48     * 0x40000000->0x48000000 128M Control stack growing down.
49     * 0x48800000->0xB0000000 1656M Dynamic Space.
50     * 0xB0000000->0xB1000000 16M Foreign Linkage Table
51     * 0xE0000000-> 256M C stack - Alien stack.
52     *
53 dtc 1.11 * Linux:
54 toy 1.19 * 0x00000000->0x08000000 128M Unused.
55     * 0x08000000->0x10000000 128M C program and memory allocation.
56     * 0x10000000->0x20000000 256M Read-Only Space.
57     * 0x20000000->0x28000000 128M Binding stack growing up.
58     * 0x28000000->0x38000000 256M Static Space.
59     * 0x38000000->0x40000000 128M Control stack growing down.
60     * 0x40000000->0x48000000 128M Reserved for shared libraries.
61 rtoy 1.27 * 0x58000000->0x58100000 16M Foreign Linkage Table
62     * 0x58100000->0xBE000000 1631M Dynamic Space.
63 toy 1.19 * 0xBFFF0000->0xC0000000 Unknown Linux mapping
64 dtc 1.7 *
65 toy 1.19 * (Note: 0x58000000 allows us to run on a Linux system on an AMD
66     * x86-64. Hence we have a gap of unused memory starting at
67     * 0x48000000.)
68 dtc 1.7 */
69    
70 dtc 1.9 #ifdef __FreeBSD__
71 dtc 1.7 #define READ_ONLY_SPACE_START (0x10000000)
72 rtoy 1.25 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
73 dtc 1.7
74 moore 1.15 #define STATIC_SPACE_START (0x28f00000)
75 rtoy 1.25 #define STATIC_SPACE_SIZE (0x0f0ff000) /* 241MB - 1 page */
76 dtc 1.7
77     #define BINDING_STACK_START (0x38000000)
78 rtoy 1.25 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
79 dtc 1.9
80 gerd 1.17 #define CONTROL_STACK_START 0x40000000
81 rtoy 1.25 #define CONTROL_STACK_SIZE 0x07fd8000 /* 128MB - SIGSTKSZ */
82 gerd 1.17 #define SIGNAL_STACK_START 0x47fd8000
83     #define SIGNAL_STACK_SIZE SIGSTKSZ
84 dtc 1.9
85 agoncharov 1.29 #define DYNAMIC_0_SPACE_START (0x48000000UL)
86 dtc 1.9 #ifdef GENCGC
87 agoncharov 1.29 #define DYNAMIC_SPACE_SIZE (0x78000000UL) /* May be up to 1.7 GB */
88 pmai 1.13 #else
89 agoncharov 1.29 #define DYNAMIC_SPACE_SIZE (0x04000000UL) /* 64MB */
90 pmai 1.13 #endif
91 agoncharov 1.29 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000UL) /* 512MB */
92 moore 1.16 #ifdef LINKAGE_TABLE
93 rtoy 1.25 #define FOREIGN_LINKAGE_SPACE_START ((unsigned long) LinkageSpaceStart)
94 agoncharov 1.29 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000UL) /* 1MB */
95 pmai 1.13 #endif
96 moore 1.16 #endif /* __FreeBSD__ */
97 pmai 1.13
98    
99 rtoy 1.20 #ifdef __OpenBSD__
100 pmai 1.13 #define READ_ONLY_SPACE_START (0x10000000)
101 rtoy 1.25 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
102 pmai 1.13
103     #define STATIC_SPACE_START (0x28000000)
104 rtoy 1.25 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
105 pmai 1.13
106 rtoy 1.20 #define BINDING_STACK_START (0x38000000)
107 rtoy 1.25 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
108 pmai 1.13
109 rtoy 1.20 #define CONTROL_STACK_START (0x40000000)
110 rtoy 1.25 #define CONTROL_STACK_SIZE (0x07fd8000) /* 128MB - SIGSTKSZ */
111 rtoy 1.20
112     #define SIGNAL_STACK_START (0x47fd8000)
113     #define SIGNAL_STACK_SIZE SIGSTKSZ
114 pmai 1.13
115     #define DYNAMIC_0_SPACE_START (0x48000000)
116     #ifdef GENCGC
117 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
118 dtc 1.9 #else
119 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
120 dtc 1.7 #endif
121 rtoy 1.25 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
122 dtc 1.9 #endif
123    
124 cshapiro 1.28 #if defined(__NetBSD__) || defined(DARWIN)
125 rtoy 1.20 #define READ_ONLY_SPACE_START (0x10000000)
126 rtoy 1.25 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
127 rtoy 1.20
128     #define STATIC_SPACE_START (0x28000000)
129 rtoy 1.25 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
130 rtoy 1.20
131     #define BINDING_STACK_START (0x38000000)
132 rtoy 1.25 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
133 rtoy 1.20
134     #define CONTROL_STACK_START (0x40000000)
135 rtoy 1.25 #define CONTROL_STACK_SIZE (0x07fd8000) /* 128MB - SIGSTKSZ */
136 rtoy 1.20
137     #define SIGNAL_STACK_START (0x47fd8000)
138     #define SIGNAL_STACK_SIZE SIGSTKSZ
139    
140 cshapiro 1.28 #define DYNAMIC_0_SPACE_START (0x48000000)
141 rtoy 1.20 #ifdef GENCGC
142 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x67800000) /* 1.656GB */
143 rtoy 1.20 #else
144 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
145 rtoy 1.20 #endif
146 rtoy 1.25 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
147 rtoy 1.20 #ifdef LINKAGE_TABLE
148     #define FOREIGN_LINKAGE_SPACE_START (0xb0000000)
149 rtoy 1.25 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
150 rtoy 1.20 #endif
151 cshapiro 1.28 #endif /* __NetBSD__ || DARWIN */
152 ram 1.1
153 dtc 1.7 #ifdef __linux__
154 toy 1.18 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
155 rtoy 1.25 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
156 dtc 1.9
157 toy 1.18 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
158 rtoy 1.25 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
159 dtc 1.9
160 dtc 1.10 #define BINDING_STACK_START (0x20000000)
161 rtoy 1.25 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
162 dtc 1.9
163 gerd 1.17 #define CONTROL_STACK_START 0x38000000
164 rtoy 1.25 #define CONTROL_STACK_SIZE (0x07fff000 - 8192)
165 gerd 1.17 #define SIGNAL_STACK_START CONTROL_STACK_END
166     #define SIGNAL_STACK_SIZE 8192
167 ram 1.1
168 toy 1.18 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
169    
170 dtc 1.4 #ifdef GENCGC
171 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x66000000) /* 1.632GB */
172 dtc 1.3 #else
173 rtoy 1.25 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
174 dtc 1.3 #endif
175 rtoy 1.25 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
176 moore 1.16 #ifdef LINKAGE_TABLE
177 rtoy 1.25 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
178     #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
179 moore 1.16 #endif
180 dtc 1.9 #endif
181 dtc 1.10
182 ram 1.1
183 dtc 1.9 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
184    
185     /* Note that GENCGC only uses dynamic_space 0. */
186 dtc 1.7 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)
187 fgilham 1.23
188     #endif /* _X86_VALIDATE_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5