summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-09-30 17:48:44 +0000
committerdfr <dfr@FreeBSD.org>2000-09-30 17:48:44 +0000
commitfdfd00f78be6684d8686344118eb51f92eafa29f (patch)
treeea18541d8b8e953ea42c9668143f0a3ad698827c /sys/ia64/include
parentcd493b1404e173be5cf5eb898464e1f27cdb8538 (diff)
downloadFreeBSD-src-fdfd00f78be6684d8686344118eb51f92eafa29f.zip
FreeBSD-src-fdfd00f78be6684d8686344118eb51f92eafa29f.tar.gz
Next round of ia64 work, including fixes to context switching,
implementing cpu_fork(), copy*str(), bcopy(), copy{in,out}(). With these changes, my test kernel reaches the mountroot prompt.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r--sys/ia64/include/asm.h34
-rw-r--r--sys/ia64/include/ia64_cpu.h25
-rw-r--r--sys/ia64/include/pcb.h12
-rw-r--r--sys/ia64/include/proc.h1
4 files changed, 47 insertions, 25 deletions
diff --git a/sys/ia64/include/asm.h b/sys/ia64/include/asm.h
index 4d20be3..3e7f2f9 100644
--- a/sys/ia64/include/asm.h
+++ b/sys/ia64/include/asm.h
@@ -114,33 +114,27 @@ _name_:
* A nested function calls other functions and needs
* to use alloc to save registers.
*/
-#define NESTED(_name_,_n_args_,_n_locals_,_n_outputs_, \
- _pfs_reg_,_rp_reg_) \
- .globl _name_; \
- .proc _name_; \
-_name_:; \
- alloc _pfs_reg_=ar.pfs,_n_args_,_n_locals_,_n_outputs_,0;; \
- mov _rp_reg_=rp \
+#define NESTED(_name_,_n_args_) \
+ .globl _name_; \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0 \
MCOUNT
-#define NESTED_NOPROFILE(_name_,_n_args_,_n_locals_,_n_outputs_, \
- _pfs_reg_,_rp_reg_) \
- .globl _name_; \
- .proc _name_; \
-_name_:; \
- alloc _pfs_reg_=ar.pfs,_n_args_,_n_locals_,_n_outputs_,0;; \
- mov _rp_reg_=rp
+#define NESTED_NOPROFILE(_name_,_n_args_) \
+ .globl _name_; \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0
/*
* STATIC_NESTED
* Declare a local nested function.
*/
-#define STATIC_NESTED(_name_,_n_args_,_n_locals_,_n_outputs_, \
- _pfs_reg_,_rp_reg_) \
- .proc _name_; \
-_name_:; \
- alloc _pfs_reg_=ar.pfs,_n_args_,_n_locals_,_n_outputs_,0;; \
- mov _rp_reg_=rp;; \
+#define STATIC_NESTED(_name_,_n_args_) \
+ .proc _name_; \
+_name_:; \
+ .regstk _n_args_, 0, 0, 0 \
MCOUNT
/*
diff --git a/sys/ia64/include/ia64_cpu.h b/sys/ia64/include/ia64_cpu.h
index ca205c2..4de9938 100644
--- a/sys/ia64/include/ia64_cpu.h
+++ b/sys/ia64/include/ia64_cpu.h
@@ -186,13 +186,36 @@ ia64_tpa(u_int64_t va)
* Read the value of ar.itc.
*/
static __inline u_int64_t
-ia64_read_itc(void)
+ia64_get_itc(void)
{
u_int64_t result;
__asm __volatile("mov %0=ar.itc" : "=r" (result));
return result;
}
+/*
+ * Read the value of ar.itm.
+ */
+static __inline u_int64_t
+ia64_get_itm(void)
+{
+ u_int64_t result;
+ __asm __volatile("mov %0=cr.itm" : "=r" (result));
+ return result;
+}
+
+/*
+ * Write the value of ar.itm.
+ */
+static __inline void
+ia64_set_itm(u_int64_t v)
+{
+ __asm __volatile("mov cr.itm=%0" :: "r" (v));
+}
+
+/*
+ * Write a region register.
+ */
static __inline void
ia64_set_rr(u_int64_t rrbase, u_int64_t v)
{
diff --git a/sys/ia64/include/pcb.h b/sys/ia64/include/pcb.h
index 41c3777..d8679ca 100644
--- a/sys/ia64/include/pcb.h
+++ b/sys/ia64/include/pcb.h
@@ -43,6 +43,13 @@ struct pcb {
struct ia64_fpreg pcb_f4;
struct ia64_fpreg pcb_f5;
+ 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;
@@ -51,10 +58,9 @@ struct pcb {
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_iip; /* address to restart */
- unsigned long pcb_onfault; /* for copy faults */
- unsigned long pcb_accessaddr; /* for [fs]uswintr */
+ u_int64_t pcb_onfault; /* for copy faults */
+ u_int64_t pcb_accessaddr; /* for [fs]uswintr */
};
/*
diff --git a/sys/ia64/include/proc.h b/sys/ia64/include/proc.h
index a2e9716..226aa94 100644
--- a/sys/ia64/include/proc.h
+++ b/sys/ia64/include/proc.h
@@ -38,7 +38,6 @@
struct mdproc {
u_long md_flags;
struct trapframe *md_tf; /* trap/syscall registers */
- struct pcb *md_pcbpaddr; /* phys addr of the pcb */
};
#define MDP_FPUSED 0x0001 /* Process used the FPU */
OpenPOWER on IntegriCloud