Changeset 89344d85 in mainline for arch/amd64/include/cpuid.h
- Timestamp:
- 2005-09-03T00:19:23Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 36b209a
- Parents:
- e4a6dda
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/amd64/include/cpuid.h
re4a6dda r89344d85 32 32 #include <arch/types.h> 33 33 34 #define AMD_CPUID_EXTENDED 0x80000001 35 #define AMD_EXT_NOEXECUTE 20 36 34 37 struct cpu_info { 35 38 __u32 cpuid_eax; … … 41 44 extern int has_cpuid(void); 42 45 43 static inline void cpuid(__u32 cmd, cpu_info_t *info) 44 { 45 __asm__ ( 46 "movl %1, %eax" 47 "cpuid" 48 "movl %eax, 0(%0)" 49 "movl %ebx, 4(%0)" 50 "movl %ecx, 8(%0)" 51 "movl %edx, 12(%0)" 52 : "=m"(info) 53 : "r"(cmd) 54 : "%eax","%ebx","%ecx","%edx" 55 ); 56 } 46 extern void cpuid(__u32 cmd, cpu_info_t *info); 47 57 48 58 49 extern __u64 rdtsc(void);
Note:
See TracChangeset
for help on using the changeset viewer.