Print this page
15254 %ymm registers not restored after signal handler
15367 x86 getfpregs() summons corrupting %xmm ghosts
15333 want x86 /proc xregs support (libc_db, libproc, mdb, etc.)
15336 want libc functions for extended ucontext_t
15334 want ps_lwphandle-specific reg routines
15328 FPU_CW_INIT mistreats reserved bit
15335 i86pc fpu_subr.c isn't really platform-specific
15332 setcontext(2) isn't actually noreturn
15331 need <sys/stdalign.h>
Change-Id: I7060aa86042dfb989f77fc3323c065ea2eafa9ad
Conflicts:
usr/src/uts/common/fs/proc/prcontrol.c
usr/src/uts/intel/os/archdep.c
usr/src/uts/intel/sys/ucontext.h
usr/src/uts/intel/syscall/getcontext.c
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/intel/sys/pcb.h
+++ new/usr/src/uts/intel/sys/pcb.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 (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright 2020 Joyent, Inc.
25 25 */
26 26
27 27 #ifndef _SYS_PCB_H
28 28 #define _SYS_PCB_H
29 29
30 30 #include <sys/regset.h>
31 31 #include <sys/segments.h>
32 32 #ifndef _ASM
33 33 #include <sys/fp.h> /* kfpu_t */
|
↓ open down ↓ |
33 lines elided |
↑ open up ↑ |
34 34 #endif
35 35
36 36 #ifdef __cplusplus
37 37 extern "C" {
38 38 #endif
39 39
40 40 #ifndef _ASM
41 41 typedef struct fpu_ctx {
42 42 kfpu_t fpu_regs; /* kernel save area for FPU */
43 43 uint64_t fpu_xsave_mask; /* xsave mask for FPU/SSE/AVX */
44 -#if defined(__i386)
45 - uint64_t fpu_padding; /* fix 32bit libmicro regression */
46 -#endif
47 44 uint_t fpu_flags; /* FPU state flags */
45 + void *fpu_signal; /* copyin area for signal handling */
48 46 } fpu_ctx_t;
49 47
50 48 typedef struct pcb {
51 49 fpu_ctx_t pcb_fpu; /* fpu state */
52 50 uint_t pcb_flags; /* state flags; cleared on fork */
53 51 greg_t pcb_drstat; /* status debug register (%dr6) */
54 52 unsigned char pcb_instr; /* /proc: instruction at stop */
55 53 unsigned char pcb_rupdate; /* new register values in pcb -> regs */
56 54 uintptr_t pcb_fsbase;
57 55 uintptr_t pcb_gsbase;
58 56 selector_t pcb_ds;
59 57 selector_t pcb_es;
60 58 selector_t pcb_fs;
61 59 selector_t pcb_gs;
62 60 user_desc_t pcb_fsdesc; /* private per-lwp %fs descriptors */
63 61 user_desc_t pcb_gsdesc; /* private per-lwp %gs descriptors */
64 62 } pcb_t;
65 63
66 64 #endif /* ! _ASM */
67 65
68 66 /* pcb_flags */
69 67 #define DEBUG_PENDING 0x02 /* single-step of lcall for a sys call */
70 68 #define PRSTOP_CALLED 0x04 /* prstop() has been called for this lwp */
71 69 #define INSTR_VALID 0x08 /* value in pcb_instr is valid (/proc) */
72 70 #define NORMAL_STEP 0x10 /* normal debugger-requested single-step */
73 71 #define WATCH_STEP 0x20 /* single-stepping in watchpoint emulation */
74 72 #define CPC_OVERFLOW 0x40 /* performance counters overflowed */
75 73 #define REQUEST_STEP 0x100 /* request pending to single-step this lwp */
76 74 #define REQUEST_NOSTEP 0x200 /* request pending to disable single-step */
77 75 #define ASYNC_HWERR 0x400 /* hardware error has corrupted context */
78 76
79 77 /* pcb_rupdate values */
80 78 #define PCB_UPDATE_SEGS 0x01 /* Update segment registers */
81 79 #define PCB_UPDATE_FPU 0x02 /* Update FPU registers */
82 80
83 81 #define PCB_SET_UPDATE_SEGS(pcb) ((pcb)->pcb_rupdate |= PCB_UPDATE_SEGS)
84 82 #define PCB_SET_UPDATE_FPU(pcb) ((pcb)->pcb_rupdate |= PCB_UPDATE_FPU)
85 83 #define PCB_NEED_UPDATE_SEGS(pcb) \
86 84 (((pcb)->pcb_rupdate & PCB_UPDATE_SEGS) != 0)
87 85 #define PCB_NEED_UPDATE_FPU(pcb) \
88 86 (((pcb)->pcb_rupdate & PCB_UPDATE_FPU) != 0)
89 87 #define PCB_NEED_UPDATE(pcb) \
90 88 (PCB_NEED_UPDATE_FPU(pcb) || PCB_NEED_UPDATE_SEGS(pcb))
91 89 #define PCB_CLEAR_UPDATE_SEGS(pcb) ((pcb)->pcb_rupdate &= ~PCB_UPDATE_SEGS)
92 90 #define PCB_CLEAR_UPDATE_FPU(pcb) ((pcb)->pcb_rupdate &= ~PCB_UPDATE_FPU)
93 91
94 92 /* fpu_flags */
95 93 #define FPU_EN 0x01 /* FPU in use (user or kernel) */
96 94 #define FPU_VALID 0x02 /* fpu_regs has valid fpu state */
97 95 #define FPU_MODIFIED 0x04 /* fpu_regs is modified (/proc) */
98 96 #define FPU_KERNEL 0x08 /* Kernel is using the FPU */
99 97
100 98 #define FPU_INVALID 0x0 /* fpu context is not in use */
101 99
102 100 /* fpu_flags */
103 101
104 102 #ifdef __cplusplus
105 103 }
106 104 #endif
107 105
108 106 #endif /* _SYS_PCB_H */
|
↓ open down ↓ |
51 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX