Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linprocfs/linprocfs.c
Show First 20 Lines • Show All 295 Lines • ▼ Show 20 Lines | if (cpu_exthigh >= 0x80000006) | ||||
do_cpuid(0x80000006, cache_size); | do_cpuid(0x80000006, cache_size); | ||||
else | else | ||||
memset(cache_size, 0, sizeof(cache_size)); | memset(cache_size, 0, sizeof(cache_size)); | ||||
for (i = 0; i < mp_ncpus; ++i) { | for (i = 0; i < mp_ncpus; ++i) { | ||||
fqmhz = 0; | fqmhz = 0; | ||||
fqkhz = 0; | fqkhz = 0; | ||||
freq = atomic_load_acq_64(&tsc_freq); | freq = atomic_load_acq_64(&tsc_freq); | ||||
if (freq != 0) { | if (freq != 0) { | ||||
fqmhz = (freq + 4999) / 1000000; | fqmhz = (freq + 4999) / 500000; | ||||
fqkhz = ((freq + 4999) / 10000) % 100; | fqkhz = ((freq + 4999) / 50000) % 100; | ||||
} | } | ||||
sbuf_printf(sb, | sbuf_printf(sb, | ||||
"processor\t: %d\n" | "processor\t: %d\n" | ||||
"vendor_id\t: %.20s\n" | "vendor_id\t: %.20s\n" | ||||
"cpu family\t: %u\n" | "cpu family\t: %u\n" | ||||
"model\t\t: %u\n" | "model\t\t: %u\n" | ||||
"model name\t: %s\n" | "model name\t: %s\n" | ||||
"stepping\t: %u\n" | "stepping\t: %u\n" | ||||
▲ Show 20 Lines • Show All 1,504 Lines • Show Last 20 Lines |