125cf1a30Sjl139090 /* 225cf1a30Sjl139090 * CDDL HEADER START 325cf1a30Sjl139090 * 425cf1a30Sjl139090 * The contents of this file are subject to the terms of the 525cf1a30Sjl139090 * Common Development and Distribution License (the "License"). 625cf1a30Sjl139090 * You may not use this file except in compliance with the License. 725cf1a30Sjl139090 * 825cf1a30Sjl139090 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 925cf1a30Sjl139090 * or http://www.opensolaris.org/os/licensing. 1025cf1a30Sjl139090 * See the License for the specific language governing permissions 1125cf1a30Sjl139090 * and limitations under the License. 1225cf1a30Sjl139090 * 1325cf1a30Sjl139090 * When distributing Covered Code, include this CDDL HEADER in each 1425cf1a30Sjl139090 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1525cf1a30Sjl139090 * If applicable, add the following below this CDDL HEADER, with the 1625cf1a30Sjl139090 * fields enclosed by brackets "[]" replaced with your own identifying 1725cf1a30Sjl139090 * information: Portions Copyright [yyyy] [name of copyright owner] 1825cf1a30Sjl139090 * 1925cf1a30Sjl139090 * CDDL HEADER END 2025cf1a30Sjl139090 */ 2125cf1a30Sjl139090 /* 22*e98fafb9Sjl139090 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2325cf1a30Sjl139090 * Use is subject to license terms. 2425cf1a30Sjl139090 */ 2525cf1a30Sjl139090 2625cf1a30Sjl139090 #ifndef _SYS_CPU_IMPL_H 2725cf1a30Sjl139090 #define _SYS_CPU_IMPL_H 2825cf1a30Sjl139090 2925cf1a30Sjl139090 #pragma ident "%Z%%M% %I% %E% SMI" 3025cf1a30Sjl139090 3125cf1a30Sjl139090 #ifdef __cplusplus 3225cf1a30Sjl139090 extern "C" { 3325cf1a30Sjl139090 #endif 3425cf1a30Sjl139090 3525cf1a30Sjl139090 /* 3625cf1a30Sjl139090 * Definitions of UltraSparc III cpu implementations as specified 3725cf1a30Sjl139090 * in version register 3825cf1a30Sjl139090 */ 3925cf1a30Sjl139090 #define CHEETAH_IMPL 0x14 4025cf1a30Sjl139090 #define IS_CHEETAH(impl) ((impl) == CHEETAH_IMPL) 4125cf1a30Sjl139090 #define CHEETAH_MAJOR_VERSION(rev) (((rev) >> 4) & 0xf) 4225cf1a30Sjl139090 #define CHEETAH_MINOR_VERSION(rev) ((rev) & 0xf) 4325cf1a30Sjl139090 4425cf1a30Sjl139090 /* 4525cf1a30Sjl139090 * Definitions of UltraSPARC III+ cpu implementation as specified 4625cf1a30Sjl139090 * in version register 4725cf1a30Sjl139090 */ 4825cf1a30Sjl139090 #define CHEETAH_PLUS_IMPL 0x15 4925cf1a30Sjl139090 #define IS_CHEETAH_PLUS(impl) ((impl) == CHEETAH_PLUS_IMPL) 5025cf1a30Sjl139090 #define CHEETAH_PLUS_MAJOR_VERSION(rev) CHEETAH_MAJOR_VERSION(rev) 5125cf1a30Sjl139090 #define CHEETAH_PLUS_MINOR_VERSION(rev) CHEETAH_MINOR_VERSION(rev) 5225cf1a30Sjl139090 5325cf1a30Sjl139090 /* 5425cf1a30Sjl139090 * Definitions of UltraSPARC IIIi cpu implementation as specified 5525cf1a30Sjl139090 * in version register. Jalapeno major and minor rev's are in 5625cf1a30Sjl139090 * the same location and are the same size as Cheetah/Cheetah+. 5725cf1a30Sjl139090 */ 5825cf1a30Sjl139090 #define JALAPENO_IMPL 0x16 5925cf1a30Sjl139090 #define IS_JALAPENO(impl) ((impl) == JALAPENO_IMPL) 6025cf1a30Sjl139090 #define JALAPENO_MAJOR_VERSION(rev) CHEETAH_MAJOR_VERSION(rev) 6125cf1a30Sjl139090 #define JALAPENO_MINOR_VERSION(rev) CHEETAH_MINOR_VERSION(rev) 6225cf1a30Sjl139090 6325cf1a30Sjl139090 /* 6425cf1a30Sjl139090 * Definitions of UltraSPARC IV cpu implementation as specified 6525cf1a30Sjl139090 * in version register. Jaguar major and minor rev's are in 6625cf1a30Sjl139090 * the same location and are the same size as Cheetah/Cheetah+. 6725cf1a30Sjl139090 */ 6825cf1a30Sjl139090 #define JAGUAR_IMPL 0x18 6925cf1a30Sjl139090 #define IS_JAGUAR(impl) ((impl) == JAGUAR_IMPL) 7025cf1a30Sjl139090 #define JAGUAR_MAJOR_VERSION(rev) CHEETAH_MAJOR_VERSION(rev) 7125cf1a30Sjl139090 #define JAGUAR_MINOR_VERSION(rev) CHEETAH_MINOR_VERSION(rev) 7225cf1a30Sjl139090 7325cf1a30Sjl139090 /* 7425cf1a30Sjl139090 * Definitions of UltraSPARC IIIi+ cpu implementation as specified 7525cf1a30Sjl139090 * in version register. Serrano major and minor rev's are in 7625cf1a30Sjl139090 * the same location and are the same size as Cheetah/Cheetah+. 7725cf1a30Sjl139090 */ 7825cf1a30Sjl139090 #define SERRANO_IMPL 0x22 7925cf1a30Sjl139090 #define IS_SERRANO(impl) ((impl) == SERRANO_IMPL) 8025cf1a30Sjl139090 #define SERRANO_MAJOR_VERSION(rev) CHEETAH_MAJOR_VERSION(rev) 8125cf1a30Sjl139090 #define SERRANO_MINOR_VERSION(rev) CHEETAH_MINOR_VERSION(rev) 8225cf1a30Sjl139090 8325cf1a30Sjl139090 /* 8425cf1a30Sjl139090 * Definitions of UltraSPARC IV+ cpu implementation as specified 8525cf1a30Sjl139090 * in version register. Panther major and minor rev's are in 8625cf1a30Sjl139090 * the same location and are the same size as Cheetah/Cheetah+. 8725cf1a30Sjl139090 */ 8825cf1a30Sjl139090 #define PANTHER_IMPL 0x19 8925cf1a30Sjl139090 #define IS_PANTHER(impl) ((impl) == PANTHER_IMPL) 9025cf1a30Sjl139090 #define PANTHER_MAJOR_VERSION(rev) CHEETAH_MAJOR_VERSION(rev) 9125cf1a30Sjl139090 #define PANTHER_MINOR_VERSION(rev) CHEETAH_MINOR_VERSION(rev) 9225cf1a30Sjl139090 9325cf1a30Sjl139090 9425cf1a30Sjl139090 /* 9525cf1a30Sjl139090 * Definitions of Olympus-C cpu implementations as specified 9625cf1a30Sjl139090 * in version register 9725cf1a30Sjl139090 */ 9825cf1a30Sjl139090 #define OLYMPUS_C_IMPL 0x6 9925cf1a30Sjl139090 #define IS_OLYMPUS_C(impl) ((impl) == OLYMPUS_C_IMPL) 10025cf1a30Sjl139090 #define OLYMPUS_REV_MASK(x) (((x) >> 28) & 0x7) 10125cf1a30Sjl139090 #define OLYMPUS_C_A 0 10225cf1a30Sjl139090 103*e98fafb9Sjl139090 /* 104*e98fafb9Sjl139090 * Definitions for Jupiter cpu. 105*e98fafb9Sjl139090 */ 106*e98fafb9Sjl139090 #define JUPITER_IMPL 0x7 107*e98fafb9Sjl139090 #define IS_JUPITER(impl) ((impl) == JUPITER_IMPL) 108*e98fafb9Sjl139090 10925cf1a30Sjl139090 #define CPU_IMPL_IS_CMP(impl) (IS_JAGUAR(impl) || \ 110*e98fafb9Sjl139090 IS_PANTHER(impl) || \ 111*e98fafb9Sjl139090 IS_OLYMPUS_C(impl) || \ 112*e98fafb9Sjl139090 IS_JUPITER(impl)) 11325cf1a30Sjl139090 11425cf1a30Sjl139090 #ifdef __cplusplus 11525cf1a30Sjl139090 } 11625cf1a30Sjl139090 #endif 11725cf1a30Sjl139090 11825cf1a30Sjl139090 #endif /* _SYS_CPU_IMPL_H */ 119