_cpuid() - full cpuid instruction wrapper
- the prototype changes to _cpuid(u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx) - this makes possible to use all the features of the cpuid instruction as described in the Intel specs
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
#define _CPUF_I386_SSE4_1 11
|
||||
#define _CPUF_I386_SSE4_2 12
|
||||
|
||||
#define _CPUF_I386_HTT 13 /* Supports HTT */
|
||||
#define _CPUF_I386_HTT_MAX_NUM 14 /* Maximal num of threads */
|
||||
|
||||
_PROTOTYPE(int _cpufeature, (int featureno));
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@ _PROTOTYPE(void std_err, (char *_s));
|
||||
_PROTOTYPE(void prints, (const char *_s, ...));
|
||||
_PROTOTYPE(int fsversion, (char *_dev, char *_prog));
|
||||
_PROTOTYPE(int getprocessor, (void));
|
||||
_PROTOTYPE(void _cpuid, (u32_t eax_in, u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx));
|
||||
_PROTOTYPE(void _cpuid, (u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx));
|
||||
_PROTOTYPE(int load_mtab, (char *_prog_name));
|
||||
_PROTOTYPE(int rewrite_mtab, (char *_prog_name));
|
||||
_PROTOTYPE(int get_mtab_entry, (char *_s1, char *_s2, char *_s3, char *_s4));
|
||||
|
||||
@@ -75,6 +75,7 @@ sys/vm_i386.h
|
||||
#define CPUID1_EDX_PGE (1L << 13) /* Page Global (bit) Enable */
|
||||
#define CPUID1_EDX_APIC_ON_CHIP (1L << 9) /* APIC is present on the chip */
|
||||
#define CPUID1_EDX_TSC (1L << 4) /* Timestamp counter present */
|
||||
#define CPUID1_EDX_HTT (1L << 28) /* Supports HTT */
|
||||
#define CPUID1_EDX_FXSR (1L << 24)
|
||||
#define CPUID1_EDX_SSE (1L << 25)
|
||||
#define CPUID1_EDX_SSE2 (1L << 26)
|
||||
|
||||
Reference in New Issue
Block a user