Skip to content

Commit 5e13556

Browse files
authored
ARMPartDecoder: Update ARM CPU mapping table with util-linux 2.39.3 (#399)
1 parent 0dd6f55 commit 5e13556

File tree

1 file changed

+126
-20
lines changed

1 file changed

+126
-20
lines changed

src/Utils/ARMPartDecoder.vala

Lines changed: 126 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
public class About.ARMPartDecoder {
21+
// Vala port of https://github.com/util-linux/util-linux/blob/2da5c904e18fdcffd2b252d641e6f76374c7b406/sys-utils/lscpu-arm.c
2122
struct ARMPart {
2223
int id;
2324
string name;
@@ -62,41 +63,75 @@ public class About.ARMPartDecoder {
6263
{ 0xc27, "Cortex-M7" },
6364
{ 0xc60, "Cortex-M0+" },
6465
{ 0xd01, "Cortex-A32" },
66+
{ 0xd02, "Cortex-A34" },
6567
{ 0xd03, "Cortex-A53" },
6668
{ 0xd04, "Cortex-A35" },
6769
{ 0xd05, "Cortex-A55" },
70+
{ 0xd06, "Cortex-A65" },
6871
{ 0xd07, "Cortex-A57" },
6972
{ 0xd08, "Cortex-A72" },
7073
{ 0xd09, "Cortex-A73" },
7174
{ 0xd0a, "Cortex-A75" },
7275
{ 0xd0b, "Cortex-A76" },
7376
{ 0xd0c, "Neoverse-N1" },
77+
{ 0xd0d, "Cortex-A77" },
78+
{ 0xd0e, "Cortex-A76AE" },
7479
{ 0xd13, "Cortex-R52" },
80+
{ 0xd15, "Cortex-R82" },
81+
{ 0xd16, "Cortex-R52+" },
7582
{ 0xd20, "Cortex-M23" },
7683
{ 0xd21, "Cortex-M33" },
77-
{ 0xd4a, "Neoverse-E1" }
84+
{ 0xd22, "Cortex-M55" },
85+
{ 0xd23, "Cortex-M85" },
86+
{ 0xd40, "Neoverse-V1" },
87+
{ 0xd41, "Cortex-A78" },
88+
{ 0xd42, "Cortex-A78AE" },
89+
{ 0xd43, "Cortex-A65AE" },
90+
{ 0xd44, "Cortex-X1" },
91+
{ 0xd46, "Cortex-A510" },
92+
{ 0xd47, "Cortex-A710" },
93+
{ 0xd48, "Cortex-X2" },
94+
{ 0xd49, "Neoverse-N2" },
95+
{ 0xd4a, "Neoverse-E1" },
96+
{ 0xd4b, "Cortex-A78C" },
97+
{ 0xd4c, "Cortex-X1C" },
98+
{ 0xd4d, "Cortex-A715" },
99+
{ 0xd4e, "Cortex-X3" },
100+
{ 0xd4f, "Neoverse-V2" },
101+
{ 0xd80, "Cortex-A520" },
102+
{ 0xd81, "Cortex-A720" },
103+
{ 0xd82, "Cortex-X4" },
78104
};
79105

80106
const ARMPart BROADCOM_PARTS[] = {
81-
{ 0x0f, "Brahma B15" },
82-
{ 0x100, "Brahma B53" }
107+
{ 0x0f, "Brahma-B15" },
108+
{ 0x100, "Brahma-B53" },
109+
{ 0x516, "ThunderX2" },
83110
};
84111

85112
const ARMPart DEC_PARTS[] = {
86113
{ 0xa10, "SA110" },
87-
{ 0xa11, "SA1100" }
114+
{ 0xa11, "SA1100" },
88115
};
89116

90117
const ARMPart CAVIUM_PARTS[] = {
91118
{ 0x0a0, "ThunderX" },
92-
{ 0x0a1, "ThunderX 88XX" },
93-
{ 0x0a2, "ThunderX 81XX" },
94-
{ 0x0a3, "ThunderX 83XX" },
95-
{ 0x0af, "ThunderX2 99xx" }
119+
{ 0x0a1, "ThunderX-88XX" },
120+
{ 0x0a2, "ThunderX-81XX" },
121+
{ 0x0a3, "ThunderX-83XX" },
122+
{ 0x0af, "ThunderX2-99xx" },
123+
{ 0x0b0, "OcteonTX2" },
124+
{ 0x0b1, "OcteonTX2-98XX" },
125+
{ 0x0b2, "OcteonTX2-96XX" },
126+
{ 0x0b3, "OcteonTX2-95XX" },
127+
{ 0x0b4, "OcteonTX2-95XXN" },
128+
{ 0x0b5, "OcteonTX2-95XXMM" },
129+
{ 0x0b6, "OcteonTX2-95XXO" },
130+
{ 0x0b8, "ThunderX3-T110" },
96131
};
97132

98133
const ARMPart APM_PARTS[] = {
99-
{ 0x000, "X-Gene" }
134+
{ 0x000, "X-Gene" },
100135
};
101136

102137
const ARMPart QUALCOMM_PARTS[] = {
@@ -107,30 +142,77 @@ public class About.ARMPartDecoder {
107142
{ 0x201, "Kryo" },
108143
{ 0x205, "Kryo" },
109144
{ 0x211, "Kryo" },
110-
{ 0x800, "Falkor V1/Kryo" },
111-
{ 0x801, "Kryo V2" },
145+
{ 0x800, "Falkor-V1/Kryo" },
146+
{ 0x801, "Kryo-V2" },
147+
{ 0x802, "Kryo-3XX-Gold" },
148+
{ 0x803, "Kryo-3XX-Silver" },
149+
{ 0x804, "Kryo-4XX-Gold" },
150+
{ 0x805, "Kryo-4XX-Silver" },
112151
{ 0xc00, "Falkor" },
113-
{ 0xc01, "Saphira" }
152+
{ 0xc01, "Saphira" },
114153
};
115154

116155
const ARMPart SAMSUNG_PARTS[] = {
117-
{ 0x001, "exynos-m1" }
156+
{ 0x001, "exynos-m1" },
157+
{ 0x002, "exynos-m3" },
158+
{ 0x003, "exynos-m4" },
159+
{ 0x004, "exynos-m5" },
118160
};
119161

120162
const ARMPart NVIDIA_PARTS[] = {
121163
{ 0x000, "Denver" },
122-
{ 0x003, "Denver 2" }
164+
{ 0x003, "Denver 2" },
165+
{ 0x004, "Carmel" },
123166
};
124167

125168
const ARMPart MARVELL_PARTS[] = {
126-
{ 0x131, "Feroceon 88FR131" },
169+
{ 0x131, "Feroceon-88FR131" },
127170
{ 0x581, "PJ4/PJ4b" },
128-
{ 0x584, "PJ4B-MP" }
171+
{ 0x584, "PJ4B-MP" },
172+
};
173+
174+
const ARMPart APPLE_PARTS[] = {
175+
{ 0x000, "Swift" },
176+
{ 0x001, "Cyclone" },
177+
{ 0x002, "Typhoon" },
178+
{ 0x003, "Typhoon/Capri" },
179+
{ 0x004, "Twister" },
180+
{ 0x005, "Twister/Elba/Malta" },
181+
{ 0x006, "Hurricane" },
182+
{ 0x007, "Hurricane/Myst" },
183+
{ 0x008, "Monsoon" },
184+
{ 0x009, "Mistral" },
185+
{ 0x00b, "Vortex" },
186+
{ 0x00c, "Tempest" },
187+
{ 0x00f, "Tempest-M9" },
188+
{ 0x010, "Vortex/Aruba" },
189+
{ 0x011, "Tempest/Aruba" },
190+
{ 0x012, "Lightning" },
191+
{ 0x013, "Thunder" },
192+
{ 0x020, "Icestorm-A14" },
193+
{ 0x021, "Firestorm-A14" },
194+
{ 0x022, "Icestorm-M1" },
195+
{ 0x023, "Firestorm-M1" },
196+
{ 0x024, "Icestorm-M1-Pro" },
197+
{ 0x025, "Firestorm-M1-Pro" },
198+
{ 0x026, "Thunder-M10" },
199+
{ 0x028, "Icestorm-M1-Max" },
200+
{ 0x029, "Firestorm-M1-Max" },
201+
{ 0x030, "Blizzard-A15" },
202+
{ 0x031, "Avalanche-A15" },
203+
{ 0x032, "Blizzard-M2" },
204+
{ 0x033, "Avalanche-M2" },
205+
{ 0x034, "Blizzard-M2-Pro" },
206+
{ 0x035, "Avalanche-M2-Pro" },
207+
{ 0x036, "Sawtooth-A16" },
208+
{ 0x037, "Everest-A16" },
209+
{ 0x038, "Blizzard-M2-Max" },
210+
{ 0x039, "Avalanche-M2-Max" },
129211
};
130212

131213
const ARMPart FARADAY_PARTS[] = {
132214
{ 0x526, "FA526" },
133-
{ 0x626, "FA626" }
215+
{ 0x626, "FA626" },
134216
};
135217

136218
const ARMPart INTEL_PARTS[] = {
@@ -154,26 +236,50 @@ public class About.ARMPartDecoder {
154236
{ 0x688, "PXA30x" },
155237
{ 0x689, "PXA31x" },
156238
{ 0xb11, "SA1110" },
157-
{ 0xc12, "IPX1200" }
239+
{ 0xc12, "IPX1200" },
240+
};
241+
242+
const ARMPart FUJITSU_PARTS[] = {
243+
{ 0x001, "A64FX" },
158244
};
159245

160246
const ARMPart HISILICON_PARTS[] = {
161-
{ 0xd01, "Kunpeng-920" } /* aka tsv110 */
247+
{ 0xd01, "Kunpeng-920" }, /* aka tsv110 */
248+
{ 0xd40, "Cortex-A76" }, /* HiSilicon uses this ID though advertises A76 */
249+
};
250+
251+
const ARMPart AMPERE_PARTS[] = {
252+
{ 0xac3, "Ampere-1" },
253+
{ 0xac4, "Ampere-1a" },
254+
};
255+
256+
const ARMPart PHYTIUM_PARTS[] = {
257+
{ 0x303, "FTC310" },
258+
{ 0x660, "FTC660" },
259+
{ 0x661, "FTC661" },
260+
{ 0x662, "FTC662" },
261+
{ 0x663, "FTC663" },
262+
{ 0x664, "FTC664" },
263+
{ 0x862, "FTC862" },
162264
};
163265

164266
const ARMImplementer ARM_IMPLEMENTERS[] = {
165267
{ 0x41, ARM_PARTS, "ARM" },
166268
{ 0x42, BROADCOM_PARTS, "Broadcom" },
167269
{ 0x43, CAVIUM_PARTS, "Cavium" },
168270
{ 0x44, DEC_PARTS, "DEC" },
271+
{ 0x46, FUJITSU_PARTS, "FUJITSU" },
169272
{ 0x48, HISILICON_PARTS, "HiSilicon" },
170-
{ 0x4e, NVIDIA_PARTS, "Nvidia" },
273+
{ 0x4e, NVIDIA_PARTS, "NVIDIA" },
171274
{ 0x50, APM_PARTS, "APM" },
172275
{ 0x51, QUALCOMM_PARTS, "Qualcomm" },
173276
{ 0x53, SAMSUNG_PARTS, "Samsung" },
174277
{ 0x56, MARVELL_PARTS, "Marvell" },
278+
{ 0x61, APPLE_PARTS, "Apple" },
175279
{ 0x66, FARADAY_PARTS, "Faraday" },
176280
{ 0x69, INTEL_PARTS, "Intel" },
281+
{ 0x70, PHYTIUM_PARTS, "Phytium" },
282+
{ 0xc0, AMPERE_PARTS, "Ampere" },
177283
};
178284

179285
public static string? decode_arm_model (string cpu_implementer, string cpu_part) {

0 commit comments

Comments
 (0)