1*03831d35Sstevel/* 2*03831d35Sstevel * CDDL HEADER START 3*03831d35Sstevel * 4*03831d35Sstevel * The contents of this file are subject to the terms of the 5*03831d35Sstevel * Common Development and Distribution License, Version 1.0 only 6*03831d35Sstevel * (the "License"). You may not use this file except in compliance 7*03831d35Sstevel * with the License. 8*03831d35Sstevel * 9*03831d35Sstevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*03831d35Sstevel * or http://www.opensolaris.org/os/licensing. 11*03831d35Sstevel * See the License for the specific language governing permissions 12*03831d35Sstevel * and limitations under the License. 13*03831d35Sstevel * 14*03831d35Sstevel * When distributing Covered Code, include this CDDL HEADER in each 15*03831d35Sstevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*03831d35Sstevel * If applicable, add the following below this CDDL HEADER, with the 17*03831d35Sstevel * fields enclosed by brackets "[]" replaced with your own identifying 18*03831d35Sstevel * information: Portions Copyright [yyyy] [name of copyright owner] 19*03831d35Sstevel * 20*03831d35Sstevel * CDDL HEADER END 21*03831d35Sstevel */ 22*03831d35Sstevel/* 23*03831d35Sstevel * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24*03831d35Sstevel * Use is subject to license terms. 25*03831d35Sstevel */ 26*03831d35Sstevel 27*03831d35Sstevel#pragma ident "%Z%%M% %I% %E% SMI" 28*03831d35Sstevel 29*03831d35Sstevel#if defined(lint) 30*03831d35Sstevel#include <sys/types.h> 31*03831d35Sstevel#else 32*03831d35Sstevel#include "assym.h" 33*03831d35Sstevel#endif /* lint */ 34*03831d35Sstevel 35*03831d35Sstevel#include <sys/asm_linkage.h> 36*03831d35Sstevel#include <sys/param.h> 37*03831d35Sstevel#include <sys/privregs.h> 38*03831d35Sstevel#include <sys/machasi.h> 39*03831d35Sstevel#include <sys/mmu.h> 40*03831d35Sstevel#include <sys/machthread.h> 41*03831d35Sstevel#include <sys/pte.h> 42*03831d35Sstevel#include <sys/stack.h> 43*03831d35Sstevel#include <sys/vis.h> 44*03831d35Sstevel#include <sys/param.h> 45*03831d35Sstevel#include <sys/errno.h> 46*03831d35Sstevel#include <sys/vtrace.h> 47*03831d35Sstevel#include <sys/clock.h> 48*03831d35Sstevel#include <sys/asi.h> 49*03831d35Sstevel#include <sys/fsr.h> 50*03831d35Sstevel#include <sys/cheetahregs.h> 51*03831d35Sstevel 52*03831d35Sstevel#if defined(lint) 53*03831d35Sstevel 54*03831d35Sstevel/* ARGSUSED */ 55*03831d35Ssteveluint64_t 56*03831d35Sstevellddmcdecode(uint64_t physaddr) 57*03831d35Sstevel{ 58*03831d35Sstevel return (0x0ull); 59*03831d35Sstevel} 60*03831d35Sstevel 61*03831d35Sstevel/* ARGSUSED */ 62*03831d35Ssteveluint64_t 63*03831d35Sstevellddsafaddr(uint64_t physaddr) 64*03831d35Sstevel{ 65*03831d35Sstevel return (0x0ull); 66*03831d35Sstevel} 67*03831d35Sstevel 68*03831d35Sstevel#else /* !lint */ 69*03831d35Sstevel 70*03831d35Sstevel! 71*03831d35Sstevel! Load the safari address for a specific cpu 72*03831d35Sstevel! 73*03831d35Sstevel! 74*03831d35Sstevel ENTRY(lddsafaddr) 75*03831d35Sstevel rdpr %pstate, %o4 76*03831d35Sstevel andn %o4, PSTATE_IE | PSTATE_AM, %o5 77*03831d35Sstevel wrpr %o5, 0, %pstate ! clear IE, AM bits 78*03831d35Sstevel ldxa [%o0]ASI_SAFARI_CONFIG, %o0 79*03831d35Sstevel retl 80*03831d35Sstevel wrpr %g0, %o4, %pstate ! restore earlier pstate register value 81*03831d35Sstevel SET_SIZE(lddsafaddr) 82*03831d35Sstevel 83*03831d35Sstevel! 84*03831d35Sstevel! Load the mc_decode reg for this cpu. 85*03831d35Sstevel! 86*03831d35Sstevel! 87*03831d35Sstevel ENTRY(lddmcdecode) 88*03831d35Sstevel rdpr %pstate, %o4 89*03831d35Sstevel andn %o4, PSTATE_IE | PSTATE_AM, %o5 90*03831d35Sstevel wrpr %o5, 0, %pstate ! clear IE, AM bits 91*03831d35Sstevel ldxa [%o0]ASI_MC_DECODE, %o0 92*03831d35Sstevel retl 93*03831d35Sstevel wrpr %g0, %o4, %pstate ! restore earlier pstate register value 94*03831d35Sstevel SET_SIZE(lddmcdecode) 95*03831d35Sstevel 96*03831d35Sstevel#endif /* lint */ 97