Finish splitting out x86-validate into separate OS versions.
[projects/cmucl/cmucl.git] / src / lisp / x86-validate-netbsd.h
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  */
7
8 #ifndef _X86_VALIDATE_NETBSD_H_
9 #define _X86_VALIDATE_NETBSD_H_
10
11 /*
12  * Also look in compiler/x86/parms.lisp for some of the parameters.
13  *
14  * Address map:
15  *  NetBSD:
16  *      0x00000000->0x0E000000  224M C program and memory allocation.
17  *      0x0E000000->0x10000000   32M Foreign segment.
18  *      0x10000000->0x20000000  256M Read-Only Space.
19  *      0x28000000->0x38000000  256M Static Space.
20  *      0x38000000->0x40000000  128M Binding stack growing up.
21  *      0x40000000->0x48000000  128M Control stack growing down.
22  *      0x48800000->0xB0000000 1656M Dynamic Space.
23  *      0xB0000000->0xB1000000   16M Foreign Linkage Table
24  *      0xE0000000->            256M C stack - Alien stack.
25  *
26  */
27
28 #define READ_ONLY_SPACE_START   (SpaceStart_TargetReadOnly)
29 #define READ_ONLY_SPACE_SIZE    (0x0ffff000)    /* 256MB - 1 page */
30
31 #define STATIC_SPACE_START      (SpaceStart_TargetStatic)
32 #define STATIC_SPACE_SIZE       (0x0ffff000)    /* 256MB - 1 page */
33
34 #define BINDING_STACK_START     (0x38000000)
35 #define BINDING_STACK_SIZE      (0x07fff000)    /* 128MB - 1 page */
36
37 #define CONTROL_STACK_START     (0x40000000)
38
39 #define CONTROL_STACK_SIZE      (0x07fd8000)    /* 128MB - SIGSTKSZ */
40
41 #define SIGNAL_STACK_START      (0x47fd8000)
42 #define SIGNAL_STACK_SIZE       SIGSTKSZ
43
44 #define DYNAMIC_0_SPACE_START   (SpaceStart_TargetDynamic)
45
46 #ifdef GENCGC
47 #define DYNAMIC_SPACE_SIZE      (0x67800000U)   /* 1.656GB */
48 #else
49 #define DYNAMIC_SPACE_SIZE      (0x04000000U)   /* 64MB */
50 #endif
51
52 #define DEFAULT_DYNAMIC_SPACE_SIZE      (0x20000000U)   /* 512MB */
53
54 #ifdef LINKAGE_TABLE
55 #define FOREIGN_LINKAGE_SPACE_START (LinkageSpaceStart)
56 #define FOREIGN_LINKAGE_SPACE_SIZE (0x100000)   /* 1MB */
57 #endif
58
59 #endif