From owner-p4-projects@FreeBSD.ORG Sun Jul 16 04:07:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 98E3416A4E1; Sun, 16 Jul 2006 04:07:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C0B216A4DE for ; Sun, 16 Jul 2006 04:07:18 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EC2143D45 for ; Sun, 16 Jul 2006 04:07:18 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6G47ILh072617 for ; Sun, 16 Jul 2006 04:07:18 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6G47Hbk072614 for perforce@freebsd.org; Sun, 16 Jul 2006 04:07:17 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 16 Jul 2006 04:07:17 GMT Message-Id: <200607160407.k6G47Hbk072614@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 101680 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2006 04:07:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=101680 Change 101680 by kmacy@kmacy_storage:sun4v_work_stable on 2006/07/16 04:07:03 ensure that context is set so that a trap here is attributed to the user process Affected files ... .. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/include/mmu.h#2 edit .. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/wbuf.S#2 edit Differences ... ==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/include/mmu.h#2 (text+ko) ==== @@ -85,6 +85,7 @@ * are ever valid in it (so any user access pagefaults). */ #define KCONTEXT 0 +#define CTX_OTHER_SHIFT 16 /* * FLUSH_ADDR is used in the flush instruction to guarantee stores to mmu ==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/wbuf.S#2 (text+ko) ==== @@ -145,9 +145,11 @@ wrpr %g0, %g1, %tpc add %g1, 4, %g1 wrpr %g0, %g1, %tnpc - + set trap, %g1 - mov %g5, %g2 + mov 1, %g2 + sllx %g2, CTX_OTHER_SHIFT, %g2 + or %g5, %g2, %g2 mov %g6, %g3 sub %g0, 1, %g4