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

Contents of /src/lisp/sparc-validate.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.21 - (show annotations)
Thu Sep 15 18:26:52 2005 UTC (8 years, 7 months ago) by rtoy
Branch: MAIN
CVS Tags: sparc-tramp-assem-base, double-double-array-base, post-merge-intl-branch, merged-unicode-utf16-extfmt-2009-06-11, double-double-init-sparc-2, unicode-utf16-extfmt-2009-03-27, double-double-base, snapshot-2007-09, snapshot-2007-08, snapshot-2008-08, snapshot-2008-09, sse2-packed-2008-11-12, snapshot-2008-05, snapshot-2008-06, snapshot-2008-07, snapshot-2007-05, snapshot-2008-01, snapshot-2008-02, snapshot-2008-03, intl-branch-working-2010-02-19-1000, snapshot-2006-11, snapshot-2006-10, double-double-init-sparc, snapshot-2006-12, unicode-string-buffer-impl-base, sse2-base, release-20b-pre1, release-20b-pre2, unicode-string-buffer-base, sse2-packed-base, sparc-tramp-assem-2010-07-19, amd64-dd-start, release-19f-pre1, snapshot-2008-12, snapshot-2008-11, intl-2-branch-base, snapshot-2007-01, snapshot-2007-02, release-19e, release-19d, GIT-CONVERSION, double-double-init-ppc, release-19c, unicode-utf16-sync-2008-12, release-19c-base, cross-sol-x86-merged, label-2009-03-16, release-19f-base, merge-sse2-packed, merge-with-19f, intl-branch-working-2010-02-11-1000, unicode-snapshot-2009-05, unicode-snapshot-2009-06, double-double-init-%make-sparc, unicode-utf16-sync-2008-07, unicode-utf16-sync-2008-09, unicode-utf16-extfmts-sync-2008-12, RELEASE_20b, snapshot-2008-04, unicode-utf16-sync-label-2009-03-16, RELEASE_19f, snapshot-2007-03, release-20a-base, cross-sol-x86-base, unicode-utf16-char-support-2009-03-26, unicode-utf16-char-support-2009-03-25, unicode-utf16-extfmts-pre-sync-2008-11, snapshot-2008-10, snapshot-2007-04, snapshot-2010-12, snapshot-2010-11, unicode-utf16-sync-2008-11, snapshot-2007-07, snapshot-2011-09, snapshot-2011-06, snapshot-2011-07, snapshot-2011-04, snapshot-2007-06, snapshot-2011-02, snapshot-2011-03, snapshot-2011-01, pre-merge-intl-branch, double-double-array-checkpoint, double-double-reader-checkpoint-1, release-19d-base, release-19e-pre1, double-double-irrat-end, release-19e-pre2, snapshot-2010-05, snapshot-2010-04, snapshot-2010-07, snapshot-2010-06, snapshot-2010-01, snapshot-2010-03, snapshot-2010-02, release-19d-pre2, release-19d-pre1, snapshot-2010-08, double-double-init-checkpoint-1, double-double-reader-base, label-2009-03-25, cross-sol-x86-2010-12-20, double-double-init-x86, sse2-checkpoint-2008-10-01, intl-branch-2010-03-18-1300, snapshot-2005-11, double-double-sparc-checkpoint-1, sse2-merge-with-2008-11, sse2-merge-with-2008-10, snapshot-2005-10, RELEASE_20a, snapshot-2005-12, release-20a-pre1, snapshot-2009-11, snapshot-2009-12, unicode-utf16-extfmt-2009-06-11, portable-clx-import-2009-06-16, unicode-utf16-string-support, release-19c-pre1, cross-sparc-branch-base, release-19e-base, intl-branch-base, double-double-irrat-start, unicode-utf16-base, portable-clx-base, snapshot-2009-08, snapshot-2007-12, snapshot-2007-10, snapshot-2007-11, snapshot-2009-02, snapshot-2009-01, snapshot-2009-07, snapshot-2009-05, snapshot-2009-04, snapshot-2006-02, snapshot-2006-03, snapshot-2006-01, snapshot-2006-06, snapshot-2006-07, snapshot-2006-04, snapshot-2006-05, pre-telent-clx, snapshot-2006-08, snapshot-2006-09, HEAD
Branch point for: double-double-reader-branch, double-double-array-branch, RELEASE-19F-BRANCH, portable-clx-branch, cross-sparc-branch, RELEASE-20B-BRANCH, unicode-string-buffer-branch, sparc-tramp-assem-branch, release-19d-branch, sse2-packed-branch, RELEASE-20A-BRANCH, amd64-dd-branch, double-double-branch, unicode-string-buffer-impl-branch, intl-branch, unicode-utf16-branch, cross-sol-x86-branch, release-19e-branch, sse2-branch, release-19c-branch, intl-2-branch, unicode-utf16-extfmt-branch
Changes since 1.20: +11 -11 lines
File MIME type: text/plain
Indent all source files using GNU indent using the config in
.indent.pro.
1 /*
2
3 $Header: /tiger/var/lib/cvsroots/cmucl/src/lisp/sparc-validate.h,v 1.21 2005/09/15 18:26:52 rtoy Rel $
4
5 This code was written as part of the CMU Common Lisp project at
6 Carnegie Mellon University, and has been placed in the public domain.
7
8 */
9
10 #ifndef _SPARC_VALIDATE_H_
11 #define _SPARC_VALIDATE_H_
12
13 /*
14 * Address map:
15 *
16 * 0x00000000->0x0f800000 248M C code and stuff(?)
17 * 0x0f800000->0x10000000 8M for linkage table area
18 * 0x10000000->0x20000000 256M Read-Only Space.
19 * 0x20000000->0x28000000 128M Binding stack growing up.
20 * 0x28000000->0x38000000 256M Static Space.
21 * 0x38000000->0x40000000 128M Control stack growing up.
22 * 0x40000000->0x80000000 1024M Dynamic space 1
23 * 0x80000000->0xc0000000 1024M Dynamic space 2
24 * 0xc0000000->0xffffffff 1024M C stack, dynamic libs, etc.
25 *
26 * With GENCGC:
27 *
28 * 0x00000000->0x0f800000 248M C code and stuff(?)
29 * 0x0f800000->0x10000000 8M for linkage table area
30 * 0x10000000->0x20000000 256M Read-Only Space.
31 * 0x20000000->0x28000000 128M Binding stack growing up.
32 * 0x28000000->0x38000000 256M Static Space.
33 * 0x38000000->0x40000000 128M Control stack growing up.
34 * 0x40000000->0xf0000000 2816M Dynamic space 1
35 * 0xf0000000->0xffffffff 1024M C stack, dynamic libs, etc.
36 *
37 * But look at the definitions below to see how much is really
38 * allocated. The numbers above are the maximums allowed. We might
39 * use less.
40 *
41 * Almost. We leave a hole of size 32 KB at the end of each of these
42 * spaces.
43 *
44 *
45 * It may be possible to increase the size of the dynamic spaces even
46 * further, but Casper H.S. Dik says shared libraries are loaded
47 * directly under the stack, so we need to leave some space for the C
48 * stack and shared libraries. He also says the top of stack is
49 * 0xffbf0000 for Ultrasparcs in Solaris 7+, but it's 0xf0000000 for
50 * sun4m (and 4u in S2.6-) 0xe0000000 for sun4d)
51 *
52 * Shared libraries can be mapped anywhere there's room.
53 */
54
55 /* Need this to define the spaces described in Lisp */
56
57 /*#include "internals.h"*/
58
59 /* 128 MB */
60 #define MB_128 (0x08000000)
61 /*
62 *
63 * Note: I'm not sure why, but the sizes must be on a
64 * SPARSE_BLOCK_SIZE (32 KB) boundary. (See seg_force_resident in
65 * sunos-os.c. If not, then mapping the holes causes segfaults in
66 * initialization.)
67 *
68 * Sparse block size must be larger than the system page size.
69 */
70
71 #define SPARSE_BLOCK_SIZE (1<<15)
72 #define SPARSE_SIZE_MASK (SPARSE_BLOCK_SIZE-1)
73
74
75 #ifdef LINKAGE_TABLE
76 /*
77 * This space start better match the value of
78 * target-foreign-linkage-space-start defined in sparc/parms.lisp!
79 *
80 * See the notes there!
81 */
82
83 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
84
85 /*
86 * This allows for about 510K symbols (assuming each entry is 16 bytes
87 * long). Hope that's enough! Make sure this doesn't overlap the
88 * READ_ONLY_SPACE_START!
89 */
90 #define FOREIGN_LINKAGE_SPACE_SIZE (0x00800000 - SPARSE_BLOCK_SIZE) /* 8 MB - 32 KB */
91 #endif
92
93
94 #define READ_ONLY_SPACE_START (SpaceStart_TargetReadOnly)
95 #define READ_ONLY_SPACE_SIZE ((2*MB_128) - SPARSE_BLOCK_SIZE) /* 256 MB - 32 KB, 256 MB max */
96
97 #define BINDING_STACK_START (0x20000000)
98 #define BINDING_STACK_SIZE (MB_128 - SPARSE_BLOCK_SIZE) /* 128 MB - 32 KB, 128 MB max */
99
100 #define STATIC_SPACE_START (SpaceStart_TargetStatic)
101 #define STATIC_SPACE_SIZE ((2*MB_128) - SPARSE_BLOCK_SIZE) /* 256 MB - 32 KB, 256 MB max */
102
103 #define CONTROL_STACK_START (0x38000000)
104 #define CONTROL_STACK_SIZE (MB_128 - SPARSE_BLOCK_SIZE) /* 128 MB - 32 KB, 128 MB max */
105 #define CONTROL_STACK_END (CONTROL_STACK_START + CONTROL_STACK_SIZE)
106
107 #define DYNAMIC_0_SPACE_START (SpaceStart_TargetDynamic)
108
109 /* This isn't used with GENCGC */
110 #define DYNAMIC_1_SPACE_START (0x80000000)
111
112 /* The default dynamic space to allocate */
113 /*
114 * On Solaris 10, Martin Rydstrom reports that subtracting off
115 * SPARSE_BLOCK_SIZE causes CMUCL not to work (GC lossage). But
116 * specifying -dynamic-space-size 256 works fine. I don't understand
117 * how that can be, but we lets not subtract it off.
118 */
119 #if 0
120 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x10000000 - SPARSE_BLOCK_SIZE) /* 256 MB - 32 KB */
121 #else
122 #define DEFAULT_DYNAMIC_SPACE_SIZE (0x10000000) /* 256 MB */
123 #endif
124
125 /* The maximum dynamic space that we can allocate */
126 #ifdef GENCGC
127 /*
128 * For GENCGC, we can use both dynamic spaces, so we get at least
129 * double the heap size.
130 */
131 #define DYNAMIC_SPACE_SIZE (0xB0000000 - SPARSE_BLOCK_SIZE) /* 2816 MB - 32 KB max */
132 #else
133 #define DYNAMIC_SPACE_SIZE (0x40000000 - SPARSE_BLOCK_SIZE) /* 1GB - 32 KB max */
134 #endif
135
136 #endif /* _SPARC_VALIDATE_H_ */

  ViewVC Help
Powered by ViewVC 1.1.5