pcb.h (106189) | pcb.h (115084) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2003 Doug Rabson |
|
2 * Copyright (c) 2000 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 3 * Copyright (c) 2000 Doug Rabson 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 1. Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. --- 8 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
26 * $FreeBSD: head/sys/ia64/include/pcb.h 106189 2002-10-30 05:55:29Z marcel $ | 27 * $FreeBSD: head/sys/ia64/include/pcb.h 115084 2003-05-16 21:26:42Z marcel $ |
27 */ 28 29#ifndef _MACHINE_PCB_H_ 30#define _MACHINE_PCB_H_ 31 | 28 */ 29 30#ifndef _MACHINE_PCB_H_ 31#define _MACHINE_PCB_H_ 32 |
33#include <machine/_regset.h> 34 |
|
32/* 33 * PCB: process control block 34 */ | 35/* 36 * PCB: process control block 37 */ |
38struct pmap; |
|
35struct pcb { | 39struct pcb { |
36 uint64_t pcb_sp; 37 uint64_t pcb_ar_unat; 38 uint64_t pcb_rp; 39 uint64_t pcb_pr; 40 struct ia64_fpreg pcb_f[20]; 41#define PCB_F2 0 42#define PCB_F3 1 43#define PCB_F4 2 44#define PCB_F5 3 45#define PCB_F16 4 46#define PCB_F17 5 47#define PCB_F18 6 48#define PCB_F19 7 49#define PCB_F20 8 50#define PCB_F21 9 51#define PCB_F22 10 52#define PCB_F23 11 53#define PCB_F24 12 54#define PCB_F25 13 55#define PCB_F26 14 56#define PCB_F27 15 57#define PCB_F28 16 58#define PCB_F29 17 59#define PCB_F30 18 60#define PCB_F31 19 61 uint64_t pcb_r[4]; 62#define PCB_R4 0 63#define PCB_R5 1 64#define PCB_R6 2 65#define PCB_R7 3 66 uint64_t pcb_unat47; 67 uint64_t pcb_b[5]; 68#define PCB_B1 0 69#define PCB_B2 1 70#define PCB_B3 2 71#define PCB_B4 3 72#define PCB_B5 4 73 uint64_t pcb_ar_bsp; 74 uint64_t pcb_ar_pfs; 75 uint64_t pcb_ar_rnat; 76 uint64_t pcb_ar_lc; | 40 struct _special pcb_special; 41 struct _callee_saved pcb_preserved; 42 struct _callee_saved_fp pcb_preserved_fp; 43 struct _high_fp pcb_high_fp; 44 struct pcpu *pcb_fpcpu; 45 struct pmap *pcb_current_pmap; |
77 | 46 |
78 uint64_t pcb_current_pmap; 79 80 uint64_t pcb_ar_fcr; 81 uint64_t pcb_ar_eflag; 82 uint64_t pcb_ar_csd; 83 uint64_t pcb_ar_ssd; 84 uint64_t pcb_ar_fsr; 85 uint64_t pcb_ar_fir; 86 uint64_t pcb_ar_fdr; 87 88 /* Aligned! */ 89 struct ia64_fpreg pcb_highfp[96]; /* f32-f127 */ 90 | |
91 uint64_t pcb_onfault; /* for copy faults */ 92 uint64_t pcb_accessaddr; /* for [fs]uswintr */ | 47 uint64_t pcb_onfault; /* for copy faults */ 48 uint64_t pcb_accessaddr; /* for [fs]uswintr */ |
49 50#if IA32 51 uint64_t pcb_ia32_cflg; 52 uint64_t pcb_ia32_eflag; 53 uint64_t pcb_ia32_fcr; 54 uint64_t pcb_ia32_fdr; 55 uint64_t pcb_ia32_fir; 56 uint64_t pcb_ia32_fsr; 57#endif |
|
93}; 94 95#ifdef _KERNEL | 58}; 59 60#ifdef _KERNEL |
96void restorectx(struct pcb *); 97void savectx(struct pcb *); | 61 62#define savectx(p) swapctx(p, NULL) 63void restorectx(struct pcb *) __dead2; 64int swapctx(struct pcb *old, struct pcb *new); 65 66#if IA32 67void ia32_restorectx(struct pcb *); 68void ia32_savectx(struct pcb *); |
98#endif 99 | 69#endif 70 |
71#endif 72 |
|
100#endif /* _MACHINE_PCB_H_ */ | 73#endif /* _MACHINE_PCB_H_ */ |