/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* This file is through cpp before being used as
* an inline. It contains support routines used
* only by DR for the copy-rename sequence.
*/
#if defined(lint)
#else
#include "assym.h"
#endif /* lint */
#include <sys/asm_linkage.h>
#include <sys/privregs.h>
#include <sys/spitregs.h>
#include <sys/machthread.h>
#ifndef lint
/*
* arg1 = icache_size
* arg2 = icache_linesize
*/
lbl/**/0: ;\
/*
* arg1 = dcache_size
* arg2 = dcache_linesize
*/
lbl/**/0: ;\
/*
* arg1 = ecache flush physaddr
* arg2 = size
* arg3 = ecache_linesize
*/
lbl/**/0: ;\
#ifdef SF_ERRATA_32
#else
#endif /* SF_ERRATA_32 */
/*
* arg1 = vaddr
* arg2 = ctxnum
* - disable interrupts and clear address mask
* to access 64 bit physaddr
* - Blow out the TLB.
* . If it's kernel context, then use primary context.
* . Otherwise, use secondary.
*/
nop ;\
nop ;\
/*
* arg1 = dtlb entry
* - Before first compare:
* tmp4 = tte
* tmp5 = vaddr
* tmp6 = cntxnum
*/
lbl/**/0: ;\
nop ;\
/*
* arg1 = itlb entry
* - Before first compare:
* tmp4 = tte
* tmp5 = vaddr
* tmp6 = cntxnum
*/
lbl/**/0: ;\
nop ;\
flushw ;\
#endif /* !lint */
#if defined(lint)
/*ARGSUSED*/
void
{}
#else /* lint */
!
!
!
!
!
!
!
!
! Flush E$
!
!
!
!
! Flush D$
!
!
! Flush I$
!
!
!
srlx %o5, 32, %g5 ! %g5 = itlb_entries
sllx %o5, 32, %o5
srlx %o5, 32, %g1
sub %g1, 1, %g1 ! %g1 = dtlb_entries - 1
DTLB_FLUSH_UNLOCKED(D, %g1, %g3, %g4, %o2, %o3, %o4, %o5)
!
! Flush itlb's
!
!
!
!
!
5:
ba 5b
.skip 2048
#endif /* lint */