mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-17 15:27:36 +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:
parent
5c004dc68e
commit
62ad058292
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91359
@ -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);
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user