diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2008-09-03 17:39:19 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2008-09-03 17:39:19 +0000 |
| commit | 09c7f9e338a08761881452a9f438e358d5da0cc1 (patch) | |
| tree | 4ee9a429ab0d10c1eb85191073e29aeae98587e6 /sys/sparc64/include | |
| parent | b898f38ce776088813f2b0a61423a094fe9af1dd (diff) | |
Notes
Diffstat (limited to 'sys/sparc64/include')
| -rw-r--r-- | sys/sparc64/include/clock.h | 8 | ||||
| -rw-r--r-- | sys/sparc64/include/cpufunc.h | 9 | ||||
| -rw-r--r-- | sys/sparc64/include/pcpu.h | 1 | ||||
| -rw-r--r-- | sys/sparc64/include/smp.h | 8 | ||||
| -rw-r--r-- | sys/sparc64/include/tick.h | 2 | ||||
| -rw-r--r-- | sys/sparc64/include/ver.h | 4 |
6 files changed, 25 insertions, 7 deletions
diff --git a/sys/sparc64/include/clock.h b/sys/sparc64/include/clock.h index b0e4c0b06d0b..fd57731ccbe2 100644 --- a/sys/sparc64/include/clock.h +++ b/sys/sparc64/include/clock.h @@ -29,8 +29,10 @@ #ifndef _MACHINE_CLOCK_H_ #define _MACHINE_CLOCK_H_ -extern u_long tick_increment; -extern u_long tick_freq; -extern u_long tick_MHz; +extern void (*delay_func)(int usec); +extern u_long clock_boot; + +void delay_boot(int usec); +void delay_tick(int usec); #endif /* !_MACHINE_CLOCK_H_ */ diff --git a/sys/sparc64/include/cpufunc.h b/sys/sparc64/include/cpufunc.h index fca5984b772b..60533f837020 100644 --- a/sys/sparc64/include/cpufunc.h +++ b/sys/sparc64/include/cpufunc.h @@ -174,6 +174,15 @@ int fasword32(u_long asi, void *addr, uint32_t *val); } while (0) /* + * Trick GAS/GCC into compiling access to STICK/STICK_COMPARE independently + * of the selected instruction set. + */ +#define rdstick() rd(asr24) +#define rdstickcmpr() rd(asr25) +#define wrstick(val, xor) wr(asr24, (val), (xor)) +#define wrstickcmpr(val, xor) wr(asr25, (val), (xor)) + +/* * Macro intended to be used instead of wr(asr23, val, xor) for writing to * the TICK_COMPARE register in order to avoid a bug in BlackBird CPUs that * can cause these writes to fail under certain condidtions which in turn diff --git a/sys/sparc64/include/pcpu.h b/sys/sparc64/include/pcpu.h index 2ccdbd97fbfc..efb5174fe7ab 100644 --- a/sys/sparc64/include/pcpu.h +++ b/sys/sparc64/include/pcpu.h @@ -53,6 +53,7 @@ struct pmap; vm_offset_t pc_addr; \ u_long pc_tickref; \ u_long pc_tickadj; \ + u_int pc_clock; \ u_int pc_mid; \ u_int pc_node; \ u_int pc_tlb_ctx; \ diff --git a/sys/sparc64/include/smp.h b/sys/sparc64/include/smp.h index 3e1d9ac27ff0..23076effe63c 100644 --- a/sys/sparc64/include/smp.h +++ b/sys/sparc64/include/smp.h @@ -29,9 +29,10 @@ #ifndef _MACHINE_SMP_H_ #define _MACHINE_SMP_H_ -#define CPU_CLKSYNC 1 -#define CPU_INIT 2 -#define CPU_BOOTSTRAP 3 +#define CPU_TICKSYNC 1 +#define CPU_STICKSYNC 2 +#define CPU_INIT 3 +#define CPU_BOOTSTRAP 4 #ifndef LOCORE @@ -62,6 +63,7 @@ struct cpu_start_args { u_int csa_state; vm_offset_t csa_pcpu; u_long csa_tick; + u_long csa_stick; u_long csa_ver; struct tte csa_ttes[PCPU_PAGES]; }; diff --git a/sys/sparc64/include/tick.h b/sys/sparc64/include/tick.h index 8586a0d89f8d..456e9f037ba4 100644 --- a/sys/sparc64/include/tick.h +++ b/sys/sparc64/include/tick.h @@ -29,7 +29,7 @@ #ifndef _MACHINE_TICK_H_ #define _MACHINE_TICK_H_ -void tick_init(u_long clock); +void tick_clear(void); void tick_start(void); void tick_stop(void); diff --git a/sys/sparc64/include/ver.h b/sys/sparc64/include/ver.h index 78e57d822b89..0fb7933f0bc5 100644 --- a/sys/sparc64/include/ver.h +++ b/sys/sparc64/include/ver.h @@ -41,6 +41,8 @@ #define VER_MAXTL_SIZE (8) #define VER_MAXWIN_SIZE (5) +#ifndef LOCORE + #define VER_MANUF_MASK (((1L<<VER_MANUF_SIZE)-1)<<VER_MANUF_SHIFT) #define VER_IMPL_MASK (((1L<<VER_IMPL_SIZE)-1)<<VER_IMPL_SHIFT) #define VER_MASK_MASK (((1L<<VER_MASK_SIZE)-1)<<VER_MASK_SHIFT) @@ -61,6 +63,8 @@ extern int cpu_impl; extern char sparc64_model[]; +#endif /* !LOCORE */ + /* Known implementations. */ #define CPU_IMPL_SPARC64 0x01 #define CPU_IMPL_ULTRASPARCI 0x10 |
