11370Sschwartz /* 21370Sschwartz * CDDL HEADER START 31370Sschwartz * 41370Sschwartz * The contents of this file are subject to the terms of the 51370Sschwartz * Common Development and Distribution License (the "License"). 61370Sschwartz * You may not use this file except in compliance with the License. 71370Sschwartz * 81370Sschwartz * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 91370Sschwartz * or http://www.opensolaris.org/os/licensing. 101370Sschwartz * See the License for the specific language governing permissions 111370Sschwartz * and limitations under the License. 121370Sschwartz * 131370Sschwartz * When distributing Covered Code, include this CDDL HEADER in each 141370Sschwartz * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 151370Sschwartz * If applicable, add the following below this CDDL HEADER, with the 161370Sschwartz * fields enclosed by brackets "[]" replaced with your own identifying 171370Sschwartz * information: Portions Copyright [yyyy] [name of copyright owner] 181370Sschwartz * 191370Sschwartz * CDDL HEADER END 201370Sschwartz */ 211370Sschwartz 221370Sschwartz /* 231370Sschwartz * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 241370Sschwartz * Use is subject to license terms. 251370Sschwartz */ 261370Sschwartz 271370Sschwartz #ifndef _FPC_IMPL_4V_H 281370Sschwartz #define _FPC_IMPL_4V_H 291370Sschwartz 301370Sschwartz #pragma ident "%Z%%M% %I% %E% SMI" 311370Sschwartz 321370Sschwartz #ifdef __cplusplus 331370Sschwartz extern "C" { 341370Sschwartz #endif 351370Sschwartz 36*1691Sschwartz #ifndef _ASM 37*1691Sschwartz 381370Sschwartz typedef uint64_t devhandle_t; 391370Sschwartz 401370Sschwartz #define DEVHDLE_MASK 0xFFFFFFF 411370Sschwartz 421370Sschwartz extern int fpc_get_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t *data); 431370Sschwartz extern int fpc_set_fire_perfreg(devhandle_t dev_hdl, int regid, uint64_t data); 441370Sschwartz 45*1691Sschwartz #endif /* _ASM */ 46*1691Sschwartz 47*1691Sschwartz 48*1691Sschwartz /* 49*1691Sschwartz * Fire performance counter fasttraps. 50*1691Sschwartz * 51*1691Sschwartz * These are in the HSVC_GROUP_FIRE_PERF hypervisor group of functionality. 52*1691Sschwartz */ 53*1691Sschwartz #define FIRE_GET_PERFREG 0x120 54*1691Sschwartz #define FIRE_SET_PERFREG 0x121 55*1691Sschwartz 56*1691Sschwartz /* 57*1691Sschwartz * Performance counter register definitions. 58*1691Sschwartz */ 59*1691Sschwartz #define HVIO_FIRE_PERFREG_JBC_SEL 0 60*1691Sschwartz #define HVIO_FIRE_PERFREG_JBC_CNT0 1 61*1691Sschwartz #define HVIO_FIRE_PERFREG_JBC_CNT1 2 62*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_IMU_SEL 3 63*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_IMU_CNT0 4 64*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_IMU_CNT1 5 65*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_MMU_SEL 6 66*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_MMU_CNT0 7 67*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_MMU_CNT1 8 68*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_TLU_SEL 9 69*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_TLU_CNT0 10 70*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_TLU_CNT1 11 71*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_TLU_CNT2 12 72*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_LNK_SEL 13 73*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_LNK_CNT1 14 74*1691Sschwartz #define HVIO_FIRE_PERFREG_PCIE_LNK_CNT2 15 75*1691Sschwartz 761370Sschwartz #ifdef __cplusplus 771370Sschwartz } 781370Sschwartz #endif 791370Sschwartz 801370Sschwartz #endif /* _FPC_IMPL_4V_H */ 81