17aec1d6cindi/*
27aec1d6cindi * CDDL HEADER START
37aec1d6cindi *
47aec1d6cindi * The contents of this file are subject to the terms of the
53ad553agavinm * Common Development and Distribution License (the "License").
63ad553agavinm * You may not use this file except in compliance with the License.
77aec1d6cindi *
87aec1d6cindi * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97aec1d6cindi * or http://www.opensolaris.org/os/licensing.
107aec1d6cindi * See the License for the specific language governing permissions
117aec1d6cindi * and limitations under the License.
127aec1d6cindi *
137aec1d6cindi * When distributing Covered Code, include this CDDL HEADER in each
147aec1d6cindi * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157aec1d6cindi * If applicable, add the following below this CDDL HEADER, with the
167aec1d6cindi * fields enclosed by brackets "[]" replaced with your own identifying
177aec1d6cindi * information: Portions Copyright [yyyy] [name of copyright owner]
187aec1d6cindi *
197aec1d6cindi * CDDL HEADER END
207aec1d6cindi */
217aec1d6cindi
227aec1d6cindi/*
23e3d60c9Adrian Frost * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
247aec1d6cindi * Use is subject to license terms.
252a613b5Robert Mustacchi * Copyright (c) 2018, Joyent, Inc.
267aec1d6cindi */
277aec1d6cindi
287aec1d6cindi#ifndef _SYS_CPU_MODULE_IMPL_H
297aec1d6cindi#define	_SYS_CPU_MODULE_IMPL_H
307aec1d6cindi
317aec1d6cindi#include <sys/cpu_module.h>
327aec1d6cindi#include <sys/cpuvar.h>
337aec1d6cindi#include <sys/types.h>
347aec1d6cindi
357aec1d6cindi#ifdef __cplusplus
367aec1d6cindiextern "C" {
377aec1d6cindi#endif
387aec1d6cindi
3920c794bgavinmtypedef uint32_t cmi_api_ver_t;
4020c794bgavinm
4120c794bgavinm#define	_CMI_API_VERSION_MAGIC	0xa5100000
4220c794bgavinm#define	_CMI_API_VERSION(n)	(_CMI_API_VERSION_MAGIC | (n))
4320c794bgavinm
4420c794bgavinm#define	CMI_API_VERSION_CHKMAGIC(v) \
4520c794bgavinm	(((v) & 0xfff00000) == _CMI_API_VERSION_MAGIC)
4620c794bgavinm#define	CMI_API_VERSION_TOPRINT(v) ((v) & 0x000fffff)
4720c794bgavinm
4820c794bgavinm#define	CMI_API_VERSION_0	_CMI_API_VERSION(0)
4920c794bgavinm#define	CMI_API_VERSION_1	_CMI_API_VERSION(1)
50e3d60c9Adrian Frost#define	CMI_API_VERSION_2	_CMI_API_VERSION(2)
51e4b8688Cheng Sean Ye#define	CMI_API_VERSION_3	_CMI_API_VERSION(3)
5220c794bgavinm
53e4b8688Cheng Sean Ye#define	CMI_API_VERSION		CMI_API_VERSION_3
54