Date: Sun, 5 Mar 2006 02:10:25 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 92756 for review Message-ID: <200603050210.k252APHH007126@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603050210.k252APHH007126>