From owner-p4-projects@FreeBSD.ORG Mon May 1 06:37:44 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 2D91016A403; Mon, 1 May 2006 06:37:44 +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 E1C5616A401 for ; Mon, 1 May 2006 06:37:43 +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 9397943D46 for ; Mon, 1 May 2006 06:37:43 +0000 (GMT) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k416bhre022441 for ; Mon, 1 May 2006 06:37:43 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k416bhSc022438 for perforce@freebsd.org; Mon, 1 May 2006 06:37:43 GMT (envelope-from kmacy@freebsd.org) Date: Mon, 1 May 2006 06:37:43 GMT Message-Id: <200605010637.k416bhSc022438@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 96471 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: Mon, 01 May 2006 06:37:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=96471 Change 96471 by kmacy@kmacy_storage:sun4v_rwbuf on 2006/05/01 06:36:42 small fixes to data exception errors in the simulator Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#14 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/exception.S#45 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#14 (text+ko) ==== @@ -143,6 +143,10 @@ mov SCRATCH_REG_PCPU, PCPU_REG; \ ldxa [%g0 + PCPU_REG]ASI_SCRATCHPAD, PCPU_REG; +#define GET_PCPU_SCRATCH_SLOW(reg) \ + mov SCRATCH_REG_PCPU, reg; \ + ldxa [reg]ASI_SCRATCHPAD, PCPU_REG; + #define GET_HASH_SCRATCH_USER(reg) \ mov SCRATCH_REG_HASH_USER, reg; \ ldxa [%g0 + reg]ASI_SCRATCHPAD, reg; ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/exception.S#45 (text+ko) ==== @@ -321,7 +321,8 @@ mov MMFSA_D_ADDR, %g3 ! mov MMFSA_D_CTX, %g7 ldxa [%g1 + %g3]ASI_REAL, %g3 - ldxa [%g1 + %g7]ASI_REAL, %g4 +! ldxa [%g1 + %g7]ASI_REAL, %g4 + sub %g0, 1, %g4 or %g4, %g3, %g3 ba,pt %xcc, tl0_trap mov T_MEM_ADDRESS_NOT_ALIGNED, %g2 @@ -920,10 +921,9 @@ ENTRY(utl0) - nop SAVE_GLOBALS(%l7) SAVE_OUTS(%l7) - GET_PCPU_SCRATCH + GET_PCPU_SCRATCH_SLOW(%g6) wrpr %g0, PSTATE_KERNEL, %pstate ! enable ints brnz %o1, common_utrap @@ -945,8 +945,6 @@ sub %g6, TF_SIZEOF, %sp add %sp, REGOFF + SPOFF, %l7 ENTRY(user_rtt) - GET_PCPU_SCRATCH - ! pil handling needs to be re-visited wrpr %g0, PIL_TICK, %pil ldx [PCPU(CURTHREAD)], %l4 @@ -1101,8 +1099,8 @@ ENTRY(ktl0) nop SAVE_GLOBALS(%l7) - SAVE_OUTS(%l7) - GET_PCPU_SCRATCH + SAVE_OUTS(%l7) + GET_PCPU_SCRATCH_SLOW(%g6) ! we really shouldn't need this ... wrpr %g0, PSTATE_KERNEL, %pstate ! enable ints brnz %o1, common_ktrap @@ -1387,7 +1385,6 @@ nop save 0: - cmp %g7, 1 ! for tl > 1 bne,pn %xcc, 2f nop @@ -1579,13 +1576,15 @@ cmp %l2, %l6 bne,pt %xcc, 12f nop -#ifndef SIMULATOR +#ifndef SMP + MAGIC_TRAP_ON;MAGIC_TRAP_ON;MAGIC_EXIT ! die if all we're doing + ! is storing same data +#else PUTCHAR(0x5a) PUTCHAR(0x5a) PUTCHAR(0x5a) + MAGIC_TRAP_ON; MAGIC_TRAP_OFF #endif - MAGIC_TRAP_ON;MAGIC_TRAP_ON;MAGIC_EXIT ! die if all we're doing - ! is storing same data 12: #endif stxa %g0, [%g3 + %l4]ASI_REAL ! invalidate data