|
Lines 52-57
Link Here
|
| 52 |
#include <sys/tty.h> |
52 |
#include <sys/tty.h> |
| 53 |
#include <sys/vnode.h> |
53 |
#include <sys/vnode.h> |
| 54 |
#include <sys/lock.h> |
54 |
#include <sys/lock.h> |
|
|
55 |
#include <sys/sysctl.h> |
| 55 |
|
56 |
|
| 56 |
#include <vm/vm.h> |
57 |
#include <vm/vm.h> |
| 57 |
#include <vm/pmap.h> |
58 |
#include <vm/pmap.h> |
|
Lines 174-180
Link Here
|
| 174 |
int xlen; |
175 |
int xlen; |
| 175 |
char psbuf[512]; /* XXX - conservative */ |
176 |
char psbuf[512]; /* XXX - conservative */ |
| 176 |
int class; |
177 |
int class; |
| 177 |
int i; |
178 |
int ncpu, mib[2], i, cpucnt, olen=sizeof(ncpu), plen=0; |
| 178 |
#if 0 |
179 |
#if 0 |
| 179 |
extern char *cpu_model; /* Yuck */ |
180 |
extern char *cpu_model; /* Yuck */ |
| 180 |
#endif |
181 |
#endif |
|
Lines 217-230
Link Here
|
| 217 |
break; |
218 |
break; |
| 218 |
} |
219 |
} |
| 219 |
|
220 |
|
|
|
221 |
mib[0] = CTL_HW; mib[1] = HW_NCPU; |
| 222 |
if (kernel_sysctl(p, mib, 2, &ncpu, &olen, NULL, 0, &plen)) |
| 223 |
ncpu=1; /* Fake out if the sysctl failed */ |
| 224 |
|
| 220 |
ps = psbuf; |
225 |
ps = psbuf; |
| 221 |
ps += sprintf(ps, |
226 |
|
|
|
227 |
for (cpucnt = 0; cpucnt < ncpu; cpucnt++) { |
| 228 |
if ( cpucnt ) ps += sprintf (ps, "\n"); |
| 229 |
|
| 230 |
ps += sprintf(ps, |
| 222 |
"processor\t: %d\n" |
231 |
"processor\t: %d\n" |
| 223 |
"vendor_id\t: %.20s\n" |
232 |
"vendor_id\t: %.20s\n" |
| 224 |
"cpu family\t: %d\n" |
233 |
"cpu family\t: %d\n" |
| 225 |
"model\t\t: %d\n" |
234 |
"model\t\t: %d\n" |
| 226 |
"stepping\t: %d\n", |
235 |
"stepping\t: %d\n", |
| 227 |
0, cpu_vendor, class, cpu, cpu_id & 0xf); |
236 |
cpucnt, cpu_vendor, class, cpu, cpu_id & 0xf); |
| 228 |
|
237 |
|
| 229 |
ps += sprintf(ps, |
238 |
ps += sprintf(ps, |
| 230 |
"flags\t\t:"); |
239 |
"flags\t\t:"); |
|
Lines 248-253
Link Here
|
| 248 |
(tsc_freq + 4999) / 1000000, |
257 |
(tsc_freq + 4999) / 1000000, |
| 249 |
((tsc_freq + 4999) / 10000) % 100); |
258 |
((tsc_freq + 4999) / 10000) % 100); |
| 250 |
} |
259 |
} |
|
|
260 |
} |
| 251 |
|
261 |
|
| 252 |
xlen = ps - psbuf; |
262 |
xlen = ps - psbuf; |
| 253 |
xlen -= uio->uio_offset; |
263 |
xlen -= uio->uio_offset; |