Print this page
XXX AVX procfs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/procfs_isa.h
+++ new/usr/src/uts/intel/sys/procfs_isa.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License, Version 1.0 only
6 6 * (the "License"). You may not use this file except in compliance
7 7 * with the License.
8 8 *
9 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 * or http://www.opensolaris.org/os/licensing.
11 11 * See the License for the specific language governing permissions
12 12 * and limitations under the License.
13 13 *
14 14 * When distributing Covered Code, include this CDDL HEADER in each
15 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 * If applicable, add the following below this CDDL HEADER, with the
17 17 * fields enclosed by brackets "[]" replaced with your own identifying
18 18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 19 *
↓ open down ↓ |
19 lines elided |
↑ open up ↑ |
20 20 * CDDL HEADER END
21 21 */
22 22 /*
23 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 #ifndef _SYS_PROCFS_ISA_H
28 28 #define _SYS_PROCFS_ISA_H
29 29
30 -#pragma ident "%Z%%M% %I% %E% SMI"
31 -
32 30 /*
33 31 * Instruction Set Architecture specific component of <sys/procfs.h>
34 32 * i386 version
35 33 */
36 34
37 35 #include <sys/regset.h>
38 36
39 37 #ifdef __cplusplus
40 38 extern "C" {
41 39 #endif
42 40
43 41 /*
44 42 * Possible values of pr_dmodel.
45 43 * This isn't isa-specific, but it needs to be defined here for other reasons.
46 44 */
47 45 #define PR_MODEL_UNKNOWN 0
48 46 #define PR_MODEL_ILP32 1 /* process data model is ILP32 */
49 47 #define PR_MODEL_LP64 2 /* process data model is LP64 */
50 48
51 49 /*
52 50 * To determine whether application is running native.
53 51 */
54 52 #if defined(_LP64)
55 53 #define PR_MODEL_NATIVE PR_MODEL_LP64
56 54 #elif defined(_ILP32)
57 55 #define PR_MODEL_NATIVE PR_MODEL_ILP32
58 56 #else
59 57 #error "No DATAMODEL_NATIVE specified"
60 58 #endif /* _LP64 || _ILP32 */
61 59
62 60 #if defined(__i386) || defined(__amd64)
63 61 /*
64 62 * Holds one i386 or amd64 instruction
65 63 */
66 64 typedef uchar_t instr_t;
67 65 #endif
68 66
69 67 #define NPRGREG _NGREG
70 68 #define prgreg_t greg_t
71 69 #define prgregset_t gregset_t
72 70 #define prfpregset fpu
73 71 #define prfpregset_t fpregset_t
74 72
75 73 #if defined(_SYSCALL32)
76 74 /*
77 75 * kernel view of the ia32 register set
78 76 */
79 77 typedef uchar_t instr32_t;
80 78 #if defined(__amd64)
81 79 #define NPRGREG32 _NGREG32
82 80 #define prgreg32_t greg32_t
83 81 #define prgregset32_t gregset32_t
84 82 #define prfpregset32 fpu32
85 83 #define prfpregset32_t fpregset32_t
86 84 #else
87 85 #define NPRGREG32 _NGREG
88 86 #define prgreg32_t greg_t
89 87 #define prgregset32_t gregset_t
90 88 #define prfpregset32 fpu
91 89 #define prfpregset32_t fpregset_t
92 90 #endif
93 91 #endif /* _SYSCALL32 */
94 92
95 93 #if defined(__amd64)
96 94 /*
97 95 * The following defines are for portability (see <sys/regset.h>).
98 96 */
99 97 #define R_PC REG_RIP
100 98 #define R_PS REG_RFL
101 99 #define R_SP REG_RSP
102 100 #define R_FP REG_RBP
103 101 #define R_R0 REG_RAX
104 102 #define R_R1 REG_RDX
105 103 #elif defined(__i386)
106 104 /*
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
107 105 * The following defines are for portability (see <sys/regset.h>).
108 106 */
109 107 #define R_PC EIP
110 108 #define R_PS EFL
111 109 #define R_SP UESP
112 110 #define R_FP EBP
113 111 #define R_R0 EAX
114 112 #define R_R1 EDX
115 113 #endif
116 114
115 +#define XR_TYPE_XSAVE 0x101
116 +
117 +typedef struct prxregset {
118 + uint32_t pr_type;
119 + uint32_t pr_align;
120 + uint32_t pr_xsize;
121 + uint32_t pr_pad;
122 + union {
123 + struct pr_xsave {
124 + uint16_t pr_fcw;
125 + uint16_t pr_fsw;
126 + uint16_t pr_fctw;
127 + uint16_t pr_fop;
128 +#if defined(__amd64)
129 + uint64_t pr_rip;
130 + uint64_t pr_rdp;
131 +#else
132 + uint32_t pr_eip;
133 + uint16_t pr_cs;
134 + uint16_t __pr_ign0;
135 + uint32_t pr_dp;
136 + uint16_t pr_ds;
137 + uint16_t __pr_ign1;
138 +#endif
139 + uint32_t pr_mxcsr;
140 + uint32_t pr_mxcsr_mask;
141 + union {
142 + uint16_t pr_fpr_16[5];
143 + u_longlong_t pr_fpr_mmx;
144 + uint32_t __pr_fpr_pad[4];
145 + } pr_st[8];
146 +#if defined(__amd64)
147 + upad128_t pr_xmm[16];
148 + upad128_t __pr_ign2[3];
149 +#else
150 + upad128_t pr_xmm[8];
151 + upad128_t __pr_ign2[11];
152 +#endif
153 + union {
154 + struct {
155 + uint64_t pr_xcr0;
156 + uint64_t pr_mbz[2];
157 + } pr_xsave_info;
158 + upad128_t __pr_pad[3];
159 + } pr_sw_avail;
160 + uint64_t pr_xstate_bv;
161 + uint64_t pr_rsv_mbz[2];
162 + uint64_t pr_reserved[5];
163 +#if defined(__amd64)
164 + upad128_t pr_ymm[16];
165 +#else
166 + upad128_t pr_ymm[8];
167 + upad128_t __pr_ign3[8];
168 +#endif
169 + } pr_xsave;
170 + } pr_un;
171 +} prxregset_t;
172 +
117 173 #ifdef __cplusplus
118 174 }
119 175 #endif
120 176
121 177 #endif /* _SYS_PROCFS_ISA_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX