From owner-p4-projects@FreeBSD.ORG Sun May 20 22:08:26 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0F7381065673; Sun, 20 May 2012 22:08:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C62291065670 for ; Sun, 20 May 2012 22:08:25 +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 AD5F78FC0A for ; Sun, 20 May 2012 22:08:25 +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 q4KM8Pti057225 for ; Sun, 20 May 2012 22:08:25 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 q4KM8PLR057222 for perforce@freebsd.org; Sun, 20 May 2012 22:08:25 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 20 May 2012 22:08:25 GMT Message-Id: <201205202208.q4KM8PLR057222@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 211453 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 22:08:26 -0000 http://p4web.freebsd.org/@@211453?ac=10 Change 211453 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/05/20 22:07:24 Slight further reordering of locore -- no functional effect on CHERI, but on principle better to configure kernel memory cache coherency before starting to use CP2, rather than after. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/locore.S#4 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/locore.S#4 (text+ko) ==== @@ -137,19 +137,27 @@ mtc0 t2, MIPS_COP_0_STATUS COP0_SYNC + /* Make sure KSEG0 is cached */ + li t0, MIPS_CCA_CACHED + mtc0 t0, MIPS_COP_0_CONFIG + 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 + + /* + * Initialise saved user $c0 so we can later restore it. + * + * XXXRW: This will be removed once we more explicitly manage user + * thread capabilities. + */ + cmove $c27, $c0 # #endif - /* Make sure KSEG0 is cached */ - li t0, MIPS_CCA_CACHED - mtc0 t0, MIPS_COP_0_CONFIG - COP0_SYNC - /*xxximp * now that we pass a0...a3 to the platform_init routine, do we need * to stash this stuff here?