Bug #400 ยป intel_cpuid2.diff
cpu/i386/include/specialreg.h 7 Dec 2006 14:24:19 -0000 | ||
---|---|---|
#define CPUID_B30 0x40000000
|
||
#define CPUID_PBE 0x80000000
|
||
#define CPUID2_SSE3 0x00000001
|
||
#define CPUID2_MON 0x00000008
|
||
#define CPUID2_DS_CPL 0x00000010
|
||
#define CPUID2_EST 0x00000080
|
||
#define CPUID2_TM2 0x00000100
|
||
#define CPUID2_CNTXID 0x00000400
|
||
#define CPUID2_CX16 0x00002000
|
||
/*
|
||
* CPUID instruction 1 ebx info
|
||
*/
|
machine/pc32/i386/est.c 7 Dec 2006 14:18:01 -0000 | ||
---|---|---|
int err;
|
||
size_t i;
|
||
/* XXX TGEN this is dead code now, retained for reference */
|
||
#ifndef CPUID2_EST
|
||
int regs[4];
|
||
machine/pc32/i386/identcpu.c 7 Dec 2006 14:27:06 -0000 | ||
---|---|---|
"\040PBE" /* Pending Break Enable */
|
||
);
|
||
if (cpu_feature2 != 0) {
|
||
printf("\n Features2=0x%b", cpu_feature2,
|
||
"\020"
|
||
"\001SSE3" /* SSE3 */
|
||
"\002<b1>"
|
||
"\003RSVD2" /* "Reserved" bit 2 */
|
||
"\004MON" /* MONITOR/MWAIT Instructions */
|
||
"\005DS_CPL" /* CPL Qualified Debug Store */
|
||
"\006VMX" /* Virtual Machine Extensions */
|
||
"\007<b6>"
|
||
"\010EST" /* Enhanced SpeedStep */
|
||
"\011TM2" /* Thermal Monitor 2 */
|
||
"\012<b9>"
|
||
"\013CNTX-ID" /* L1 context ID available */
|
||
"\014<b11>"
|
||
"\015<b12>"
|
||
"\016CX16" /* CMPXCHG16B Instruction */
|
||
"\017XTPR" /* Send Task Priority Messages*/
|
||
"\020<b15>"
|
||
"\021<b16>"
|
||
"\022<b17>"
|
||
"\023<b18>"
|
||
"\024<b19>"
|
||
"\025<b20>"
|
||
"\026<b21>"
|
||
"\027<b22>"
|
||
"\030<b23>"
|
||
"\031<b24>"
|
||
"\032<b25>"
|
||
"\033<b26>"
|
||
"\034<b27>"
|
||
"\035<b28>"
|
||
"\036<b29>"
|
||
"\037<b30>"
|
||
"\040<b31>"
|
||
);
|
||
}
|
||
/*
|
||
* If this CPU supports hyperthreading then mention
|
||
* the number of logical CPU's it contains.
|
machine/pc32/i386/locore.s 7 Dec 2006 14:13:29 -0000 | ||
---|---|---|
.globl boothowto,bootdev
|
||
.globl cpu,cpu_vendor,cpu_id,bootinfo
|
||
.globl cpu_high, cpu_feature, cpu_procinfo
|
||
.globl cpu_high, cpu_feature, cpu_feature2, cpu_procinfo
|
||
cpu: .long 0 /* are we 386, 386sx, or 486 */
|
||
cpu_id: .long 0 /* stepping ID */
|
||
cpu_high: .long 0 /* highest arg to CPUID */
|
||
cpu_feature: .long 0 /* features */
|
||
cpu_feature2: .long 0 /* additional features */
|
||
cpu_procinfo: .long 0 /* brand index / HTT info */
|
||
cpu_vendor: .space 20 /* CPU origin code */
|
||
bootinfo: .space BOOTINFO_SIZE /* bootinfo buffer space */
|
||
... | ... | |
movl %eax,R(cpu_id) # store cpu_id
|
||
movl %ebx,R(cpu_procinfo) # store cpu_procinfo
|
||
movl %edx,R(cpu_feature) # store cpu_feature
|
||
movl %ecx,R(cpu_feature2) # store cpu_feature2
|
||
rorl $8,%eax # extract family type
|
||
andl $15,%eax
|
||
cmpl $5,%eax
|
sys/systm.h 7 Dec 2006 14:23:20 -0000 | ||
---|---|---|
extern int ncpus2_mask; /* ncpus2 - 1 */
|
||
extern int clocks_running; /* timing/timeout subsystem is operational */
|
||
/* XXX TGEN these don't belong here, they're MD on i386/amd64 */
|
||
extern u_int cpu_feature; /* CPUID_* features */
|
||
extern u_int cpu_feature2; /* CPUID2_* features */
|
||
extern int nfs_diskless_valid; /* NFS diskless params were obtained */
|
||
extern vm_paddr_t Maxmem; /* Highest physical memory address in system */
|
||