From owner-svn-src-all@FreeBSD.ORG Wed Apr 8 11:35:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FA2F106566B; Wed, 8 Apr 2009 11:35:47 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DDD48FC17; Wed, 8 Apr 2009 11:35:47 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n38BZlgI057570; Wed, 8 Apr 2009 11:35:47 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n38BZl1a057569; Wed, 8 Apr 2009 11:35:47 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200904081135.n38BZl1a057569@svn.freebsd.org> From: Takahashi Yoshihiro Date: Wed, 8 Apr 2009 11:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r190840 - head/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Apr 2009 11:35:48 -0000 Author: nyan Date: Wed Apr 8 11:35:47 2009 New Revision: 190840 URL: http://svn.freebsd.org/changeset/base/190840 Log: MFi386: revision 190617 Fill the fsbase and gsbase fields of the mcontext structure on i386. Modified: head/sys/pc98/pc98/machdep.c Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Wed Apr 8 09:02:42 2009 (r190839) +++ head/sys/pc98/pc98/machdep.c Wed Apr 8 11:35:47 2009 (r190840) @@ -525,6 +525,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, struct sigacts *psp; char *sp; struct trapframe *regs; + struct segment_descriptor *sdp; int sig; int oonstack; @@ -561,6 +562,15 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sf.sf_uc.uc_mcontext.mc_len = sizeof(sf.sf_uc.uc_mcontext); /* magic */ get_fpcontext(td, &sf.sf_uc.uc_mcontext); fpstate_drop(td); + /* + * Unconditionally fill the fsbase and gsbase into the mcontext. + */ + sdp = &td->td_pcb->pcb_gsd; + sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | + sdp->sd_lobase; + sdp = &td->td_pcb->pcb_fsd; + sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | + sdp->sd_lobase; /* Allocate space for the signal handler context. */ if ((td->td_pflags & TDP_ALTSTACK) != 0 && !oonstack && @@ -2410,6 +2420,7 @@ int get_mcontext(struct thread *td, mcontext_t *mcp, int flags) { struct trapframe *tp; + struct segment_descriptor *sdp; tp = td->td_frame; @@ -2441,6 +2452,11 @@ get_mcontext(struct thread *td, mcontext mcp->mc_ss = tp->tf_ss; mcp->mc_len = sizeof(*mcp); get_fpcontext(td, mcp); + sdp = &td->td_pcb->pcb_gsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_fsd; + mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + return (0); }