From owner-p4-projects@FreeBSD.ORG Sun Mar 5 02:10:26 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 2708216A423; Sun, 5 Mar 2006 02:10:26 +0000 (GMT) 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 E53A916A420 for ; Sun, 5 Mar 2006 02:10:25 +0000 (GMT) (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 96EA443D46 for ; Sun, 5 Mar 2006 02:10:25 +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 k252APMQ007129 for ; Sun, 5 Mar 2006 02:10:25 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k252APHH007126 for perforce@freebsd.org; Sun, 5 Mar 2006 02:10:25 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 5 Mar 2006 02:10:25 GMT Message-Id: <200603050210.k252APHH007126@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 92756 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, 05 Mar 2006 02:10:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=92756 Change 92756 by kmacy@kmacy_storage:sun4v_work on 2006/03/05 02:09:57 allocate 4th (and final) scratchpad to storing the active TSB real address Affected files ... .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asi.h#10 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#5 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/include/sun4v_cpufunc.h#1 add .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#15 edit .. //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/support.S#8 edit Differences ... ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asi.h#10 (text+ko) ==== @@ -128,6 +128,7 @@ #define SCRATCH_REG_MMFSA ASI_SCRATCHPAD_0_REG #define SCRATCH_REG_PCPU ASI_SCRATCHPAD_1_REG #define SCRATCH_REG_HASH ASI_SCRATCHPAD_2_REG +#define SCRATCH_REG_TSB ASI_SCRATCHPAD_3_REG #define MMU_CID_P 0x08 #define MMU_CID_S 0x10 ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/include/asmacros.h#5 (text+ko) ==== @@ -139,7 +139,12 @@ mov SCRATCH_REG_HASH, reg; \ ldxa [%g0 + reg]ASI_SCRATCHPAD, reg; +#define GET_TSB_SCRATCH(reg) \ + mov SCRATCH_REG_TSB, reg; \ + ldxa [%g0 + reg]ASI_SCRATCHPAD, reg; + #define SET_HASH_SCRATCH(reg) stxa reg, [%g0 + SCRATCH_REG_HASH]ASI_SCRATCHPAD +#define SET_TSB_SCRATCH(reg) stxa reg, [%g0 + SCRATCH_REG_TSB]ASI_SCRATCHPAD #define GET_PCB(reg) \ GET_PCPU_SCRATCH; \ ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/pmap.c#15 (text+ko) ==== @@ -451,8 +451,15 @@ kernel_pmap->pm_tsb.hvtsb_ctx_index = 0; kernel_pmap->pm_tsb.hvtsb_pgszs = TSB8K; kernel_pmap->pm_tsb.hvtsb_rsvd = 0; - kernel_pmap->pm_tsb.hvtsb_pa = kernel_td[TSB8K_INDEX].hvtsb_pa; + kernel_pmap->pm_tsb.hvtsb_pa = pa; + set_tsb_scratchpad(pa); + + /* + * Initialize kernel TSB for 4M pages + * currently (not by design) used for permanent mappings + */ + tsb_4m_size = virtsz >> (PAGE_SHIFT_4M - TTE_SHIFT); pa = pmap_bootstrap_alloc(tsb_4m_size); ==== //depot/projects/kmacy_sun4v/src/sys/sun4v/sun4v/support.S#8 (text+ko) ==== @@ -678,7 +678,14 @@ retl nop END(set_pcpu_scratchpad) +ENTRY(set_tsb_scratchpad) + mov SCRATCH_REG_TSB, %g2 + stxa %o0, [%g0 + %g2]ASI_SCRATCHPAD + retl + nop +END(set_hash_scratchpad) + /* * %o0 ra - real address * [%o1] lo - lower 64-bits