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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.23.2.2 by rtoy, Mon Dec 19 01:10:16 2005 UTC revision 1.34 by rtoy, Wed Dec 22 05:55:22 2010 UTC
# Line 11  Line 11 
11  #define _X86_VALIDATE_H_  #define _X86_VALIDATE_H_
12    
13  /*  /*
14     * Also look in compiler/x86/parms.lisp for some of the parameters.
15     *
16   * Address map:   * Address map:
17   *   *
18   *  FreeBSD:   *  FreeBSD:
# Line 56  Line 58 
58   *      0x28000000->0x38000000  256M Static Space.   *      0x28000000->0x38000000  256M Static Space.
59   *      0x38000000->0x40000000  128M Control stack growing down.   *      0x38000000->0x40000000  128M Control stack growing down.
60   *      0x40000000->0x48000000  128M Reserved for shared libraries.   *      0x40000000->0x48000000  128M Reserved for shared libraries.
61   *      0x58000000->0xBE000000 1632M Dynamic Space.   *      0x58000000->0x58100000   16M Foreign Linkage Table
62   *      0xBE000000->0xBF000000   16M Foreign Linkage Table   *      0x58100000->0xBE000000 1631M Dynamic Space.
63   *      0xBFFF0000->0xC0000000       Unknown Linux mapping   *      0xBFFF0000->0xC0000000       Unknown Linux mapping
64   *   *
65   *      (Note: 0x58000000 allows us to run on a Linux system on an AMD   *      (Note: 0x58000000 allows us to run on a Linux system on an AMD
# Line 80  Line 82 
82  #define SIGNAL_STACK_START      0x47fd8000  #define SIGNAL_STACK_START      0x47fd8000
83  #define SIGNAL_STACK_SIZE       SIGSTKSZ  #define SIGNAL_STACK_SIZE       SIGSTKSZ
84    
85  #define DYNAMIC_0_SPACE_START   (0x48000000)  #define DYNAMIC_0_SPACE_START   (0x48000000UL)
86  #ifdef GENCGC  #ifdef GENCGC
87  #define DYNAMIC_SPACE_SIZE      (0x40000000)    /* May be up to 2GB */  #define DYNAMIC_SPACE_SIZE      (0x78000000UL)  /* May be up to 1.7 GB */
88  #else  #else
89  #define DYNAMIC_SPACE_SIZE      (0x04000000)    /* 64MB */  #define DYNAMIC_SPACE_SIZE      (0x04000000UL)  /* 64MB */
90  #endif  #endif
91  #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000)    /* 512MB */  #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000UL)  /* 512MB */
92  #ifdef LINKAGE_TABLE  #ifdef LINKAGE_TABLE
93  #define FOREIGN_LINKAGE_SPACE_START ((unsigned long) LinkageSpaceStart)  #define FOREIGN_LINKAGE_SPACE_START ((unsigned long) LinkageSpaceStart)
94  #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */  #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000UL) /* 1MB */
95  #endif  #endif
96  #endif /* __FreeBSD__ */  #endif /* __FreeBSD__ */
97    
# Line 119  Line 121 
121  #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000)    /* 512MB */  #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000)    /* 512MB */
122  #endif  #endif
123    
124  #ifdef __NetBSD__  #if defined(__NetBSD__) || defined(DARWIN)
125  #define READ_ONLY_SPACE_START   (0x10000000)  #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)
126  #define READ_ONLY_SPACE_SIZE    (0x0ffff000)    /* 256MB - 1 page */  #define READ_ONLY_SPACE_SIZE    (0x0ffff000)    /* 256MB - 1 page */
127    
128  #define STATIC_SPACE_START      (0x28000000)  #define STATIC_SPACE_START      (SpaceStart_TargetStatic)
129  #define STATIC_SPACE_SIZE       (0x0ffff000)    /* 256MB - 1 page */  #define STATIC_SPACE_SIZE       (0x0ffff000)    /* 256MB - 1 page */
130    
131  #define BINDING_STACK_START     (0x38000000)  #define BINDING_STACK_START     (0x38000000)
132  #define BINDING_STACK_SIZE      (0x07fff000)    /* 128MB - 1 page */  #define BINDING_STACK_SIZE      (0x07fff000)    /* 128MB - 1 page */
133    
134  #define CONTROL_STACK_START     (0x40000000)  #define CONTROL_STACK_START     (0x40000000)
135    #if defined(DARWIN)
136    /*
137     * According to /usr/include/sys/signal.h, MINSIGSTKSZ is 32K and
138     * SIGSTKSZ is 128K.  We should account for that appropriately.
139     */
140    #define CONTROL_STACK_SIZE      (0x07fdf000)    /* 128MB - SIGSTKSZ - 1 page */
141    
142    #define SIGNAL_STACK_START      (0x47fe0000)    /* One page past the end of the control stack */
143    #define SIGNAL_STACK_SIZE       SIGSTKSZ
144    #else
145  #define CONTROL_STACK_SIZE      (0x07fd8000)    /* 128MB - SIGSTKSZ */  #define CONTROL_STACK_SIZE      (0x07fd8000)    /* 128MB - SIGSTKSZ */
146    
147  #define SIGNAL_STACK_START      (0x47fd8000)  #define SIGNAL_STACK_START      (0x47fd8000)
148  #define SIGNAL_STACK_SIZE       SIGSTKSZ  #define SIGNAL_STACK_SIZE       SIGSTKSZ
149    #endif
150    
151  #define DYNAMIC_0_SPACE_START   (0x48800000)  #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)
152  #ifdef GENCGC  #ifdef GENCGC
153  #define DYNAMIC_SPACE_SIZE      (0x67800000)    /* 1.656GB */  #if defined(DARWIN)
154    /*
155     * On Darwin, /usr/lib/dyld appears to always be loaded at address
156     * #x8fe2e000.  Hence, the maximum dynamic space size is 1206050816
157     * bytes, or just over 1.150 GB.  Set the limit to 1.150 GB.
158     */
159    #define DYNAMIC_SPACE_SIZE      (0x47E00000U)   /* 1.150GB */
160  #else  #else
161  #define DYNAMIC_SPACE_SIZE      (0x04000000)    /* 64MB */  #define DYNAMIC_SPACE_SIZE      (0x67800000U)   /* 1.656GB */
162  #endif  #endif
163  #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000)    /* 512MB */  #else
164    #define DYNAMIC_SPACE_SIZE      (0x04000000U)   /* 64MB */
165    #endif
166    #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000U)   /* 512MB */
167  #ifdef LINKAGE_TABLE  #ifdef LINKAGE_TABLE
168  #define FOREIGN_LINKAGE_SPACE_START (0xb0000000)  #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
169  #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */  #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */
170  #endif  #endif
171  #endif  #endif /* __NetBSD__ || DARWIN */
172    
173  #ifdef __linux__  #ifdef __linux__
174  #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)  #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)
# Line 161  Line 183 
183  #define CONTROL_STACK_START     0x38000000  #define CONTROL_STACK_START     0x38000000
184  #define CONTROL_STACK_SIZE      (0x07fff000 - 8192)  #define CONTROL_STACK_SIZE      (0x07fff000 - 8192)
185  #define SIGNAL_STACK_START      CONTROL_STACK_END  #define SIGNAL_STACK_START      CONTROL_STACK_END
186  #define SIGNAL_STACK_SIZE       8192  #define SIGNAL_STACK_SIZE       SIGSTKSZ
187    
188  #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)  #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)
189    
# Line 177  Line 199 
199  #endif  #endif
200  #endif  #endif
201    
202    #ifdef SOLARIS
203    /*
204     * The memory map for Solaris/x86 looks roughly like
205     *
206     *      0x08045000->0x08050000   C stack?
207     *      0x08050000->             Code + C heap
208     *      0x10000000->0x20000000   256 MB read-only space
209     *      0x20000000->0x28000000   128M Binding stack growing up.
210     *      0x28000000->0x30000000   256M Static Space.
211     *      0x30000000->0x31000000   16M Foreign linkage table
212     *      0x38000000->0x40000000   128M Control stack growing down.
213     *      0x40000000->0xD0000000   2304M Dynamic Space.
214     *
215     * Starting at 0xd0ce0000 there is some mapped anon memory.  libc
216     * seems to start at 0xd0d40000 and other places.  Looks like memory
217     * above 0xd0ffe000 or so is not mapped.
218     */
219    
220    #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)
221    #define READ_ONLY_SPACE_SIZE    (0x0ffff000)    /* 256MB - 1 page */
222    
223    #define STATIC_SPACE_START      (SpaceStart_TargetStatic)
224    #define STATIC_SPACE_SIZE       (0x0ffff000)    /* 256MB - 1 page */
225    
226    #define BINDING_STACK_START     (0x20000000)
227    #define BINDING_STACK_SIZE      (0x07fff000)    /* 128MB - 1 page */
228    
229    #define CONTROL_STACK_START     0x38000000
230    #define CONTROL_STACK_SIZE      (0x07fff000 - 8192)
231    #define SIGNAL_STACK_START      CONTROL_STACK_END
232    #define SIGNAL_STACK_SIZE       SIGSTKSZ
233    
234    #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)
235    
236    #ifdef GENCGC
237    #define DYNAMIC_SPACE_SIZE      (0x90000000)    /* 2.304GB */
238    #else
239    #define DYNAMIC_SPACE_SIZE      (0x04000000)    /* 64MB */
240    #endif
241    #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000)    /* 512MB */
242    #ifdef LINKAGE_TABLE
243    #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
244    #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */
245    #endif
246    #endif
247    
248  #define CONTROL_STACK_END       (CONTROL_STACK_START + CONTROL_STACK_SIZE)  #define CONTROL_STACK_END       (CONTROL_STACK_START + CONTROL_STACK_SIZE)
249    

Legend:
Removed from v.1.23.2.2  
changed lines
  Added in v.1.34

  ViewVC Help
Powered by ViewVC 1.1.5