1*c56c1e58Sgirish /* 2*c56c1e58Sgirish * CDDL HEADER START 3*c56c1e58Sgirish * 4*c56c1e58Sgirish * The contents of this file are subject to the terms of the 5*c56c1e58Sgirish * Common Development and Distribution License (the "License"). 6*c56c1e58Sgirish * You may not use this file except in compliance with the License. 7*c56c1e58Sgirish * 8*c56c1e58Sgirish * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*c56c1e58Sgirish * or http://www.opensolaris.org/os/licensing. 10*c56c1e58Sgirish * See the License for the specific language governing permissions 11*c56c1e58Sgirish * and limitations under the License. 12*c56c1e58Sgirish * 13*c56c1e58Sgirish * When distributing Covered Code, include this CDDL HEADER in each 14*c56c1e58Sgirish * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*c56c1e58Sgirish * If applicable, add the following below this CDDL HEADER, with the 16*c56c1e58Sgirish * fields enclosed by brackets "[]" replaced with your own identifying 17*c56c1e58Sgirish * information: Portions Copyright [yyyy] [name of copyright owner] 18*c56c1e58Sgirish * 19*c56c1e58Sgirish * CDDL HEADER END 20*c56c1e58Sgirish */ 21*c56c1e58Sgirish /* 22*c56c1e58Sgirish * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*c56c1e58Sgirish * Use is subject to license terms. 24*c56c1e58Sgirish */ 25*c56c1e58Sgirish 26*c56c1e58Sgirish #ifndef _SYS_HSVC_H 27*c56c1e58Sgirish #define _SYS_HSVC_H 28*c56c1e58Sgirish 29*c56c1e58Sgirish #pragma ident "%Z%%M% %I% %E% SMI" 30*c56c1e58Sgirish 31*c56c1e58Sgirish 32*c56c1e58Sgirish /* 33*c56c1e58Sgirish * Niagara services information 34*c56c1e58Sgirish */ 35*c56c1e58Sgirish 36*c56c1e58Sgirish #ifdef __cplusplus 37*c56c1e58Sgirish extern "C" { 38*c56c1e58Sgirish #endif 39*c56c1e58Sgirish 40*c56c1e58Sgirish 41*c56c1e58Sgirish /* 42*c56c1e58Sgirish * Hypervisor service groups 43*c56c1e58Sgirish */ 44*c56c1e58Sgirish #define HSVC_GROUP_SUN4V 0x0000 45*c56c1e58Sgirish #define HSVC_GROUP_CORE 0x0001 46*c56c1e58Sgirish #define HSVC_GROUP_VPCI 0x0100 47*c56c1e58Sgirish #define HSVC_GROUP_LDC 0x0101 48*c56c1e58Sgirish #define HSVC_GROUP_VSC 0x0102 49*c56c1e58Sgirish #define HSVC_GROUP_NCS 0x0103 50*c56c1e58Sgirish #define HSVC_GROUP_NIAGARA_CPU 0x0200 51*c56c1e58Sgirish #define HSVC_GROUP_FIRE_PERF 0x0201 52*c56c1e58Sgirish #define HSVC_GROUP_DIAG 0x0300 53*c56c1e58Sgirish 54*c56c1e58Sgirish #ifndef _ASM 55*c56c1e58Sgirish 56*c56c1e58Sgirish #include <sys/types.h> 57*c56c1e58Sgirish 58*c56c1e58Sgirish /* 59*c56c1e58Sgirish * Hypervisor service negotiation data strcture 60*c56c1e58Sgirish */ 61*c56c1e58Sgirish struct hsvc_info { 62*c56c1e58Sgirish int hsvc_rev; /* data structure revision number */ 63*c56c1e58Sgirish void *hsvc_private; /* reserved for the framework */ 64*c56c1e58Sgirish uint64_t hsvc_group; /* hypervisor API group */ 65*c56c1e58Sgirish uint64_t hsvc_major; /* API group major number */ 66*c56c1e58Sgirish uint64_t hsvc_minor; /* API group minor number */ 67*c56c1e58Sgirish char *hsvc_modname; /* module name */ 68*c56c1e58Sgirish }; 69*c56c1e58Sgirish 70*c56c1e58Sgirish typedef struct hsvc_info hsvc_info_t; 71*c56c1e58Sgirish 72*c56c1e58Sgirish /* 73*c56c1e58Sgirish * hsvc_rev field 74*c56c1e58Sgirish */ 75*c56c1e58Sgirish #define HSVC_REV_1 1 76*c56c1e58Sgirish 77*c56c1e58Sgirish /* 78*c56c1e58Sgirish * External interface 79*c56c1e58Sgirish */ 80*c56c1e58Sgirish extern int hsvc_register(hsvc_info_t *hsvcreq, uint64_t *supported_minor); 81*c56c1e58Sgirish extern int hsvc_unregister(hsvc_info_t *hsvcreq); 82*c56c1e58Sgirish extern int hsvc_version(uint64_t hsvc_group, uint64_t *major, uint64_t *minor); 83*c56c1e58Sgirish 84*c56c1e58Sgirish #endif /* _ASM */ 85*c56c1e58Sgirish 86*c56c1e58Sgirish #ifdef __cplusplus 87*c56c1e58Sgirish } 88*c56c1e58Sgirish #endif 89*c56c1e58Sgirish 90*c56c1e58Sgirish #endif /* _SYS_HSVC_H */ 91