0.pre7.54:
[sbcl.git] / src / compiler / x86 / parms.lisp
index e342bf8..39f40e5 100644 (file)
 ;;;   * On FreeBSD,
 ;;;     ** The space 0x0E000000-0x10000000 is "Foreign segment".
 ;;;     ** The space 0x20000000-0x30000000 is reserved for shared libs.
-;;; And there have been a few changes since the fork:
+;;; And there have been some changes since the fork from CMU CL:
+;;;   * The OpenBSD port is new since the fork. We started with
+;;;     the FreeBSD address map, which actually worked until the
+;;;     Alpha port patches, for reasons which in retrospect are rather
+;;;     mysterious. After the Alpha port patches were added, the
+;;;     OpenBSD port suffered memory corruption problems. While
+;;;     debugging those, it was discovered that src/runtime/trymap
+;;;     failed for the control stack region #x40000000-#x47fff000.
+;;;     After the control stack was moved upward out of this region
+;;;     (stealing some bytes from dynamic space) the problems went
+;;;     away.
 ;;;   * The FreeBSD STATIC-SPACE-START value was bumped up from
 ;;;     #x28000000 to #x30000000 when FreeBSD ld.so dynamic linking
 ;;;     support was added for FreeBSD ca. 20000910. This was to keep from
-;;;     stomping on an address range that the dynamic libraries want to use. 
-;;;     (They want to use this address range even if we try to reserve it
-;;;     with a call to validate() as the first operation in main().)
+;;;     stomping on an address range that the dynamic libraries want to
+;;;     use. (They want to use this address range even if we try to
+;;;     reserve it with a call to validate() as the first operation in
+;;;     main().)
+
 #!+linux
 (progn
 
   (defconstant binding-stack-start   #x38000000)
   (defconstant binding-stack-end     #x3ffff000)
 
-  (defconstant control-stack-start   #x40000000)
-  (defconstant control-stack-end     #x47fff000)
-
-  (defconstant dynamic-space-start   #x48000000)
+  (defconstant control-stack-start
+    #+freebsd #x40000000
+    #+openbsd #x48000000)
+  (defconstant control-stack-end
+    #+freebsd #x47fff000
+    #+openbsd #x4ffff000)
+  (defconstant dynamic-space-start
+    #+freebsd #x48000000
+    #+openbsd #x50000000)
   (defconstant dynamic-space-end     #x88000000))
 
 ;;; Given that NIL is the first thing allocated in static space, we
   error
   cerror
   breakpoint
-  function-end-breakpoint
+  fun-end-breakpoint
   single-step-breakpoint)
 ;;; FIXME: It'd be nice to replace all the DEFENUMs with something like
 ;;;   (WITH-DEF-ENUM (:START 8)
 ;;;     Note these spaces grow from low to high addresses.
 (defvar *allocation-pointer*)
 (defvar *binding-stack-pointer*)
-(defvar *x86-cgc-active-p*) ; FIXME: Document this.
-(defvar *static-blue-bag* nil)
 
 ;;; FIXME: *!INITIAL-FDEFN-OBJECTS* and !COLD-INIT probably don't need
 ;;; to be in the static symbols table any more. Also, if
     sb!impl::*!initial-fdefn-objects*
 
     ;; functions that the C code needs to call
-    sb!impl::!cold-init
-    sb!impl::maybe-gc
+    maybe-gc
     sb!kernel::internal-error
     sb!di::handle-breakpoint
-    sb!impl::fdefinition-object
+    fdefinition-object
 
     ;; free pointers
     ;; 
     *initial-dynamic-space-free-pointer*
 
     ;; things needed for non-local exit
-    sb!impl::*current-catch-block*
-    sb!impl::*current-unwind-protect-block*
-    sb!c::*eval-stack-top*
+    *current-catch-block*
+    *current-unwind-protect-block*
+    *eval-stack-top*
     sb!vm::*alien-stack*
 
     ;; interrupt handling
-    sb!impl::*pseudo-atomic-atomic*
-    sb!impl::*pseudo-atomic-interrupted*
+    *pseudo-atomic-atomic*
+    *pseudo-atomic-interrupted*
     sb!unix::*interrupts-enabled*
     sb!unix::*interrupt-pending*
-    sb!impl::*free-interrupt-context-index*
+    *free-interrupt-context-index*
 
     sb!vm::*allocation-pointer*
     sb!vm::*binding-stack-pointer*
     sb!vm::*fp-constant-lg2*
     sb!vm::*fp-constant-ln2*
 
-    ;; used by gencgc
-    sb!vm::*scavenge-read-only-space*
-
     ;; The ..SLOT-UNBOUND.. symbol is static in order to optimise the
     ;; common slot unbound check.
-    sb!pcl::..slot-unbound..
-
-    ;; spare symbols
-    sb!vm::spare-10
-    sb!vm::spare-9
-    sb!vm::spare-8
-    sb!vm::spare-7
-    sb!vm::spare-6
-    sb!vm::spare-5
-    sb!vm::spare-4
-    sb!vm::spare-3
-    sb!vm::spare-2
-    sb!vm::spare-1
-
-    ;; used by cgc
-    sb!vm::*x86-cgc-active-p*
-    sb!vm::*static-blue-bag*           ; must be last or change C code
-    ))
+    ;;
+    ;; FIXME: In SBCL, the CLOS code has become sufficiently tightly
+    ;; integrated into the system that it'd probably make sense to use
+    ;; the ordinary unbound marker for this.
+    sb!pcl::..slot-unbound..))
 
 (defparameter *static-functions*
   '(length