/[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.18 - (hide annotations)
Fri Jan 16 03:04:46 2004 UTC (10 years, 3 months ago) by toy
Branch: MAIN
Changes since 1.17: +7 -6 lines
File MIME type: text/plain
Get the starting addresses of spaces from Lisp via internals.h instead of
being defined here and in a Lisp file.
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 toy 1.18 * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.18 2004/01/16 03:04:46 toy Exp $
7 dtc 1.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->0xC8000000 2GB Dynamic Space.
22     * 0xE0000000-> 256M C stack - Alien stack.
23 dtc 1.9 *
24 pmai 1.14 * OpenBSD and NetBSD:
25 pmai 1.13 * 0x00000000->0x0E000000 224M C program and memory allocation.
26     * 0x0E000000->0x10000000 32M Foreign segment.
27     * 0x10000000->0x20000000 256M Read-Only Space.
28     * 0x20000000->0x28000000 128M Binding stack growing up.
29     * 0x28000000->0x38000000 256M Static Space.
30     * 0x38000000->0x40000000 128M Control stack growing down.
31     * 0x40000000->0x48000000 128M Reserved for shared libraries.
32     * 0x48000000->0xB8000000 1.75GB Dynamic Space.
33     * 0xE0000000-> 256M C stack - Alien stack.
34     *
35 dtc 1.11 * Linux:
36 dtc 1.7 * 0x00000000->0x08000000 128M Unused.
37     * 0x08000000->0x10000000 128M C program and memory allocation.
38     * 0x10000000->0x20000000 256M Read-Only Space.
39     * 0x20000000->0x28000000 128M Binding stack growing up.
40     * 0x28000000->0x38000000 256M Static Space.
41     * 0x38000000->0x40000000 128M Control stack growing down.
42     * 0x40000000->0x48000000 128M Reserved for shared libraries.
43     * 0x48000000->0xB8000000 1.75G Dynamic Space.
44     *
45     */
46    
47 dtc 1.9 #ifdef __FreeBSD__
48 dtc 1.7 #define READ_ONLY_SPACE_START (0x10000000)
49     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
50    
51 moore 1.15 #define STATIC_SPACE_START (0x28f00000)
52     #define STATIC_SPACE_SIZE (0x0f0ff000) /* 241MB - 1 page */
53 dtc 1.7
54     #define BINDING_STACK_START (0x38000000)
55     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
56 dtc 1.9
57 gerd 1.17 #define CONTROL_STACK_START 0x40000000
58     #define CONTROL_STACK_SIZE 0x07fd8000 /* 128MB - SIGSTKSZ */
59     #define SIGNAL_STACK_START 0x47fd8000
60     #define SIGNAL_STACK_SIZE SIGSTKSZ
61 dtc 1.9
62     #define DYNAMIC_0_SPACE_START (0x48000000)
63     #ifdef GENCGC
64     #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
65 pmai 1.13 #else
66     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
67     #endif
68     #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
69 moore 1.16 #ifdef LINKAGE_TABLE
70 toy 1.18 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
71 moore 1.16 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
72 pmai 1.13 #endif
73 moore 1.16 #endif /* __FreeBSD__ */
74 pmai 1.13
75    
76 pmai 1.14 #if defined(__OpenBSD__) || defined(__NetBSD__)
77 pmai 1.13 #define READ_ONLY_SPACE_START (0x10000000)
78     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
79    
80     #define STATIC_SPACE_START (0x28000000)
81     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
82    
83     #define BINDING_STACK_START (0x20000000)
84     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
85    
86     #define CONTROL_STACK_START (0x38000000)
87     #define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
88    
89     #define DYNAMIC_0_SPACE_START (0x48000000)
90     #ifdef GENCGC
91     #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
92 dtc 1.9 #else
93     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
94 dtc 1.7 #endif
95 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
96 dtc 1.9 #endif
97    
98 ram 1.1
99 dtc 1.7 #ifdef __linux__
100 toy 1.18 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
101 dtc 1.11 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
102 dtc 1.9
103 toy 1.18 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
104 dtc 1.11 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
105 dtc 1.9
106 dtc 1.10 #define BINDING_STACK_START (0x20000000)
107 dtc 1.7 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
108 dtc 1.9
109 gerd 1.17 #define CONTROL_STACK_START 0x38000000
110     #define CONTROL_STACK_SIZE (0x07fff000 - 8192)
111     #define SIGNAL_STACK_START CONTROL_STACK_END
112     #define SIGNAL_STACK_SIZE 8192
113 ram 1.1
114 toy 1.18 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
115    
116 dtc 1.4 #ifdef GENCGC
117 dtc 1.12 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
118 dtc 1.3 #else
119 dtc 1.4 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
120 dtc 1.3 #endif
121 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
122 moore 1.16 #ifdef LINKAGE_TABLE
123 toy 1.18 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
124 moore 1.16 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
125     #endif
126 dtc 1.9 #endif
127 dtc 1.10
128 ram 1.1
129 dtc 1.9 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
130    
131     /* Note that GENCGC only uses dynamic_space 0. */
132 dtc 1.7 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5