diff options
author | jake <jake@FreeBSD.org> | 2002-02-27 06:05:50 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-02-27 06:05:50 +0000 |
commit | c584d5961c05615a8b4e160f1354b2b3a2448db4 (patch) | |
tree | 51f6895eb6a29faa22e7d2a636a02adea6096bb7 | |
parent | 1b62fa07e3742c29ae1c22a1cf05ba36da290b79 (diff) | |
download | FreeBSD-src-c584d5961c05615a8b4e160f1354b2b3a2448db4.zip FreeBSD-src-c584d5961c05615a8b4e160f1354b2b3a2448db4.tar.gz |
Make cpu_identify take the value of the ver register and cpuid as arguments
so we can print nice things about non-current cpus.
-rw-r--r-- | sys/sparc64/include/md_var.h | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/identcpu.c | 6 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h index e180aa1..58e7b00 100644 --- a/sys/sparc64/include/md_var.h +++ b/sys/sparc64/include/md_var.h @@ -50,7 +50,7 @@ struct reg; struct pcpu; void cpu_halt(void); -void cpu_identify(u_int clock); +void cpu_identify(u_long vers, u_int clock, u_int id); void cpu_reset(void); void cpu_setregs(struct pcpu *pc); int is_physical_memory(vm_offset_t addr); diff --git a/sys/sparc64/sparc64/identcpu.c b/sys/sparc64/sparc64/identcpu.c index 45b5d0f..6597cdd 100644 --- a/sys/sparc64/sparc64/identcpu.c +++ b/sys/sparc64/sparc64/identcpu.c @@ -28,15 +28,13 @@ SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD, int cpu_impl; void -cpu_identify(unsigned int freq) +cpu_identify(u_long vers, u_int freq, u_int id) { const char *manus; const char *impls; - unsigned long vers; manus = NULL; impls = NULL; - vers = rdpr(ver); switch (VER_MANUF(vers)) { case 0x04: @@ -77,7 +75,7 @@ cpu_identify(unsigned int freq) } snprintf(cpu_model, sizeof(cpu_model), "%s %s", manus, impls); - printf("CPU: %s %s Processor (%d.%02d MHZ CPU)\n", manus, impls, + printf("cpu%d: %s %s Processor (%d.%02d MHZ CPU)\n", id, manus, impls, (freq + 4999) / 1000000, ((freq + 4999) / 10000) % 100); if (bootverbose) { printf(" mask=0x%lx maxtl=%ld maxwin=%ld\n", VER_MASK(vers), diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index a738c73..58ff07a 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -167,7 +167,7 @@ cpu_startup(void *arg) tick_tc.tc_name = "tick"; tc_init(&tick_tc); - cpu_identify(clock); + cpu_identify(rdpr(ver), clock, PCPU_GET(cpuid)); cache_init(child); vm_ksubmap_init(&kmi); |