From owner-svn-src-user@FreeBSD.ORG Wed Mar 17 08:55:30 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 562371065676; Wed, 17 Mar 2010 08:55:30 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D2A48FC21; Wed, 17 Mar 2010 08:55:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2H8tUCw053339; Wed, 17 Mar 2010 08:55:30 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2H8tUsW053337; Wed, 17 Mar 2010 08:55:30 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201003170855.o2H8tUsW053337@svn.freebsd.org> From: Juli Mallett Date: Wed, 17 Mar 2010 08:55:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205247 - user/jmallett/octeon/sys/mips/mips X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2010 08:55:30 -0000 Author: jmallett Date: Wed Mar 17 08:55:29 2010 New Revision: 205247 URL: http://svn.freebsd.org/changeset/base/205247 Log: Enable 64-bit operations for threads as well. There are a multitude of sins surrounding this that are not yet fixed, including: o) The multiple copies of status register and other coprocessor-related bits. o) The fact that all of these bits are spelled out here at all rather than included in some KERNEL_STATUS and USER_STATUS definitions. o) The fact that these things are under "TARGET_OCTEON" rather than something related to ABI, since the only thing that should restrict whether user programs can use 64-bit instructions is whether the kernel can save and restore 64-bit registers. o) The fact that many things here enable 64-bit virtual addresses for supervisor mode, which FreeBSD has never used (although we can and should consider repurposing those address spaces when the time is right.) o) All of the duplication of logic wrt setting up PCBs and trapframes in this file. (To say nothing of the varying styles that makes it easy to miss these differences.) o) The lack of any assertions about the state of the status register for user threads with INVARIANTS on. Sponsored by: Packet Forensics Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c Modified: user/jmallett/octeon/sys/mips/mips/vm_machdep.c ============================================================================== --- user/jmallett/octeon/sys/mips/mips/vm_machdep.c Wed Mar 17 07:26:59 2010 (r205246) +++ user/jmallett/octeon/sys/mips/mips/vm_machdep.c Wed Mar 17 08:55:29 2010 (r205247) @@ -425,7 +425,7 @@ cpu_set_upcall_kse(struct thread *td, vo tf->sr = SR_KSU_USER | SR_EXL | (SR_INT_MASK & mips_rd_status()) | MIPS_SR_INT_IE; #ifdef TARGET_OCTEON - tf->sr |= MIPS_SR_INT_IE | MIPS_SR_COP_0_BIT | MIPS_SR_UX | + tf->sr |= MIPS_SR_INT_IE | MIPS_SR_COP_0_BIT | MIPS32_SR_PX | MIPS_SR_UX | MIPS_SR_KX; #endif /* tf->sr |= (ALL_INT_MASK & idle_mask) | SR_INT_ENAB; */