|
Lines 109-114
Link Here
|
| 109 |
SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, |
109 |
SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, |
| 110 |
&hw_clockrate, 0, "CPU instruction clock rate"); |
110 |
&hw_clockrate, 0, "CPU instruction clock rate"); |
| 111 |
|
111 |
|
|
|
112 |
SYSCTL_UINT(_machdep, OID_AUTO, cpu_physical_address_bits, CTLFLAG_RD, |
| 113 |
&cpu_pma_bits, 0, "CPU physical address bits"); |
| 114 |
|
| 115 |
SYSCTL_UINT(_machdep, OID_AUTO, cpu_virtual_address_bits, CTLFLAG_RD, |
| 116 |
&cpu_vma_bits, 0, "CPU virtual address bits"); |
| 117 |
|
| 112 |
static eventhandler_tag tsc_post_tag; |
118 |
static eventhandler_tag tsc_post_tag; |
| 113 |
|
119 |
|
| 114 |
static char cpu_brand[48]; |
120 |
static char cpu_brand[48]; |
|
Lines 516-521
Link Here
|
| 516 |
cpu_feature = regs[3]; |
522 |
cpu_feature = regs[3]; |
| 517 |
cpu_feature2 = regs[2]; |
523 |
cpu_feature2 = regs[2]; |
| 518 |
|
524 |
|
|
|
525 |
/* Intel CPUID Specification chapter 5.2.7 |
| 526 |
* eax=0x80000008 |
| 527 |
* */ |
| 528 |
do_cpuid(0x80000008, regs); |
| 529 |
|
| 530 |
/* upper bits are virtual size */ |
| 531 |
cpu_vma_bits = ((regs[0] >> 8) & 0xFF); |
| 532 |
/* lower bits are physical size */ |
| 533 |
cpu_pma_bits = (regs[0] & 0xFF); |
| 534 |
|
| 519 |
/* |
535 |
/* |
| 520 |
* Clear "Limit CPUID Maxval" bit and get the largest standard CPUID |
536 |
* Clear "Limit CPUID Maxval" bit and get the largest standard CPUID |
| 521 |
* function number again if it is set from BIOS. It is necessary |
537 |
* function number again if it is set from BIOS. It is necessary |