hsvc.h revision b693132f48f19b8c1bd613e914faf3589565cb57
2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _SYS_HSVC_H
2N/A#define _SYS_HSVC_H
2N/A
2N/A/*
2N/A * Niagara services information
2N/A */
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A
2N/A/*
2N/A * Hypervisor service groups
2N/A */
2N/A#define HSVC_GROUP_SUN4V 0x0000
2N/A#define HSVC_GROUP_CORE 0x0001
2N/A#define HSVC_GROUP_INTR 0x0002
2N/A#define HSVC_GROUP_SOFT_STATE 0x0003
2N/A#define HSVC_GROUP_TM 0x0080
2N/A#define HSVC_GROUP_VPCI 0x0100
2N/A#define HSVC_GROUP_LDC 0x0101
2N/A#define HSVC_GROUP_VSC 0x0102
2N/A#define HSVC_GROUP_NCS 0x0103
2N/A#define HSVC_GROUP_RNG 0x0104
2N/A#define HSVC_GROUP_NIAGARA_CPU 0x0200
2N/A#define HSVC_GROUP_FIRE_PERF 0x0201
2N/A#define HSVC_GROUP_NIAGARA2_CPU 0x0202
2N/A#define HSVC_GROUP_NIU 0x0204
2N/A#define HSVC_GROUP_VFALLS_CPU 0x0205
2N/A#define HSVC_GROUP_DIAG 0x0300
2N/A
2N/A#ifndef _ASM
2N/A
2N/A#include <sys/types.h>
2N/A
2N/A/*
2N/A * Hypervisor service negotiation data strcture
2N/A */
2N/Astruct hsvc_info {
2N/A int hsvc_rev; /* data structure revision number */
2N/A void *hsvc_private; /* reserved for the framework */
2N/A uint64_t hsvc_group; /* hypervisor API group */
2N/A uint64_t hsvc_major; /* API group major number */
2N/A uint64_t hsvc_minor; /* API group minor number */
2N/A char *hsvc_modname; /* module name */
2N/A};
2N/A
2N/Atypedef struct hsvc_info hsvc_info_t;
2N/A
2N/A/*
2N/A * hsvc_rev field
2N/A */
2N/A#define HSVC_REV_1 1
2N/A
2N/A/*
2N/A * External interface
2N/A */
2N/Aextern int hsvc_register(hsvc_info_t *hsvcreq, uint64_t *supported_minor);
2N/Aextern int hsvc_unregister(hsvc_info_t *hsvcreq);
2N/Aextern int hsvc_version(uint64_t hsvc_group, uint64_t *major, uint64_t *minor);
2N/A
2N/A#endif /* _ASM */
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _SYS_HSVC_H */
2N/A