Changeset 45b4300 in mainline for kernel/arch/ia32/include/arch/cpuid.h
- Timestamp:
- 2013-05-30T22:00:56Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b903ca
- Parents:
- 95e370f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/include/arch/cpuid.h
r95e370f8 r45b4300 50 50 uint32_t cpuid_ecx; 51 51 uint32_t cpuid_edx; 52 } __attribute__ 52 } __attribute__((packed)) cpu_info_t; 53 53 54 struct __cpuid_extended_feature_info {55 unsigned sse3 :1;56 unsigned 57 } __attribute__ 54 struct cpuid_extended_feature_info { 55 unsigned int sse3 : 1; 56 unsigned int : 31; 57 } __attribute__((packed)); 58 58 59 typedef union cpuid_extended_feature_info{60 struct __cpuid_extended_feature_info bits;59 typedef union { 60 struct cpuid_extended_feature_info bits; 61 61 uint32_t word; 62 } cpuid_extended_feature_info ;62 } cpuid_extended_feature_info_t; 63 63 64 struct __cpuid_feature_info {65 unsigned 66 unsigned sep :1;67 unsigned 68 unsigned mmx :1;69 unsigned fxsr :1;70 unsigned sse :1;71 unsigned sse2 :1;72 unsigned :5;73 } __attribute__ 64 struct cpuid_feature_info { 65 unsigned int : 11; 66 unsigned int sep : 1; 67 unsigned int : 11; 68 unsigned int mmx : 1; 69 unsigned int fxsr : 1; 70 unsigned int sse : 1; 71 unsigned int sse2 : 1; 72 unsigned int : 5; 73 } __attribute__((packed)); 74 74 75 typedef union cpuid_feature_info{76 struct __cpuid_feature_info bits;75 typedef union { 76 struct cpuid_feature_info bits; 77 77 uint32_t word; 78 } cpuid_feature_info; 79 78 } cpuid_feature_info_t; 80 79 81 80 static inline uint32_t has_cpuid(void) 82 81 { 83 uint32_t val, ret; 82 uint32_t val; 83 uint32_t ret; 84 84 85 85 asm volatile (
Note:
See TracChangeset
for help on using the changeset viewer.