Warning, cross-references for /kernel/include/util/cpuid.h need to be fixed.
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #ifndef CPUID_H_
0019 #define CPUID_H_
0020 #include "types.h"
0021
0022 #define I386_CPUID_BRAND_STRING_LENGTH 49
0023 #define I386_CPUID_BRAND_STRING_INPUT1 0x80000000
0024 #define I386_CPUID_BRAND_STRING_INPUT2 0x80000002
0025 #define I386_CPUID_BRAND_STRING_INPUT3 0x80000003
0026 #define I386_CPUID_BRAND_STRING_INPUT4 0x80000004
0027
0028
0029 static inline void
0030 cpuid (in_eax, in_ecx, out_eax, out_ebx, out_ecx, out_edx)
0031 uint32 in_eax, in_ecx;
0032 uint32 *out_eax, *out_ebx, *out_ecx, *out_edx;
0033 {
0034 uint32 eax, ebx, ecx, edx;
0035 asm volatile ("cpuid":"=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
0036 :"a" (in_eax), "c" (in_ecx));
0037 if (out_eax)
0038 *out_eax = eax;
0039 if (out_ebx)
0040 *out_ebx = ebx;
0041 if (out_ecx)
0042 *out_ecx = ecx;
0043 if (out_edx)
0044 *out_edx = edx;
0045 }
0046
0047 void cpuid_get_brand_string (char *, uint32);
0048 uint32 cpuid_display_family_model (void);
0049 bool cpuid_vmx_support (void);
0050 bool cpuid_tsc_support (void);
0051 bool cpuid_rdtscp_support (void);
0052 bool cpuid_invariant_tsc_support (void);
0053 bool cpuid_msr_support (void);
0054
0055 #endif
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066