1/*-
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.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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 *
26 * $FreeBSD: head/sys/ia64/include/pcb.h 106189 2002-10-30 05:55:29Z marcel $
27 */
28
29#ifndef _MACHINE_PCB_H_
30#define _MACHINE_PCB_H_
31
32/*
33 * PCB: process control block
34 */
35struct 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;
77
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 */
93};
94
95#ifdef _KERNEL
96void restorectx(struct pcb *);
97void savectx(struct pcb *);
98#endif
99
100#endif /* _MACHINE_PCB_H_ */
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.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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 *
26 * $FreeBSD: head/sys/ia64/include/pcb.h 106189 2002-10-30 05:55:29Z marcel $
27 */
28
29#ifndef _MACHINE_PCB_H_
30#define _MACHINE_PCB_H_
31
32/*
33 * PCB: process control block
34 */
35struct 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;
77
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 */
93};
94
95#ifdef _KERNEL
96void restorectx(struct pcb *);
97void savectx(struct pcb *);
98#endif
99
100#endif /* _MACHINE_PCB_H_ */