Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Oct 2001 09:36:08 -0700 (PDT)
From:      Jake Burkholder <jake@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sparc64/sparc64 locore.s machdep.c
Message-ID:  <200110201636.f9KGa8I79303@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jake        2001/10/20 09:36:08 PDT

  Modified files:
    sys/sparc64/sparc64  locore.s machdep.c 
  Log:
  Align the symbol that demarks the end of the signal code on a 16 byte
  boundary.  It must be on at least an 8 byte boundary so that the length
  of the signal code is a multiple of 8 (well aligned).  The size is used
  in the calculation of the address of the argument and environment vectors
  on the user stack; getting it wrong results in the string pointers being
  misaligned and causes alignment faults in getenv() among other things.
  
  Allocate a regular stack frame below the signal frame on the user stack
  and join up the frame pointer to the previous frame.  This fixes longjmp-ing
  out of signal handlers.  Longjmp traverses the stack upwards in order to
  find the right frame to return to, so the frame pointers must join up
  seamlessly.  I thought this would just work, but obviously the frame
  needs to be below the signal frame, not above it like before.  Account
  for the extra space in the signal code.
  
  Preload pointers to interrupt data structures in interrupt globals.
  This avoids the need to load the pointers from memory in the vectored
  interrupt trap handler.
  
  Transfer the first 2 out registers into td_retval in setregs.  We use
  the same registers for system call arguments as return values, so these
  registers got clobbered by the system call return values on return from
  execve.  They now get clobbered by the right values.  We must put the values
  in both the out registers in the trapframe and in td_retval because init
  calls exec but fails to transfer the return value into the out registers.
  This fixes a bug where the first exec after init would pass junk to the
  c runtime, instead of a pointer to the argument strings.  A better solution
  would be to return EJUSTRETURN on success from execve.
  
  Adjust for change in pmap_bootstraps prototype.
  
  Map the message buffer after the trap table is setup.  We will fault
  on it immediately.
  
  Revision  Changes    Path
  1.9       +3 -2      src/sys/sparc64/sparc64/locore.s
  1.18      +28 -13    src/sys/sparc64/sparc64/machdep.c


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110201636.f9KGa8I79303>