summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2002-10-30 05:55:29 +0000
committermarcel <marcel@FreeBSD.org>2002-10-30 05:55:29 +0000
commit38a01737c156ecff0abbad3f926b6619c0518c2a (patch)
treec2cd9b652fab7a16aa47dd7b2627da6d00254f4e /sys/ia64/include
parent3ab60f4a38aa50a3c9281a31f3473c04edb6dbb0 (diff)
downloadFreeBSD-src-38a01737c156ecff0abbad3f926b6619c0518c2a.zip
FreeBSD-src-38a01737c156ecff0abbad3f926b6619c0518c2a.tar.gz
Rewrite cpu_switch(). The most notable change is the fact that we now
have f16-f31 as part of the context. The PCB has been reorganized to better match how we save and restore the (preserved) registers. This commit also moves the context restoriation to its own function (named pcb_restore), as we did with pcb_save. Only minimal effort has been put in writing optimal assembly. The expectation is that there will be more rounds of changes.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r--sys/ia64/include/pcb.h89
1 files changed, 53 insertions, 36 deletions
diff --git a/sys/ia64/include/pcb.h b/sys/ia64/include/pcb.h
index beba354..c5ee145 100644
--- a/sys/ia64/include/pcb.h
+++ b/sys/ia64/include/pcb.h
@@ -33,46 +33,63 @@
* PCB: process control block
*/
struct pcb {
- u_int64_t pcb_r4;
- u_int64_t pcb_r5;
- u_int64_t pcb_r6;
- u_int64_t pcb_r7;
+ uint64_t pcb_sp;
+ uint64_t pcb_ar_unat;
+ uint64_t pcb_rp;
+ uint64_t pcb_pr;
+ struct ia64_fpreg pcb_f[20];
+#define PCB_F2 0
+#define PCB_F3 1
+#define PCB_F4 2
+#define PCB_F5 3
+#define PCB_F16 4
+#define PCB_F17 5
+#define PCB_F18 6
+#define PCB_F19 7
+#define PCB_F20 8
+#define PCB_F21 9
+#define PCB_F22 10
+#define PCB_F23 11
+#define PCB_F24 12
+#define PCB_F25 13
+#define PCB_F26 14
+#define PCB_F27 15
+#define PCB_F28 16
+#define PCB_F29 17
+#define PCB_F30 18
+#define PCB_F31 19
+ uint64_t pcb_r[4];
+#define PCB_R4 0
+#define PCB_R5 1
+#define PCB_R6 2
+#define PCB_R7 3
+ uint64_t pcb_unat47;
+ uint64_t pcb_b[5];
+#define PCB_B1 0
+#define PCB_B2 1
+#define PCB_B3 2
+#define PCB_B4 3
+#define PCB_B5 4
+ uint64_t pcb_ar_bsp;
+ uint64_t pcb_ar_pfs;
+ uint64_t pcb_ar_rnat;
+ uint64_t pcb_ar_lc;
- struct ia64_fpreg pcb_f2;
- struct ia64_fpreg pcb_f3;
- struct ia64_fpreg pcb_f4;
- struct ia64_fpreg pcb_f5;
+ uint64_t pcb_current_pmap;
- u_int64_t pcb_b0; /* really restart address */
- u_int64_t pcb_b1;
- u_int64_t pcb_b2;
- u_int64_t pcb_b3;
- u_int64_t pcb_b4;
- u_int64_t pcb_b5;
-
- u_int64_t pcb_old_unat; /* caller's ar.unat */
- u_int64_t pcb_sp;
- u_int64_t pcb_pfs;
- u_int64_t pcb_bspstore;
- u_int64_t pcb_lc;
-
- u_int64_t pcb_unat; /* ar.unat for r4..r7 */
- u_int64_t pcb_rnat;
- u_int64_t pcb_pr; /* predicates */
- u_int64_t pcb_pmap; /* current pmap */
-
- u_int64_t pcb_fsr;
- u_int64_t pcb_fcr;
- u_int64_t pcb_fir;
- u_int64_t pcb_fdr;
- u_int64_t pcb_eflag;
- u_int64_t pcb_csd;
- u_int64_t pcb_ssd;
-
- u_int64_t pcb_onfault; /* for copy faults */
- u_int64_t pcb_accessaddr; /* for [fs]uswintr */
+ uint64_t pcb_ar_fcr;
+ uint64_t pcb_ar_eflag;
+ uint64_t pcb_ar_csd;
+ uint64_t pcb_ar_ssd;
+ uint64_t pcb_ar_fsr;
+ uint64_t pcb_ar_fir;
+ uint64_t pcb_ar_fdr;
+ /* Aligned! */
struct ia64_fpreg pcb_highfp[96]; /* f32-f127 */
+
+ uint64_t pcb_onfault; /* for copy faults */
+ uint64_t pcb_accessaddr; /* for [fs]uswintr */
};
#ifdef _KERNEL
OpenPOWER on IntegriCloud