xref: /titanic_44/usr/src/uts/sun4u/ml/zulu_hat_asm.s (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate/*
2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate *
4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate * with the License.
8*7c478bd9Sstevel@tonic-gate *
9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate *
14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate *
20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate */
22*7c478bd9Sstevel@tonic-gate/*
23*7c478bd9Sstevel@tonic-gate * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate */
26*7c478bd9Sstevel@tonic-gate
27*7c478bd9Sstevel@tonic-gate#pragma ident	"%Z%%M%	%I%	%E% SMI"
28*7c478bd9Sstevel@tonic-gate
29*7c478bd9Sstevel@tonic-gate#if defined(lint)
30*7c478bd9Sstevel@tonic-gate#include <sys/types.h>
31*7c478bd9Sstevel@tonic-gate#include <sys/thread.h>
32*7c478bd9Sstevel@tonic-gate#else	/* lint */
33*7c478bd9Sstevel@tonic-gate#include "assym.h"
34*7c478bd9Sstevel@tonic-gate#endif	/* lint */
35*7c478bd9Sstevel@tonic-gate
36*7c478bd9Sstevel@tonic-gate#include <sys/asi.h>
37*7c478bd9Sstevel@tonic-gate#include <sys/machasi.h>
38*7c478bd9Sstevel@tonic-gate#include <sys/asm_linkage.h>
39*7c478bd9Sstevel@tonic-gate#include <zuluvm_offsets.h>
40*7c478bd9Sstevel@tonic-gate#include <sys/zulu_hat.h>
41*7c478bd9Sstevel@tonic-gate#include <sys/zuluvm.h>
42*7c478bd9Sstevel@tonic-gate
43*7c478bd9Sstevel@tonic-gate/*
44*7c478bd9Sstevel@tonic-gate * function to look up ttes in zulu_hat TSB.
45*7c478bd9Sstevel@tonic-gate *
46*7c478bd9Sstevel@tonic-gate * zulu_hat_tsb_lookup_tl1 is called from the zuluvm dmv interrupt handler
47*7c478bd9Sstevel@tonic-gate * so we can only use the global registers.
48*7c478bd9Sstevel@tonic-gate *
49*7c478bd9Sstevel@tonic-gate * zulu_hat_tsb_lookup_tl0 is called from TL=0
50*7c478bd9Sstevel@tonic-gate */
51*7c478bd9Sstevel@tonic-gate#ifdef lint
52*7c478bd9Sstevel@tonic-gate
53*7c478bd9Sstevel@tonic-gate/* ARGSUSED */
54*7c478bd9Sstevel@tonic-gateuint64_t
55*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_lookup_tl1(caddr_t vaddr)
56*7c478bd9Sstevel@tonic-gate{
57*7c478bd9Sstevel@tonic-gate	return (0);
58*7c478bd9Sstevel@tonic-gate}
59*7c478bd9Sstevel@tonic-gate
60*7c478bd9Sstevel@tonic-gate/* ARGSUSED */
61*7c478bd9Sstevel@tonic-gateuint64_t
62*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_lookup_tl0(struct zulu_hat *zhat, caddr_t vaddr)
63*7c478bd9Sstevel@tonic-gate{
64*7c478bd9Sstevel@tonic-gate	return (0);
65*7c478bd9Sstevel@tonic-gate}
66*7c478bd9Sstevel@tonic-gate
67*7c478bd9Sstevel@tonic-gate#else	/* lint */
68*7c478bd9Sstevel@tonic-gate
69*7c478bd9Sstevel@tonic-gate	/*
70*7c478bd9Sstevel@tonic-gate	 * %g1 - vaddr | ctx
71*7c478bd9Sstevel@tonic-gate	 * %g3 - return address
72*7c478bd9Sstevel@tonic-gate	 * Must preserve %g7 for caller
73*7c478bd9Sstevel@tonic-gate	 *
74*7c478bd9Sstevel@tonic-gate	 * returns:
75*7c478bd9Sstevel@tonic-gate	 * %g1 - pfn and flags
76*7c478bd9Sstevel@tonic-gate	 * %g2 - zuluvm error code if %g1 is null
77*7c478bd9Sstevel@tonic-gate	 */
78*7c478bd9Sstevel@tonic-gate	ENTRY_NP(zulu_hat_tsb_lookup_tl1)
79*7c478bd9Sstevel@tonic-gate	set	ZULU_CTX_MASK, %g4
80*7c478bd9Sstevel@tonic-gate	and	%g1, %g4, %g4
81*7c478bd9Sstevel@tonic-gate
82*7c478bd9Sstevel@tonic-gate	! we're at trap level 1, (TL=1)
83*7c478bd9Sstevel@tonic-gate	! if the context is already locked by another
84*7c478bd9Sstevel@tonic-gate	! thread, punt to the TL=0 code
85*7c478bd9Sstevel@tonic-gate	! it's not safe to spinloop now.
86*7c478bd9Sstevel@tonic-gate
87*7c478bd9Sstevel@tonic-gate	set	zulu_ctx_tab, %g6
88*7c478bd9Sstevel@tonic-gate	sllx	%g4, 3, %g5
89*7c478bd9Sstevel@tonic-gate#ifdef DEBUG
90*7c478bd9Sstevel@tonic-gate	mov	%g5, %g2	! remember ctx * 8
91*7c478bd9Sstevel@tonic-gate#endif
92*7c478bd9Sstevel@tonic-gate	add	%g5, %g6, %g6
93*7c478bd9Sstevel@tonic-gate
94*7c478bd9Sstevel@tonic-gate	ldx	[%g6], %g4
95*7c478bd9Sstevel@tonic-gate	andcc	%g4, 1, %g0
96*7c478bd9Sstevel@tonic-gate	bne,a,pn %icc, ctx_busy
97*7c478bd9Sstevel@tonic-gate	  mov	ZULUVM_CTX_LOCKED, %g2
98*7c478bd9Sstevel@tonic-gate
99*7c478bd9Sstevel@tonic-gate	! now do a compare and swap and make sure it's still not locked
100*7c478bd9Sstevel@tonic-gate	or	%g4, 1, %g5
101*7c478bd9Sstevel@tonic-gate	casxa	[%g6]ASI_N, %g4, %g5
102*7c478bd9Sstevel@tonic-gate	cmp	%g4, %g5
103*7c478bd9Sstevel@tonic-gate	bne,a,pn %icc, ctx_busy
104*7c478bd9Sstevel@tonic-gate	  mov	ZULUVM_CTX_LOCKED, %g2
105*7c478bd9Sstevel@tonic-gate
106*7c478bd9Sstevel@tonic-gate	brz,a,pn %g4, zulu_hat_tsb_exit
107*7c478bd9Sstevel@tonic-gate	  mov	%g0, %g1
108*7c478bd9Sstevel@tonic-gate
109*7c478bd9Sstevel@tonic-gate	! we have the lock now proceed
110*7c478bd9Sstevel@tonic-gate
111*7c478bd9Sstevel@tonic-gate	! set lsb of g3 to indicate that we need to unlock the context
112*7c478bd9Sstevel@tonic-gate	! before returning
113*7c478bd9Sstevel@tonic-gate	ba,pt	%xcc, zulu_hat_tsb_lookup
114*7c478bd9Sstevel@tonic-gate	  or	%g3, 1, %g3
115*7c478bd9Sstevel@tonic-gate
116*7c478bd9Sstevel@tonic-gatectx_busy:
117*7c478bd9Sstevel@tonic-gate	mov	%g0, %g1
118*7c478bd9Sstevel@tonic-gate	jmpl	%g3+8, %g0
119*7c478bd9Sstevel@tonic-gate	nop
120*7c478bd9Sstevel@tonic-gate
121*7c478bd9Sstevel@tonic-gate
122*7c478bd9Sstevel@tonic-gate	/*
123*7c478bd9Sstevel@tonic-gate	 * zulu_hat_tsb_lookup_tl0 jumps here
124*7c478bd9Sstevel@tonic-gate	 *
125*7c478bd9Sstevel@tonic-gate	 * %g1 vaddr | ctx
126*7c478bd9Sstevel@tonic-gate	 * %g3 return address | unlock flag (bit zero)
127*7c478bd9Sstevel@tonic-gate	 * %g4 has the zulu hat ptr (locked)
128*7c478bd9Sstevel@tonic-gate	 */
129*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_lookup:
130*7c478bd9Sstevel@tonic-gate	mov	%g1, %g2
131*7c478bd9Sstevel@tonic-gate	mov     %g4, %g1
132*7c478bd9Sstevel@tonic-gate
133*7c478bd9Sstevel@tonic-gate	add	%g1, ZULU_HAT_TSB_SZ, %g5
134*7c478bd9Sstevel@tonic-gate	lduh	[%g5], %g5		! tsb size
135*7c478bd9Sstevel@tonic-gate	sub	%g5, 1, %g5
136*7c478bd9Sstevel@tonic-gate
137*7c478bd9Sstevel@tonic-gate	srlx    %g2, 22,  %g4		! 4m page hash
138*7c478bd9Sstevel@tonic-gate	and     %g5, %g4, %g4           ! hash index
139*7c478bd9Sstevel@tonic-gate	sllx    %g4, 4, %g4
140*7c478bd9Sstevel@tonic-gate	add     %g1, ZULU_HAT_TSB, %g5
141*7c478bd9Sstevel@tonic-gate	ldx     [%g5], %g5
142*7c478bd9Sstevel@tonic-gate	add     %g5, %g4, %g4           ! ptr to struct zulu_tte
143*7c478bd9Sstevel@tonic-gate	ldx     [%g4], %g5              ! get the tag
144*7c478bd9Sstevel@tonic-gate
145*7c478bd9Sstevel@tonic-gate	set	(0x1ff << 13), %g6
146*7c478bd9Sstevel@tonic-gate	andn	%g5, %g6, %g5
147*7c478bd9Sstevel@tonic-gate	andn    %g2, %g6, %g6
148*7c478bd9Sstevel@tonic-gate	cmp     %g5, %g6
149*7c478bd9Sstevel@tonic-gate	bne,pn  %xcc, zulu_hat_tsb_try_512k
150*7c478bd9Sstevel@tonic-gate          nop
151*7c478bd9Sstevel@tonic-gate
152*7c478bd9Sstevel@tonic-gate	ldx     [%g4 + 8], %g4          ! flags and pfn
153*7c478bd9Sstevel@tonic-gate	brgez,pn %g4, zulu_hat_tsb_try_512k ! check if entry is valid
154*7c478bd9Sstevel@tonic-gate	  nop
155*7c478bd9Sstevel@tonic-gate
156*7c478bd9Sstevel@tonic-gate	sllx	%g4, 2, %g5
157*7c478bd9Sstevel@tonic-gate	srlx	%g5, 61, %g5		! tte size
158*7c478bd9Sstevel@tonic-gate	cmp	%g5, ZULU_TTE4M
159*7c478bd9Sstevel@tonic-gate	be,pn   %xcc, zulu_hat_tsb_found
160*7c478bd9Sstevel@tonic-gate	  nop
161*7c478bd9Sstevel@tonic-gate
162*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_try_512k:
163*7c478bd9Sstevel@tonic-gate	add     %g1, ZULU_HAT_TSB_SZ, %g5
164*7c478bd9Sstevel@tonic-gate        lduh    [%g5], %g5              ! tsb size
165*7c478bd9Sstevel@tonic-gate        sub     %g5, 1, %g5
166*7c478bd9Sstevel@tonic-gate
167*7c478bd9Sstevel@tonic-gate	srlx    %g2, 19, %g4           ! 4m page hash
168*7c478bd9Sstevel@tonic-gate        and     %g5, %g4, %g4           ! hash index
169*7c478bd9Sstevel@tonic-gate        sllx    %g4, 4, %g4
170*7c478bd9Sstevel@tonic-gate        add     %g1, ZULU_HAT_TSB, %g5
171*7c478bd9Sstevel@tonic-gate        ldx     [%g5], %g5
172*7c478bd9Sstevel@tonic-gate        add     %g5, %g4, %g4           ! ptr to struct zulu_tte
173*7c478bd9Sstevel@tonic-gate        ldx     [%g4], %g5              ! get the tag
174*7c478bd9Sstevel@tonic-gate
175*7c478bd9Sstevel@tonic-gate	set     (0x3f << 13), %g6
176*7c478bd9Sstevel@tonic-gate        andn    %g5, %g6, %g5
177*7c478bd9Sstevel@tonic-gate        andn    %g2, %g6, %g6
178*7c478bd9Sstevel@tonic-gate        cmp     %g5, %g6
179*7c478bd9Sstevel@tonic-gate        bne,pn  %xcc, zulu_hat_tsb_try_64k
180*7c478bd9Sstevel@tonic-gate          nop
181*7c478bd9Sstevel@tonic-gate
182*7c478bd9Sstevel@tonic-gate        ldx     [%g4 + 8], %g4          ! flags and pfn
183*7c478bd9Sstevel@tonic-gate        brgez,pn %g4, zulu_hat_tsb_try_64k ! check if entry is valid
184*7c478bd9Sstevel@tonic-gate          nop
185*7c478bd9Sstevel@tonic-gate
186*7c478bd9Sstevel@tonic-gate        sllx    %g4, 2, %g5
187*7c478bd9Sstevel@tonic-gate        srlx    %g5, 61, %g5            ! tte size
188*7c478bd9Sstevel@tonic-gate        cmp     %g5, ZULU_TTE512K
189*7c478bd9Sstevel@tonic-gate        be,pn   %xcc, zulu_hat_tsb_found
190*7c478bd9Sstevel@tonic-gate          nop
191*7c478bd9Sstevel@tonic-gate
192*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_try_64k:
193*7c478bd9Sstevel@tonic-gate	add     %g1, ZULU_HAT_TSB_SZ, %g5
194*7c478bd9Sstevel@tonic-gate        lduh    [%g5], %g5              ! tsb size
195*7c478bd9Sstevel@tonic-gate        sub     %g5, 1, %g5
196*7c478bd9Sstevel@tonic-gate
197*7c478bd9Sstevel@tonic-gate        srlx    %g2, 16, %g4           ! 4m page hash
198*7c478bd9Sstevel@tonic-gate        and     %g5, %g4, %g4           ! hash index
199*7c478bd9Sstevel@tonic-gate        sllx    %g4, 4, %g4
200*7c478bd9Sstevel@tonic-gate        add     %g1, ZULU_HAT_TSB, %g5
201*7c478bd9Sstevel@tonic-gate        ldx     [%g5], %g5
202*7c478bd9Sstevel@tonic-gate        add     %g5, %g4, %g4           ! ptr to struct zulu_tte
203*7c478bd9Sstevel@tonic-gate        ldx     [%g4], %g5              ! get the tag
204*7c478bd9Sstevel@tonic-gate
205*7c478bd9Sstevel@tonic-gate	set     (0x7 << 13), %g6
206*7c478bd9Sstevel@tonic-gate        andn    %g5, %g6, %g5
207*7c478bd9Sstevel@tonic-gate        andn    %g2, %g6, %g6
208*7c478bd9Sstevel@tonic-gate        cmp     %g5, %g6
209*7c478bd9Sstevel@tonic-gate        bne,pn  %xcc, zulu_hat_tsb_try_8k
210*7c478bd9Sstevel@tonic-gate          nop
211*7c478bd9Sstevel@tonic-gate
212*7c478bd9Sstevel@tonic-gate        ldx     [%g4 + 8], %g4          ! flags and pfn
213*7c478bd9Sstevel@tonic-gate        brgez,pn %g4, zulu_hat_tsb_try_8k ! check if entry is valid
214*7c478bd9Sstevel@tonic-gate          nop
215*7c478bd9Sstevel@tonic-gate
216*7c478bd9Sstevel@tonic-gate        sllx    %g4, 2, %g5
217*7c478bd9Sstevel@tonic-gate        srlx    %g5, 61, %g5            ! tte size
218*7c478bd9Sstevel@tonic-gate        cmp     %g5, ZULU_TTE64K
219*7c478bd9Sstevel@tonic-gate        be,pn   %xcc, zulu_hat_tsb_found
220*7c478bd9Sstevel@tonic-gate          nop
221*7c478bd9Sstevel@tonic-gate
222*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_try_8k:
223*7c478bd9Sstevel@tonic-gate	add     %g1, ZULU_HAT_TSB_SZ, %g5
224*7c478bd9Sstevel@tonic-gate	lduh    [%g5], %g5              ! tsb size
225*7c478bd9Sstevel@tonic-gate	sub     %g5, 1, %g5
226*7c478bd9Sstevel@tonic-gate
227*7c478bd9Sstevel@tonic-gate	srlx	%g2, 13, %g4		! calc hash
228*7c478bd9Sstevel@tonic-gate	and	%g5, %g4, %g4		! hash index
229*7c478bd9Sstevel@tonic-gate	sllx	%g4, 4, %g4
230*7c478bd9Sstevel@tonic-gate	add	%g1, ZULU_HAT_TSB, %g5
231*7c478bd9Sstevel@tonic-gate	ldx	[%g5], %g5		! tsb ptr
232*7c478bd9Sstevel@tonic-gate	add	%g5, %g4, %g4		! ptr to struct tte
233*7c478bd9Sstevel@tonic-gate	ldx	[%g4], %g5		! get the tag
234*7c478bd9Sstevel@tonic-gate	cmp	%g5, %g2
235*7c478bd9Sstevel@tonic-gate	bne,pn	%xcc, zulu_hat_tsb_exit
236*7c478bd9Sstevel@tonic-gate	  mov	%g0, %g1
237*7c478bd9Sstevel@tonic-gate
238*7c478bd9Sstevel@tonic-gate	ldx	[%g4 + 8], %g4		! flags and pfn
239*7c478bd9Sstevel@tonic-gate	brgez,pn %g4, zulu_hat_tsb_exit	! check if entry is valid
240*7c478bd9Sstevel@tonic-gate	  mov   %g0, %g1
241*7c478bd9Sstevel@tonic-gate
242*7c478bd9Sstevel@tonic-gate	sllx    %g4, 2, %g5
243*7c478bd9Sstevel@tonic-gate        srlx    %g5, 61, %g5            ! tte size
244*7c478bd9Sstevel@tonic-gate	brnz,pn	%g5, zulu_hat_tsb_exit
245*7c478bd9Sstevel@tonic-gate	  mov   %g0, %g1
246*7c478bd9Sstevel@tonic-gate
247*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_found:
248*7c478bd9Sstevel@tonic-gate	! expect the tte size in %g5
249*7c478bd9Sstevel@tonic-gate	mulx	%g5, 3, %g5
250*7c478bd9Sstevel@tonic-gate	mov	1, %g1
251*7c478bd9Sstevel@tonic-gate	sllx	%g1, %g5, %g1
252*7c478bd9Sstevel@tonic-gate	sub	%g1, 1, %g1
253*7c478bd9Sstevel@tonic-gate	andn	%g4, %g1, %g4
254*7c478bd9Sstevel@tonic-gate	srlx	%g2, 13, %g5
255*7c478bd9Sstevel@tonic-gate	and	%g1, %g5, %g5
256*7c478bd9Sstevel@tonic-gate	or	%g5, %g4, %g4
257*7c478bd9Sstevel@tonic-gate	mov   	%g4, %g1
258*7c478bd9Sstevel@tonic-gate
259*7c478bd9Sstevel@tonic-gate	! now fall through to exit
260*7c478bd9Sstevel@tonic-gate
261*7c478bd9Sstevel@tonic-gatezulu_hat_tsb_exit:
262*7c478bd9Sstevel@tonic-gate	! if bit zero of %g3 is set, we're at TL=1 and need to unlock
263*7c478bd9Sstevel@tonic-gate	! the context here
264*7c478bd9Sstevel@tonic-gate	andcc	%g3, 1, %g0
265*7c478bd9Sstevel@tonic-gate	be,pn	%xcc, after_unlock
266*7c478bd9Sstevel@tonic-gate	  nop
267*7c478bd9Sstevel@tonic-gate
268*7c478bd9Sstevel@tonic-gate	! clear the context unlock flag
269*7c478bd9Sstevel@tonic-gate	andn	%g3, 1, %g3
270*7c478bd9Sstevel@tonic-gate
271*7c478bd9Sstevel@tonic-gate	set     ZULU_CTX_MASK, %g6
272*7c478bd9Sstevel@tonic-gate	and     %g2, %g6, %g6           ! ctx num
273*7c478bd9Sstevel@tonic-gate
274*7c478bd9Sstevel@tonic-gate	sllx	%g6, 3, %g6
275*7c478bd9Sstevel@tonic-gate	set	zulu_ctx_tab, %g5
276*7c478bd9Sstevel@tonic-gate	add	%g6, %g5, %g5		! %g5 = &zulu_ctx_tab[ctx_num]
277*7c478bd9Sstevel@tonic-gate	ldx	[%g5], %g6
278*7c478bd9Sstevel@tonic-gate	andn	%g6, 1, %g6
279*7c478bd9Sstevel@tonic-gate	stx	%g6, [%g5]
280*7c478bd9Sstevel@tonic-gate
281*7c478bd9Sstevel@tonic-gateafter_unlock:
282*7c478bd9Sstevel@tonic-gate
283*7c478bd9Sstevel@tonic-gate	! set the status code to ZULUVM_NO_TTE in case we are running at TL=1
284*7c478bd9Sstevel@tonic-gate	! and no tte was found.
285*7c478bd9Sstevel@tonic-gate	!
286*7c478bd9Sstevel@tonic-gate	! note: caller doesn't examine %g2 unless flags and pfn are null
287*7c478bd9Sstevel@tonic-gate	jmpl    %g3 + 0x8, %g0
288*7c478bd9Sstevel@tonic-gate	  mov  	ZULUVM_NO_TTE, %g2
289*7c478bd9Sstevel@tonic-gate
290*7c478bd9Sstevel@tonic-gate
291*7c478bd9Sstevel@tonic-gate
292*7c478bd9Sstevel@tonic-gate
293*7c478bd9Sstevel@tonic-gate	SET_SIZE(zulu_hat_tsb_lookup_tl1)
294*7c478bd9Sstevel@tonic-gate
295*7c478bd9Sstevel@tonic-gate	/*
296*7c478bd9Sstevel@tonic-gate	 * %o0 - zulu hat ptr (already locked)
297*7c478bd9Sstevel@tonic-gate	 * %o1 - vaddr
298*7c478bd9Sstevel@tonic-gate	 */
299*7c478bd9Sstevel@tonic-gate	ENTRY_NP(zulu_hat_tsb_lookup_tl0)
300*7c478bd9Sstevel@tonic-gate	mov	%o0, %g4
301*7c478bd9Sstevel@tonic-gate
302*7c478bd9Sstevel@tonic-gate	set	zulu_hat_tsb_lookup, %g3
303*7c478bd9Sstevel@tonic-gate
304*7c478bd9Sstevel@tonic-gate	! note bit zero of g3 is zero which tells zulu_hat_tsb_lookup
305*7c478bd9Sstevel@tonic-gate	! to not unlock tsb before returning
306*7c478bd9Sstevel@tonic-gate
307*7c478bd9Sstevel@tonic-gate	jmpl	%g3, %g3
308*7c478bd9Sstevel@tonic-gate	  mov	%o1, %g1
309*7c478bd9Sstevel@tonic-gate
310*7c478bd9Sstevel@tonic-gate	retl
311*7c478bd9Sstevel@tonic-gate	  mov   %g1, %o0
312*7c478bd9Sstevel@tonic-gate	SET_SIZE(zulu_hat_tsb_lookup_tl0)
313*7c478bd9Sstevel@tonic-gate
314*7c478bd9Sstevel@tonic-gate#endif	/* lint */
315