From owner-p4-projects@FreeBSD.ORG Sun May 20 15:13:54 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 869F81065674; Sun, 20 May 2012 15:13:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BC241065670 for ; Sun, 20 May 2012 15:13:54 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 230AB8FC0A for ; Sun, 20 May 2012 15:13:54 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q4KFDrhH075277 for ; Sun, 20 May 2012 15:13:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q4KFDr7I075274 for perforce@freebsd.org; Sun, 20 May 2012 15:13:53 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 20 May 2012 15:13:53 GMT Message-Id: <201205201513.q4KFDr7I075274@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 211436 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 May 2012 15:13:54 -0000 http://p4web.freebsd.org/@@211436?ac=10 Change 211436 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/05/20 15:13:52 Don't try to save $c0 until after CP2 is enabled. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/locore.S#3 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/locore.S#3 (text+ko) ==== @@ -126,14 +126,6 @@ #endif #endif -#if defined(CPU_CHERI) - /* - * On CHERI MIPS, preserve the kernel's data segment context for use - * in exception handlers. $kcc will be preserved by the first eret. - */ - cmove $c30, $c0 # Preserve $kdc -#endif - /* * Read coprocessor 0 status register, clear bits not * preserved (namely, clearing interrupt bits), and set @@ -145,6 +137,14 @@ mtc0 t2, MIPS_COP_0_STATUS COP0_SYNC +#if defined(CPU_CHERI) + /* + * On CHERI MIPS, preserve the kernel's data segment context for use + * in exception handlers. $kcc will be preserved by the first eret. + */ + cmove $c30, $c0 # Preserve $kdc +#endif + /* Make sure KSEG0 is cached */ li t0, MIPS_CCA_CACHED mtc0 t0, MIPS_COP_0_CONFIG