aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64/include/cpu.h
diff options
context:
space:
mode:
authorJake Burkholder <jake@FreeBSD.org>2001-07-31 06:05:05 +0000
committerJake Burkholder <jake@FreeBSD.org>2001-07-31 06:05:05 +0000
commit89bf8575eeadb650aefa7fe48d0d9c9f58cd4d2a (patch)
tree09518e5a462c7f369bd3cbd7d956ad24588b2a9b /sys/sparc64/include/cpu.h
parent98bb5304e12e75a43230c686a5c7cb422d8f780d (diff)
downloadsrc-89bf8575eeadb650aefa7fe48d0d9c9f58cd4d2a.tar.gz
src-89bf8575eeadb650aefa7fe48d0d9c9f58cd4d2a.zip
Flesh out the sparc64 port considerably. This contains:
- mostly complete kernel pmap support, and tested but currently turned off userland pmap support - low level assembly language trap, context switching and support code - fully implemented atomic.h and supporting cpufunc.h - some support for kernel debugging with ddb - various header tweaks and filling out of machine dependent structures
Notes
Notes: svn path=/head/; revision=80709
Diffstat (limited to 'sys/sparc64/include/cpu.h')
-rw-r--r--sys/sparc64/include/cpu.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/sys/sparc64/include/cpu.h b/sys/sparc64/include/cpu.h
index a6c206a3c13d..83d34c3dd90d 100644
--- a/sys/sparc64/include/cpu.h
+++ b/sys/sparc64/include/cpu.h
@@ -32,10 +32,13 @@
#include <machine/frame.h>
#define CLKF_USERMODE(cfp) (0)
-#define CLKF_PC(cfp) (0)
+#define CLKF_PC(cfp) ((cfp)->cf_tf.tf_tpc)
-#define cpu_getstack(p) (0)
-#define cpu_setstack(p, sp) (0)
+#define TRAPF_PC(tfp) ((tfp)->tf_tpc)
+#define TRAPF_USERMODE(tfp) (0)
+
+#define cpu_getstack(p) ((p)->p_frame->tf_sp)
+#define cpu_setstack(p, sp) ((p)->p_frame->tf_sp = (sp))
/*
* Arrange to handle pending profiling ticks before returning to user mode.
@@ -66,11 +69,13 @@
{ "wall_cmos_clock", CTLTYPE_INT }, \
}
+void fork_trampoline(void);
+
static __inline u_int64_t
get_cyclecount(void)
{
- static u_long now;
- return (++now);
+
+ return (rd(tick));
}
#endif /* !_MACHINE_CPU_H_ */