Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Sep 2003 12:32:09 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/amd64/amd64 exception.S machdep.c
Message-ID:  <200309091932.h89JW9Dd003912@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
peter       2003/09/09 12:32:09 PDT

  FreeBSD src repository

  Modified files:
    sys/amd64/amd64      exception.S machdep.c 
  Log:
  Clean up get/set_mcontext() and get/set_fpcontext().  These are operated
  on data structures on the kernel stack which are guaranteed to be 16 byte
  aligned by gcc, the amd64 ABI and __aligned(16).
  
  Ensire the tss_rsp0 initial stack pointer is 16 byte aligned in case
  sizeof(pcb) becomes odd at some point.  This is convenient for the
  interrupt handler case because the ring crossing pushes cause the
  required odd alignment before the call to the C code.
  
  Have fast_syscall add an additional 8 bytes to ensure that the trapframe
  has the correct odd alignment for the call to C code.  Note that there are
  no checks to make sure that the trapframe size is appropriate for this.
  
  This makes get/setfpcontext work properly (finally).  You get a GPF in
  kernel mode if any of this is botched without the alignment fixup code
  that is apparently needed on i386.
  
  Revision  Changes    Path
  1.111     +2 -2      src/sys/amd64/amd64/exception.S
  1.589     +28 -64    src/sys/amd64/amd64/machdep.c



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