- Set cpu_impl early in sparc64_init so that we can use it to detect

UltraSPARC III and higher cpus and do needed setup.
- Disable the "system tick" interrupt for UltraSPARC III.  This avoids
  an interrupt storm on startup since we're not prepared for these at
  all.  This feature has questionable use anyway.
- Clear tick on startup and then leave it alone.
This commit is contained in:
Jake Burkholder 2003-03-19 05:51:21 +00:00
parent 6ce75196ce
commit 2b8cd5a6a2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=112398
4 changed files with 12 additions and 3 deletions

View File

@ -47,8 +47,7 @@ cpu_identify(u_long vers, u_int freq, u_int id)
manus = NULL;
break;
}
cpu_impl = VER_IMPL(vers);
switch (cpu_impl) {
switch (VER_IMPL(vers)) {
case CPU_IMPL_SPARC64:
impls = "SPARC64";
break;

View File

@ -56,6 +56,7 @@ ENTRY(_start)
wrpr %g0, 0, %cleanwin
wrpr %g0, 0, %pil
wr %g0, 0, %fprs
wrpr %g0, 0, %tick
/*
* Get onto our per-cpu panic stack, which precedes the struct pcpu in

View File

@ -206,6 +206,12 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
end = 0;
kmdp = NULL;
/*
* Find out what kind of cpu we have first, for anything that changes
* behaviour.
*/
cpu_impl = VER_IMPL(rdpr(ver));
/*
* Initialize openfirmware (needed for console).
*/

View File

@ -46,6 +46,7 @@
#include <machine/frame.h>
#include <machine/intr_machdep.h>
#include <machine/tick.h>
#include <machine/ver.h>
#ifdef SMP
#include <machine/cpu.h>
#endif
@ -137,6 +138,8 @@ tick_start_ap(void)
void
tick_stop(void)
{
wrpr(tick, 0, 0);
if (cpu_impl >= CPU_IMPL_ULTRASPARCIII)
wr(asr24, 1L << 63, 0);
wr(asr23, 1L << 63, 0);
}