Skip to content
  1. Aug 11, 2012
    • Raymond Toy's avatar
      Move the FPU save/restore stuff from os.h to arch.h · 441a76a6
      Raymond Toy authored
       * src/lisp/os.h
         * Move macros and definitions for FPU save/restore from here.
       * src/lisp/arch.h
         * Put architecture neutral stuff from os.h here.
       * src/lisp/ppc-arch.h
       * src/lisp/sparc-arch.h
       * src/lisp/x86-arch.h
         * Implement the FPU save/restore macros here for each supported
           architecture.
      441a76a6
  2. Aug 10, 2012
    • Raymond Toy's avatar
      src/lisp/os.h: · c07cc020
      Raymond Toy authored
       src/lisp/gencgc.c:
       * Move the macros for fpu buffers from gencgc.c to here.
       src/lisp/x86-arch.c:
       * Use the new save_fpu_state instead of fpu_save.  And apply to all
         OSes.
      c07cc020
  3. Nov 04, 2011
  4. Sep 01, 2011
    • rtoy's avatar
      Add os_init0 to allow for some really early OS inits. · dafb9e03
      rtoy authored
      On Linux, os_init can re-exec lisp to set up the correct personality.
      Not normally a problem, but if any output happens before os_init is
      called, the output appears to happen twice.  So add os_init0 to do
      this early on, before any output.  This is a bit of a kludge.
      
      lisp/lisp.c:
      o Call os_init0 early in main.
      
      lisp/Linux-os.c:
      o Move the personality stuff from os_init to os_init0.
      
      lisp/Darwin-os.c:
      lisp/FreeBSD-os.c:
      lisp/NetBSD-os.c:
      lisp/OpenBSD-os.c:
      lisp/hpux-os.c:
      lisp/irix-os.c:
      lisp/mach-os.c:
      lisp/osf1-os.c:
      lisp/solaris-os.c:
      lisp/sunos-os.c:
      o Add dummy implementation of os_init0.  These OSes don't (currently)
        need anything special.
      
      lisp/os.h:
      o Declare os_init0.
      dafb9e03
  5. Dec 26, 2010
  6. Feb 01, 2010
    • rtoy's avatar
      Add declaration for convert_lisp_string to get rid of compiler warning · 68e8e5d1
      rtoy authored
      in backtrace.c about undeclared function.
      68e8e5d1
    • rtoy's avatar
      Linux-os.c: · 0f0aed07
      rtoy authored
      o Follow CMUCL coding style.
      o Argv and envp are const char*.
      
      os.h:
      lisp.c:
      Darwin-os.c:
      FreeBSD-os.c:
      NetBSD-os.c:
      OpenBSD-os.c:
      hpux-os.c:
      irix-os.c:
      mach-os.c:
      osf1-os.c:
      solaris-os.c:
      sunos-os.c:
      o argv and envp are const char *.
      0f0aed07
    • rtoy's avatar
      Patch from Stelian Ionescu on cmucl-imp, 2010/02/01: · 911be032
      rtoy authored
          When run on a kernel compiled without COMPAT_BRK CMUCL segfaults,
          so I copied the kludge used by SBCL - check the current
          personality, and if necessary, enable ADDR_NO_RANDOMIZE and
          re-exec itself.
      
      Linux-os.c:
      o Check for personality and rexec if necessary.
      
      os.h:
      o New prototype for os_init needed because it needs argv and envp.
      
      lisp.c:
      Darwin-os.c:
      FreeBSD-os.c:
      NetBSD-os.c:
      OpenBSD-os.c:
      hpux-os.c:
      irix-os.c:
      mach-os.c:
      osf1-os.c:
      solaris-os.c:
      sunos-os.c:
      o Update call to os_init, which needs argv and envp now.
      911be032
  7. Dec 10, 2008
  8. Dec 07, 2008
  9. Jan 03, 2008
    • cshapiro's avatar
      Switch the FreeBSD port to use the common floating point trap handling · 9495c516
      cshapiro authored
      code.  Rather than introduce a new FreeBSD case to the x86 sigcontext
      member accessor routines, collapse all of the system specific routines
      down to a common set of routines.
      
      * code/debug-int.lisp - Disable some Darwin-specific code to debug
        NULL mcontext pointers.
      
      * code/float-trap.lisp - Remove ancient FreeBSD-specific code for
        handling floating point signals.
      
      * code/macros.lisp, code/sap.lisp, compiler/saptran.lisp - Include the
        SAP-REF-LONG setter by default on the x86.
      
      * code/x86-vm.lisp - Remove operating system specific sigcontext
        definitions and sigcontext accessors.  Define the alien sigcontext
        as a system area pointer.  Replace the sigcontext accessors with
        foreign function calls that mask the complexity of the underlying
        sigcontext member access.
      
      * compiler/x86/float.lisp - Unconditionally define STORE-LONG-FLOAT.
        This function is used by the %SET-SAP-REF-LONG VOP that underlies
        the SAP-REF-LONG setter.
      
      * compiler/x86/sap.lisp - Unconditionally define %SET-SAP-REF-LONG.
        In the case where there is not a distinct LONG-FLOAT type, admit
        DOUBLE-FLOAT values instead.  The x87 automatically widens values
        pushed onto stack.  This mirrors the behavior of the SAP-REF-LONG
        VOP.
      
      * lisp/Darwin-os.c, lisp/Linux-os.c - Define functions to access
        sigcontext members of interest to Lisp.  Delete the sc_reg function
        and replace its uses with os_sigcontext_reg which is more suitably
        typed.
      
      * lisp/FreeBSD-os.c - Define functions to access sigcontext members of
        interest to Lisp.  We need to be careful about the SSE and non-SSE
        cases for retrieving x87 registers from the saved machine state.
        Define a low-level SIGFPE handler to intercept floating point traps
        and restore the cleared status word bits based on the signal code.
        Get rid of sc_reg for the reasons noted above.
      
      * lisp/Darwin-os.h, lisp/FreeBSD-os.h - Declare the restore_fpu
        function and define a specialized RESTORE_FPU macro.  Remove the
        sc_reg prototype.
      
      * lisp/Linux-os.h - Remove the sc_reg prototype.
      
      * lisp/os.h - Add prototypes for the new os_sigcontext functions.
      
      * lisp/x86-lispregs.h - Redefine SC_REG and SC_PC to expand out to the
        new os_sigcontext functions.  Redfine SC_SP to expand out to SC_REG.
        Eliminate all platform-specific defintions of SC_PC and SC_SP.
      9495c516
  10. Dec 14, 2007
  11. Nov 16, 2007
  12. Jan 01, 2007
  13. Sep 15, 2005
  14. Jan 13, 2005
  15. Jul 13, 2004
    • pmai's avatar
      First merge of the C side of the OS X/Darwin port. Besides adding Darwin · eb44537a
      pmai authored
      versions of all the required things, this commit separates the
      interrupt handler proper (now interrupt_handle_now_handler) from the
      actual work-horse (interrupt_handle_now), which is now only ever called
      from the two interrupt handlers, interrupt_handle_now_handler and
      maybe_now_maybe_later.  This follows similar changes in SBCL, and is in
      fact needed in order to properly use sigreturn in signal handlers, as
      required to work around a problem with the G5.
      eb44537a
  16. Jul 07, 2004
  17. May 29, 2003
    • toy's avatar
      Add control-stack checking for Sparc. Based on work from SBCL. · 72f0aa1e
      toy authored
      	* lisp/sunos-os.h (PROTECTION_VIOLATION_SIGNAL): Define it for
      	stack-checking.
      
      	* lisp/solaris-os.c (segv_handler): Add stack-checking support for
      	Solaris.
      
      	* lisp/os.h (os_control_stack_overflow): Give a type name to the
      	zone enums (mostly for the debugger).
      
      	* lisp/os-common.c (guard_zones): Add stack-checking support for
      	Solaris.
      	(os_control_stack_overflow): Add stack-checking support for
      	Solaris.
      
      	* lisp/interrupt.c (build_fake_control_stack_frame): New function
      	for building a stack frame without the foreign call stuff.  Used
      	for stack checking.
      	(interrupt_install_low_level_handler): Only need to install
      	alternate signal stack for x86.
      
      	* lispinit.lisp:
      	(scrub-control-stack): Rename to %scrub-control-stack to match x86
      	version so control stack guard is done.
      
      	* parms.lisp (static-symbols): Added new static symbols for
      	control stack checking.
      72f0aa1e
  18. Mar 23, 2003
    • gerd's avatar
      Optional control stack checking. This is controlled by the · 670d643f
      gerd authored
      	feature :stack-checking because it's not implemented for other
      	systems/architectures yet.  It is currently known to work on
      	FreeBSD 4.8-RC/x86 and Debian 2.2.20/x86.
      
      	* bootfiles/18e/boot3.lisp: New boot file, well, only a
      	description of the boot procedure since no boot file is needed.
      
      	* lisp/x86-validate.h (SIGNAL_STACK_START, SIGNAL_STACK_SIZE)
      	[__FreeBSD__, __linux__]: New defines.
      	(CONTROL_STACK_SIZE) {__FreeBSD__, __linux__]:
      	Adjust for signal stack.
      
      	* lisp/validate.c (validate) [RED_ZONE_HIT]: Call
      	os_guard_control_stack.  Some cleanup.
      
      	* lisp/os.h (BOTH_ZONES, YELLOW_ZONE, RED_ZONE): New enums.
      	Add function prototypes.
      
      	* lisp/interrupt.c (interrupt_install_low_level_handler)
      	[RED_ZONE_HIT]: Deliver protection violations on a dedicated
      	signal stack.
      
      	* lisp/os-common.c (os_stack_grows_down_1, os_stack_grows_down):
      	New functions.
      	(guard_zones, control_stack_zone, os_guard_control_stack)
      	(os_control_stack_overflow) [RED_ZONE_HIT]: New functions.
      	(os_control_stack_overflow) [!RED_ZONE_HIT]: Dummy function.
      
      	* lisp/Linux-os.c (sigsegv_handler) [RED_ZONE_HIT]: Handle control
      	stack overflows.
      
      	* lisp/FreeBSD-os.c: General cleansing.
      	(sigbus_handler) [RED_ZONE_HIT]: Handle control stack overflows.
      
      	* lisp/FreeBSD-os.h (PROTECTION_VIOLATION_SIGNAL): New define.
      
      	* lisp/Linux-os.h (PROTECTION_VIOLATION_SIGNAL): New define.
      
      	* compiler/x86/system.lisp (lisp::%scrub-control-stack): Change
      	defknown from sys:scrub-control-stack.
      	(%scrub-control-stack): Rename VOP.
      
      	* code/lispinit.lisp (os-guard-control-stack) [#+stack-checking]:
      	Define alien os_guard_control_stack.
      	(%scrub-control-stack) [#+x86]: New function.
      	(scrub-control-stack) [#+x86]: Call %scrub-control-stack,
      	call os-guard-control-stack if #+stack-checking.
      
      	* code/interr.lisp (yellow-zone-hit,
      	red-zone-hit) [#+stack-checking]: New functions.
      
      	* code/error.lisp (stack-overflow) [#+stack-checking]: New
      	condition.
      
      	* compiler/generic/new-genesis.lisp (finish-symbols)
      	[#+stack-checking]: Add symbols for control stack checking.
      
      	* compiler/x86/parms.lisp (static-symbols): Likewise.
      670d643f
  19. Aug 27, 2002
    • moore's avatar
      · bf84be07
      moore authored
      On x86 FreeBSD and Linux, change the way foreign symbol addresses are resolved.
      They now go through a table -- effectively a new space in the core file.
      Function references are resolved lazily, data references are resolved on startup
      and when a .so is loaded.  The end result is that cores can be dumped that
      contain references to symbols in shared libraries.  Also, the dependence of the core on addresses in the Lisp runtime is broken.
      
      The linkage table feature is controlled by :linkage-table and LINKAGE_TABLE in C
      runtime.  Several foreign symbols are now Lisp static symbols, so a cross
      compile is required whether or not the new stuff is used.  I've checked in
      boot4-cross-foreign-linkage.lisp that builds the compiler for linkage table; do whatever you usually do for the non-linkage table case:)  Seriously, lets start
      a discussion on standardizing "cross compilation," not to mention the general
      build procedure.
      bf84be07
  20. Jan 28, 2002
    • pmai's avatar
      Added specialised port to NetBSD (1.5.2) on x86. Since the code-base · 4ea11535
      pmai authored
      was already cleaned up with the OpenBSD port, this doesn't require
      massive changes.
      
      Since current NetBSD is ELF-based by default, we don't make use of the
      ELF feature, or in other words:  The presence of the NetBSD feature
      implies ELF, since there is no support for non-ELF NetBSD.
      4ea11535
  21. Dec 06, 2001
    • pmai's avatar
      Added specialised port to OpenBSD (2.9). Many parts of the original · 195461c1
      pmai authored
      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.
      195461c1
  22. Apr 12, 2000
  23. Jan 21, 1997
  24. Oct 25, 1994
  25. Oct 24, 1994
  26. Jul 05, 1994
  27. Mar 27, 1994
  28. Jul 27, 1993
  29. Jan 13, 1993
  30. Jul 28, 1992