00001 /* define for src/arch/x86/cpuid.cpp */ 00002 #ifndef _CORE_ARCH_X86_CPUID_HPP 00003 #define _CORE_ARCH_X86_CPUID_HPP 00004 00005 namespace Arch { 00006 namespace x86 { 00007 00008 00009 extern uint32 volatile cpuid_failure; /*set by the isr on older procs*/ 00010 extern uint32 volatile cpuid_success; 00011 extern char cpu_vendor_name [13]; /*cpu vendor name*/ 00012 extern uint32 cpu_flags; /*cpu flags*/ 00013 extern uint32 cpu_signature; /*cpu signature*/ 00014 00015 /*consts for cpu_flags*/ 00016 const uint32 CPU_SEP = 0x0800; //sysenter-sysexit 00017 const uint32 CPU_TCS = 0x0010; //time-stamp counter 00018 00019 void init(); /*detect cpu type using cpuid*/ 00020 00021 void cpuid(uint32 input, uint32 *eax, uint32 *ebx, uint32 *ecx, uint32 *edx); /*perform the processor check*/ 00022 uint32 cpuid_isr(struct except_t *code); /*the interrupt called on older procs*/ 00023 int check_cpuid(); /*returns if cpuid exists*/ 00024 00025 00026 }; /*namespace x86*/ 00027 }; /*namespace Arch*/ 00028 00029 00030 #endif