Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 250 → Rev 251

/SPARTAN/trunk/arch/amd64/include/cpuid.h
31,6 → 31,9
 
#include <arch/types.h>
 
#define AMD_CPUID_EXTENDED 0x80000001
#define AMD_EXT_NOEXECUTE 20
 
struct cpu_info {
__u32 cpuid_eax;
__u32 cpuid_ebx;
40,21 → 43,9
 
extern int has_cpuid(void);
 
static inline void cpuid(__u32 cmd, cpu_info_t *info)
{
__asm__ (
"movl %1, %eax"
"cpuid"
"movl %eax, 0(%0)"
"movl %ebx, 4(%0)"
"movl %ecx, 8(%0)"
"movl %edx, 12(%0)"
: "=m"(info)
: "r"(cmd)
: "%eax","%ebx","%ecx","%edx"
);
}
extern void cpuid(__u32 cmd, cpu_info_t *info);
 
 
extern __u64 rdtsc(void);
 
#endif