|
62 | 62 | #define ARM_CPU_IMP_ARM 0x41 |
63 | 63 | #define ARM_CPU_IMP_INTEL 0x69 |
64 | 64 |
|
65 | | -#define ARM_CPU_PART_ARM1136 0xB360 |
66 | | -#define ARM_CPU_PART_ARM1156 0xB560 |
67 | | -#define ARM_CPU_PART_ARM1176 0xB760 |
68 | | -#define ARM_CPU_PART_ARM11MPCORE 0xB020 |
69 | | -#define ARM_CPU_PART_CORTEX_A8 0xC080 |
70 | | -#define ARM_CPU_PART_CORTEX_A9 0xC090 |
71 | | -#define ARM_CPU_PART_CORTEX_A5 0xC050 |
72 | | -#define ARM_CPU_PART_CORTEX_A15 0xC0F0 |
73 | | -#define ARM_CPU_PART_CORTEX_A7 0xC070 |
74 | | -#define ARM_CPU_PART_CORTEX_A12 0xC0D0 |
75 | | -#define ARM_CPU_PART_CORTEX_A17 0xC0E0 |
| 65 | +/* ARM implemented processors */ |
| 66 | +#define ARM_CPU_PART_ARM1136 0x4100b360 |
| 67 | +#define ARM_CPU_PART_ARM1156 0x4100b560 |
| 68 | +#define ARM_CPU_PART_ARM1176 0x4100b760 |
| 69 | +#define ARM_CPU_PART_ARM11MPCORE 0x4100b020 |
| 70 | +#define ARM_CPU_PART_CORTEX_A8 0x4100c080 |
| 71 | +#define ARM_CPU_PART_CORTEX_A9 0x4100c090 |
| 72 | +#define ARM_CPU_PART_CORTEX_A5 0x4100c050 |
| 73 | +#define ARM_CPU_PART_CORTEX_A7 0x4100c070 |
| 74 | +#define ARM_CPU_PART_CORTEX_A12 0x4100c0d0 |
| 75 | +#define ARM_CPU_PART_CORTEX_A17 0x4100c0e0 |
| 76 | +#define ARM_CPU_PART_CORTEX_A15 0x4100c0f0 |
76 | 77 |
|
77 | 78 | #define ARM_CPU_XSCALE_ARCH_MASK 0xe000 |
78 | 79 | #define ARM_CPU_XSCALE_ARCH_V1 0x2000 |
@@ -171,14 +172,24 @@ static inline unsigned int __attribute_const__ read_cpuid_implementor(void) |
171 | 172 | return (read_cpuid_id() & 0xFF000000) >> 24; |
172 | 173 | } |
173 | 174 |
|
174 | | -static inline unsigned int __attribute_const__ read_cpuid_part_number(void) |
| 175 | +/* |
| 176 | + * The CPU part number is meaningless without referring to the CPU |
| 177 | + * implementer: implementers are free to define their own part numbers |
| 178 | + * which are permitted to clash with other implementer part numbers. |
| 179 | + */ |
| 180 | +static inline unsigned int __attribute_const__ read_cpuid_part(void) |
| 181 | +{ |
| 182 | + return read_cpuid_id() & 0xff00fff0; |
| 183 | +} |
| 184 | + |
| 185 | +static inline unsigned int __attribute_const__ __deprecated read_cpuid_part_number(void) |
175 | 186 | { |
176 | 187 | return read_cpuid_id() & 0xFFF0; |
177 | 188 | } |
178 | 189 |
|
179 | 190 | static inline unsigned int __attribute_const__ xscale_cpu_arch_version(void) |
180 | 191 | { |
181 | | - return read_cpuid_part_number() & ARM_CPU_XSCALE_ARCH_MASK; |
| 192 | + return read_cpuid_id() & ARM_CPU_XSCALE_ARCH_MASK; |
182 | 193 | } |
183 | 194 |
|
184 | 195 | static inline unsigned int __attribute_const__ read_cpuid_cachetype(void) |
|
0 commit comments