/[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.19 - (show annotations)
Fri Jan 16 03:32:21 2004 UTC (10 years, 3 months ago) by toy
Branch: MAIN
CVS Tags: snapshot-2004-05, snapshot-2004-06, snapshot-2004-07, mod-arith-base, amd64-merge-start, release-19a-base, release-19a-pre1, release-19a-pre3, release-19a-pre2, release-19a, snapshot-2004-04
Branch point for: mod-arith-branch, release-19a-branch
Changes since 1.18: +34 -27 lines
File MIME type: text/plain
Update comments on address spaces.
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.19 2004/01/16 03:32:21 toy 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 and NetBSD:
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 * Linux:
38 * 0x00000000->0x08000000 128M Unused.
39 * 0x08000000->0x10000000 128M C program and memory allocation.
40 * 0x10000000->0x20000000 256M Read-Only Space.
41 * 0x20000000->0x28000000 128M Binding stack growing up.
42 * 0x28000000->0x38000000 256M Static Space.
43 * 0x38000000->0x40000000 128M Control stack growing down.
44 * 0x40000000->0x48000000 128M Reserved for shared libraries.
45 * 0x58000000->0xBE000000 1632M Dynamic Space.
46 * 0xBE000000->0xBF000000 16M Foreign Linkage Table
47 * 0xBFFF0000->0xC0000000 Unknown Linux mapping
48 *
49 * (Note: 0x58000000 allows us to run on a Linux system on an AMD
50 * x86-64. Hence we have a gap of unused memory starting at
51 * 0x48000000.)
52 */
53
54 #ifdef __FreeBSD__
55 #define READ_ONLY_SPACE_START (0x10000000)
56 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
57
58 #define STATIC_SPACE_START (0x28f00000)
59 #define STATIC_SPACE_SIZE (0x0f0ff000) /* 241MB - 1 page */
60
61 #define BINDING_STACK_START (0x38000000)
62 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
63
64 #define CONTROL_STACK_START 0x40000000
65 #define CONTROL_STACK_SIZE 0x07fd8000 /* 128MB - SIGSTKSZ */
66 #define SIGNAL_STACK_START 0x47fd8000
67 #define SIGNAL_STACK_SIZE SIGSTKSZ
68
69 #define DYNAMIC_0_SPACE_START (0x48000000)
70 #ifdef GENCGC
71 #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
72 #else
73 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
74 #endif
75 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
76 #ifdef LINKAGE_TABLE
77 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
78 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
79 #endif
80 #endif /* __FreeBSD__ */
81
82
83 #if defined(__OpenBSD__) || defined(__NetBSD__)
84 #define READ_ONLY_SPACE_START (0x10000000)
85 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
86
87 #define STATIC_SPACE_START (0x28000000)
88 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
89
90 #define BINDING_STACK_START (0x20000000)
91 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
92
93 #define CONTROL_STACK_START (0x38000000)
94 #define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
95
96 #define DYNAMIC_0_SPACE_START (0x48000000)
97 #ifdef GENCGC
98 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
99 #else
100 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
101 #endif
102 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
103 #endif
104
105
106 #ifdef __linux__
107 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
108 #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
109
110 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
111 #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
112
113 #define BINDING_STACK_START (0x20000000)
114 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
115
116 #define CONTROL_STACK_START 0x38000000
117 #define CONTROL_STACK_SIZE (0x07fff000 - 8192)
118 #define SIGNAL_STACK_START CONTROL_STACK_END
119 #define SIGNAL_STACK_SIZE 8192
120
121 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
122
123 #ifdef GENCGC
124 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
125 #else
126 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
127 #endif
128 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
129 #ifdef LINKAGE_TABLE
130 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
131 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000) /* 1MB */
132 #endif
133 #endif
134
135
136 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
137
138 /* Note that GENCGC only uses dynamic_space 0. */
139 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5