From owner-cvs-all@FreeBSD.ORG Tue Sep 9 12:32:11 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 30BE616A4C0; Tue, 9 Sep 2003 12:32:11 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CF0F14400D; Tue, 9 Sep 2003 12:32:09 -0700 (PDT) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h89JW90U003913; Tue, 9 Sep 2003 12:32:09 -0700 (PDT) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h89JW9Dd003912; Tue, 9 Sep 2003 12:32:09 -0700 (PDT) Message-Id: <200309091932.h89JW9Dd003912@repoman.freebsd.org> From: Peter Wemm Date: Tue, 9 Sep 2003 12:32:09 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/amd64/amd64 exception.S machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 19:32:11 -0000 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