summaryrefslogtreecommitdiff
path: root/usr/src/uts/sparc/sys
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/uts/sparc/sys')
-rw-r--r--usr/src/uts/sparc/sys/Makefile8
-rw-r--r--usr/src/uts/sparc/sys/cpu.h11
-rw-r--r--usr/src/uts/sparc/sys/fm/cpu/SPARC64-VI.h118
-rw-r--r--usr/src/uts/sparc/sys/fpu/fpu_simulator.h35
4 files changed, 159 insertions, 13 deletions
diff --git a/usr/src/uts/sparc/sys/Makefile b/usr/src/uts/sparc/sys/Makefile
index 72c122f969..b75af1c382 100644
--- a/usr/src/uts/sparc/sys/Makefile
+++ b/usr/src/uts/sparc/sys/Makefile
@@ -2,9 +2,8 @@
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License"). You may not use this file except in compliance
-# with the License.
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
@@ -68,7 +67,8 @@ FPUHDRS= \
FMCPUHDRS= \
UltraSPARC-II.h \
UltraSPARC-III.h \
- UltraSPARC-T1.h
+ UltraSPARC-T1.h \
+ SPARC64-VI.h
ROOTDIR= $(ROOT)/usr/include/sys
ROOTDIRS= \
diff --git a/usr/src/uts/sparc/sys/cpu.h b/usr/src/uts/sparc/sys/cpu.h
index be90896939..6f0fbc919d 100644
--- a/usr/src/uts/sparc/sys/cpu.h
+++ b/usr/src/uts/sparc/sys/cpu.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -69,7 +68,9 @@ extern int vac;
/*
* Use to insert cpu-dependent instructions into spin loops
*/
-#define SMT_PAUSE() /* none */
+#pragma weak cpu_smt_pause
+extern void cpu_smt_pause();
+#define SMT_PAUSE() { if (&cpu_smt_pause) cpu_smt_pause(); }
#endif /* defined(_KERNEL) && !defined(_ASM) */
diff --git a/usr/src/uts/sparc/sys/fm/cpu/SPARC64-VI.h b/usr/src/uts/sparc/sys/fm/cpu/SPARC64-VI.h
new file mode 100644
index 0000000000..c1de31063d
--- /dev/null
+++ b/usr/src/uts/sparc/sys/fm/cpu/SPARC64-VI.h
@@ -0,0 +1,118 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SYS_FM_SPARC64_VI_H
+#define _SYS_FM_SPARC64_VI_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* ereport class subcategories for SPARC64-VI */
+#define FM_EREPORT_CPU_SPARC64_VI "SPARC64-VI"
+#define FM_EREPORT_CPU_UNSUPPORTED "unsupported"
+
+/*
+ * Ereport payload definitions.
+ */
+#define FM_EREPORT_PAYLOAD_NAME_SFSR "sfsr"
+#define FM_EREPORT_PAYLOAD_NAME_SFAR "sfar"
+#define FM_EREPORT_PAYLOAD_NAME_UGESR "ugesr"
+#define FM_EREPORT_PAYLOAD_NAME_PC "pc"
+#define FM_EREPORT_PAYLOAD_NAME_TL "tl"
+#define FM_EREPORT_PAYLOAD_NAME_TT "tt"
+#define FM_EREPORT_PAYLOAD_NAME_PRIV "privileged"
+#define FM_EREPORT_PAYLOAD_NAME_RESOURCE "resource"
+#define FM_EREPORT_PAYLOAD_NAME_FLT_STATUS "flt-status"
+
+#define FM_EREPORT_PAYLOAD_FLAG_SFSR 0x00000001
+#define FM_EREPORT_PAYLOAD_FLAG_SFAR 0x00000002
+#define FM_EREPORT_PAYLOAD_FLAG_UGESR 0x00000004
+#define FM_EREPORT_PAYLOAD_FLAG_PC 0x00000008
+#define FM_EREPORT_PAYLOAD_FLAG_TL 0x00000010
+#define FM_EREPORT_PAYLOAD_FLAG_TT 0x00000020
+#define FM_EREPORT_PAYLOAD_FLAG_PRIV 0x00000040
+#define FM_EREPORT_PAYLOAD_FLAG_RESOURCE 0x00000080
+#define FM_EREPORT_PAYLOAD_FLAG_FLT_STATUS 0x00000100
+
+#define FM_EREPORT_PAYLOAD_FLAGS_TRAP \
+ (FM_EREPORT_PAYLOAD_FLAG_TL | \
+ FM_EREPORT_PAYLOAD_FLAG_TT)
+
+#define FM_EREPORT_PAYLOAD_SYNC (FM_EREPORT_PAYLOAD_FLAG_SFSR | \
+ FM_EREPORT_PAYLOAD_FLAG_SFAR | \
+ FM_EREPORT_PAYLOAD_FLAG_PC | \
+ FM_EREPORT_PAYLOAD_FLAGS_TRAP | \
+ FM_EREPORT_PAYLOAD_FLAG_PRIV | \
+ FM_EREPORT_PAYLOAD_FLAG_FLT_STATUS | \
+ FM_EREPORT_PAYLOAD_FLAG_RESOURCE)
+
+#define FM_EREPORT_PAYLOAD_URGENT (FM_EREPORT_PAYLOAD_FLAG_UGESR | \
+ FM_EREPORT_PAYLOAD_FLAG_PC | \
+ FM_EREPORT_PAYLOAD_FLAGS_TRAP | \
+ FM_EREPORT_PAYLOAD_FLAG_PRIV)
+
+/*
+ * FM_EREPORT_PAYLOAD_SYNC
+ */
+
+#define FM_EREPORT_CPU_UE_MEM "ue-mem"
+#define FM_EREPORT_CPU_UE_CHANNEL "ue-channel"
+#define FM_EREPORT_CPU_UE_CPU "ue-cpu"
+#define FM_EREPORT_CPU_UE_PATH "ue-path"
+#define FM_EREPORT_CPU_BERR "berr"
+#define FM_EREPORT_CPU_BTO "bto"
+#define FM_EREPORT_CPU_MTLB "mtlb"
+#define FM_EREPORT_CPU_TLBP "tlbp"
+#define FM_EREPORT_CPU_INV_SFSR "inv-sfsr"
+
+/*
+ * FM_EREPORT_PAYLOAD_URGENT
+ */
+
+#define FM_EREPORT_CPU_CRE "cre"
+#define FM_EREPORT_CPU_TSBCTX "tsb-ctx"
+#define FM_EREPORT_CPU_TSBP "tsbp"
+#define FM_EREPORT_CPU_PSTATE "pstate"
+#define FM_EREPORT_CPU_TSTATE "tstate"
+#define FM_EREPORT_CPU_IUG_F "iug-f"
+#define FM_EREPORT_CPU_IUG_R "iug-r"
+#define FM_EREPORT_CPU_SDC "sdc"
+#define FM_EREPORT_CPU_WDT "wdt"
+#define FM_EREPORT_CPU_DTLB "dtlb"
+#define FM_EREPORT_CPU_ITLB "itlb"
+#define FM_EREPORT_CPU_CORE "core-err"
+#define FM_EREPORT_CPU_DAE "dae"
+#define FM_EREPORT_CPU_IAE "iae"
+#define FM_EREPORT_CPU_UGE "uge"
+#define FM_EREPORT_CPU_INV_URG "inv-urg"
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SYS_FM_SPARC64_VI_H */
diff --git a/usr/src/uts/sparc/sys/fpu/fpu_simulator.h b/usr/src/uts/sparc/sys/fpu/fpu_simulator.h
index 70b1bb54b7..3b46025fcf 100644
--- a/usr/src/uts/sparc/sys/fpu/fpu_simulator.h
+++ b/usr/src/uts/sparc/sys/fpu/fpu_simulator.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -221,6 +220,25 @@ typedef /* FPU instruction. */
uint32_t rs2 : 5; /* Second operand. */
} fp_inst_type;
+enum fp_op_fma_var { /* IMPDEP2B FMA-fused instr. variations */
+ fmadd = 0,
+ fmsub = 1,
+ fnmsub = 2,
+ fnmadd = 3
+};
+
+typedef /* IMPDEP2B FPU FMA-fused instruction. */
+ struct {
+ uint32_t hibits : 2; /* Top two bits. */
+ uint32_t rd : 5; /* Destination. */
+ uint32_t op3 : 6; /* Main op code. */
+ uint32_t rs1 : 5; /* First operand. */
+ uint32_t rs3 : 5; /* Third operand */
+ uint32_t /* enum fp_op_fma_var */ var : 2; /* Instr. variation */
+ uint32_t sz : 2; /* Size */
+ uint32_t rs2 : 5; /* Second operand. */
+} fp_fma_inst_type;
+
typedef /* Integer condition code. */
struct {
uint32_t : 28; /* the unused part */
@@ -305,6 +323,15 @@ struct fpuinfo_kstat {
struct kstat_named fpu_sim_fqtoi;
struct kstat_named fpu_sim_fmovcc;
struct kstat_named fpu_sim_fmovr;
+ struct kstat_named fpu_sim_fmadds;
+ struct kstat_named fpu_sim_fmaddd;
+ struct kstat_named fpu_sim_fmsubs;
+ struct kstat_named fpu_sim_fmsubd;
+ struct kstat_named fpu_sim_fnmadds;
+ struct kstat_named fpu_sim_fnmaddd;
+ struct kstat_named fpu_sim_fnmsubs;
+ struct kstat_named fpu_sim_fnmsubd;
+ struct kstat_named fpu_sim_invalid;
};
struct visinfo_kstat {