1*3299Sschwartz/* 2*3299Sschwartz * CDDL HEADER START 3*3299Sschwartz * 4*3299Sschwartz * The contents of this file are subject to the terms of the 5*3299Sschwartz * Common Development and Distribution License (the "License"). 6*3299Sschwartz * You may not use this file except in compliance with the License. 7*3299Sschwartz * 8*3299Sschwartz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*3299Sschwartz * or http://www.opensolaris.org/os/licensing. 10*3299Sschwartz * See the License for the specific language governing permissions 11*3299Sschwartz * and limitations under the License. 12*3299Sschwartz * 13*3299Sschwartz * When distributing Covered Code, include this CDDL HEADER in each 14*3299Sschwartz * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*3299Sschwartz * If applicable, add the following below this CDDL HEADER, with the 16*3299Sschwartz * fields enclosed by brackets "[]" replaced with your own identifying 17*3299Sschwartz * information: Portions Copyright [yyyy] [name of copyright owner] 18*3299Sschwartz * 19*3299Sschwartz * CDDL HEADER END 20*3299Sschwartz */ 21*3299Sschwartz 22*3299Sschwartz/* 23*3299Sschwartz * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24*3299Sschwartz * Use is subject to license terms. 25*3299Sschwartz */ 26*3299Sschwartz 27*3299Sschwartz#pragma ident "%Z%%M% %I% %E% SMI" 28*3299Sschwartz 29*3299Sschwartz/* 30*3299Sschwartz * Assembly language support for the n2piupc N2 PIU performance counter driver. 31*3299Sschwartz */ 32*3299Sschwartz 33*3299Sschwartz#include <sys/asm_linkage.h> 34*3299Sschwartz#include <sys/hypervisor_api.h> 35*3299Sschwartz#include "n2piupc_acc.h" 36*3299Sschwartz 37*3299Sschwartz/*LINTLIBRARY*/ 38*3299Sschwartz 39*3299Sschwartz#if defined(lint) 40*3299Sschwartz 41*3299Sschwartz/*ARGSUSED*/ 42*3299Sschwartzint 43*3299Sschwartzn2piupc_get_perfreg(cntr_handle_t handle, int regid, uint64_t *data) 44*3299Sschwartz{ return (0); } 45*3299Sschwartz 46*3299Sschwartz/*ARGSUSED*/ 47*3299Sschwartzint 48*3299Sschwartzn2piupc_set_perfreg(cntr_handle_t handle, int regid, uint64_t data) 49*3299Sschwartz{ return (0); } 50*3299Sschwartz 51*3299Sschwartz#else /* lint */ 52*3299Sschwartz 53*3299Sschwartz ENTRY(n2piupc_get_perfreg) 54*3299Sschwartz mov N2PIU_GET_PERFREG, %o5 55*3299Sschwartz ta FAST_TRAP 56*3299Sschwartz brz,a %o0, 1f 57*3299Sschwartz stx %o1, [%o2] 58*3299Sschwartz1: retl 59*3299Sschwartz nop 60*3299Sschwartz SET_SIZE(n2piupc_get_perfreg) 61*3299Sschwartz 62*3299Sschwartz ENTRY(n2piupc_set_perfreg) 63*3299Sschwartz mov N2PIU_SET_PERFREG, %o5 64*3299Sschwartz ta FAST_TRAP 65*3299Sschwartz retl 66*3299Sschwartz nop 67*3299Sschwartz SET_SIZE(n2piupc_set_perfreg) 68*3299Sschwartz 69*3299Sschwartz#endif 70