1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-18 15:30:21 +00:00

Make cpu_identify take the value of the ver register and cpuid as arguments

so we can print nice things about non-current cpus.
This commit is contained in:
Jake Burkholder 2002-02-27 06:05:50 +00:00
parent 5c004dc68e
commit 62ad058292
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91359
3 changed files with 4 additions and 6 deletions

View File

@ -50,7 +50,7 @@ struct reg;
struct pcpu; struct pcpu;
void cpu_halt(void); 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_reset(void);
void cpu_setregs(struct pcpu *pc); void cpu_setregs(struct pcpu *pc);
int is_physical_memory(vm_offset_t addr); int is_physical_memory(vm_offset_t addr);

View File

@ -28,15 +28,13 @@ SYSCTL_STRING(_hw, HW_MODEL, model, CTLFLAG_RD,
int cpu_impl; int cpu_impl;
void void
cpu_identify(unsigned int freq) cpu_identify(u_long vers, u_int freq, u_int id)
{ {
const char *manus; const char *manus;
const char *impls; const char *impls;
unsigned long vers;
manus = NULL; manus = NULL;
impls = NULL; impls = NULL;
vers = rdpr(ver);
switch (VER_MANUF(vers)) { switch (VER_MANUF(vers)) {
case 0x04: case 0x04:
@ -77,7 +75,7 @@ cpu_identify(unsigned int freq)
} }
snprintf(cpu_model, sizeof(cpu_model), "%s %s", manus, impls); 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); (freq + 4999) / 1000000, ((freq + 4999) / 10000) % 100);
if (bootverbose) { if (bootverbose) {
printf(" mask=0x%lx maxtl=%ld maxwin=%ld\n", VER_MASK(vers), printf(" mask=0x%lx maxtl=%ld maxwin=%ld\n", VER_MASK(vers),

View File

@ -167,7 +167,7 @@ cpu_startup(void *arg)
tick_tc.tc_name = "tick"; tick_tc.tc_name = "tick";
tc_init(&tick_tc); tc_init(&tick_tc);
cpu_identify(clock); cpu_identify(rdpr(ver), clock, PCPU_GET(cpuid));
cache_init(child); cache_init(child);
vm_ksubmap_init(&kmi); vm_ksubmap_init(&kmi);