/[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.13 - (hide annotations)
Thu Dec 6 19:15:46 2001 UTC (12 years, 4 months ago) by pmai
Branch: MAIN
Changes since 1.12: +35 -1 lines
File MIME type: text/plain
Added specialised port to OpenBSD (2.9).  Many parts of the original
code which were previously conditionalized on :FreeBSD, are now
conditionalized on :BSD instead, with the :BSD feature now implying a
4.4BSD(lite2) derived OS.  This should make future BSD-ports easier.
FreeBSD and OpenBSD are differentiated by having either :FreeBSD or
:OpenBSD on the features list.

Currently the OpenBSD port does not have working ELF support, because
OpenBSD 2.9 is still non-ELF by default.  So don't put ELF on the
features list when building for OpenBSD, or fix the code to work
correctly in this case instead.
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 pmai 1.13 * $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/x86-validate.h,v 1.13 2001/12/06 19:15:46 pmai 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.13 * OpenBSD:
25     * 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     #define STATIC_SPACE_START (0x28000000)
52     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
53    
54     #define BINDING_STACK_START (0x38000000)
55     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
56 dtc 1.9
57 dtc 1.7 #define CONTROL_STACK_START (0x40000000)
58     #define CONTROL_STACK_SIZE (0x08000000) /* 128MB */
59 dtc 1.9
60     #define DYNAMIC_0_SPACE_START (0x48000000)
61     #ifdef GENCGC
62     #define DYNAMIC_SPACE_SIZE (0x40000000) /* May be up to 2GB */
63 pmai 1.13 #else
64     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
65     #endif
66     #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
67     #endif
68    
69    
70     #ifdef __OpenBSD__
71     #define READ_ONLY_SPACE_START (0x10000000)
72     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
73    
74     #define STATIC_SPACE_START (0x28000000)
75     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
76    
77     #define BINDING_STACK_START (0x20000000)
78     #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
79    
80     #define CONTROL_STACK_START (0x38000000)
81     #define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
82    
83     #define DYNAMIC_0_SPACE_START (0x48000000)
84     #ifdef GENCGC
85     #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
86 dtc 1.9 #else
87     #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
88 dtc 1.7 #endif
89 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
90 dtc 1.9 #endif
91    
92 ram 1.1
93 dtc 1.7 #ifdef __linux__
94 dtc 1.11 #define READ_ONLY_SPACE_START (0x10000000)
95     #define READ_ONLY_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
96 dtc 1.9
97 dtc 1.11 #define STATIC_SPACE_START (0x28000000)
98     #define STATIC_SPACE_SIZE (0x0ffff000) /* 256MB - 1 page */
99 dtc 1.9
100 dtc 1.10 #define BINDING_STACK_START (0x20000000)
101 dtc 1.7 #define BINDING_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
102 dtc 1.9
103 dtc 1.10 #define CONTROL_STACK_START (0x38000000)
104 dtc 1.7 #define CONTROL_STACK_SIZE (0x07fff000) /* 128MB - 1 page */
105 ram 1.1
106 dtc 1.10 #define DYNAMIC_0_SPACE_START (0x48000000)
107 dtc 1.4 #ifdef GENCGC
108 dtc 1.12 #define DYNAMIC_SPACE_SIZE (0x68000000) /* 1.625GB */
109 dtc 1.3 #else
110 dtc 1.4 #define DYNAMIC_SPACE_SIZE (0x04000000) /* 64MB */
111 dtc 1.3 #endif
112 dtc 1.12 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x20000000) /* 512MB */
113 dtc 1.9 #endif
114 dtc 1.10
115 ram 1.1
116 dtc 1.9 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
117    
118     /* Note that GENCGC only uses dynamic_space 0. */
119 dtc 1.7 #define DYNAMIC_1_SPACE_START (DYNAMIC_0_SPACE_START + DYNAMIC_SPACE_SIZE)

  ViewVC Help
Powered by ViewVC 1.1.5