Skip to content

Commit e7d6d49

Browse files
authored
cpuid.py fixes and supported Intel platforms update (New) (#2346)
* fix(cpuid): change Lunar Lake quote formatting For format consistency across the script. Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * fix(cpuid): remove Amber Lake Amber Lake is actually a low power version of Kaby Lake. These processors shares the same CPUID and thus should not be identified with CPUID. Actually this also fix a duplicated CPUID in this script. Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * fix(cpuid): reorganize CPU identifiers Sorting by manufacturer and release order. Forcing them in chronological order, should avoid regression issues in case same CPUID reappears in more recent CPU. Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Apollo Lake Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Gemini Lake Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Elkhart Lake Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Jasper Lake Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Panther Lake Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> * feat(cpuid): Add Intel Amber Lake Y There is only this CPUID identified as unique to Amber Lake Y for now. Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com> --------- Signed-off-by: Alexandre Esse <alexandre.esse@canonical.com>
1 parent 420026b commit e7d6d49

1 file changed

Lines changed: 69 additions & 48 deletions

File tree

providers/base/bin/cpuid.py

Lines changed: 69 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -162,58 +162,79 @@ def cpuid_to_human_friendly(cpuid: str) -> str:
162162
The dict inefficiency in this implementation is obvious. The lookup is
163163
done over the cpuid, so that should be the key. For now let's keep it
164164
consistent with how it was in the past.
165+
166+
The dict should be sorted in chronological release order, so that the most
167+
recent cpuid is at the end. So there is no regression when a new cpuid is
168+
added that ends up having the same cpuid as an older one.
165169
"""
166170
# let's disable the formatting so the structure is easier to follow
167171
# fmt: off
168172
CPUIDS = {
169-
"Amber Lake": ['0x806e9'],
170-
"AMD EPYC": ['0x800f12'],
171-
"AMD Genoa": ['0xa10f11'],
172-
"AMD Lisbon": ['0x100f81'],
173-
"AMD Magny-Cours": ['0x100f91'],
174-
"AMD Milan": ['0xa00f11'],
175-
"AMD Milan-X": ['0xa00f12'],
176-
"AMD ROME": ['0x830f10'],
177-
"AMD Ryzen": ['0x810f81'],
178-
"AMD Bergamo": ['0xaa0f01'],
179-
"AMD Siena SP6": ['0xaa0f02'],
180-
"AMD Raphael": ['0xa60f12'],
181-
"AMD Turin": ['0xb00f21', '0xb10f10'],
182-
"AMD Grado": ['0xb40f40'],
183-
"Broadwell": ['0x4067', '0x306d4', '0x5066', '0x406f'],
184-
"Canon Lake": ['0x6066'],
185-
"Cascade Lake": ['0x50655', '0x50656', '0x50657'],
186-
"Coffee Lake": [
187-
'0x806ea', '0x906ea', '0x906eb', '0x906ec', '0x906ed'],
188-
"Comet Lake": ['0x806ec', '0xa065'],
189-
"Cooper Lake": ['0x5065a', '0x5065b'],
190-
"Emerald Rapids": ['0xc06f2'],
191-
"Haswell": ['0x306c', '0x4065', '0x4066', '0x306f'],
192-
"Hygon Dhyana Plus": ["0x900f22"],
193-
"Hygon C86-4G 7490": ['0x900f41'],
194-
"Ice Lake": ['0x606e6', '0x606a6', '0x706e6', '0x606c1'],
195-
"Ivy Bridge": ['0x306a', '0x306e'],
196-
"Kaby Lake": ['0x806e9', '0x906e9'],
197-
"Knights Landing": ['0x5067'],
198-
"Knights Mill": ['0x8065'],
199-
"Nehalem": ['0x106a', '0x106e5', '0x206e'],
200-
"Pineview": ['0x106ca'],
201-
"Penryn": ['0x1067a'],
202-
"Raptor Lake": ['0xb0671', '0xb06f2', '0xb06f5', '0xb06a2'],
203-
"Rocket Lake": ['0xa0671'],
204-
"Sandy Bridge": ['0x206a', '0x206d6', '0x206d7'],
205-
"Sapphire Rapids": ['0x806f3', '0x806f6', '0x806f7', '0x806f8'],
206-
"Skylake": ['0x406e3', '0x506e3', '0x50654', '0x50652'],
207-
"Tiger Lake": ['0x806c1'],
208-
"Alder Lake": ['0x906a4', '0x906a3', '0x90675', '0x90672'],
209-
"Westmere": ['0x2065', '0x206c', '0x206f'],
210-
"Whisky Lake": ['0x806eb', '0x806ec'],
211-
"Sierra Forest": ['0xa06f3'],
212-
"Granite Rapids": ['0xa06e0', '0xa06d0', '0xa06d1'],
213-
"Granite Rapids-D": ['0xa06e1'],
214-
"Meteor Lake": ['0xa06a4'],
215-
"Arrow Lake": ['0xc0660', '0xc0652'],
216-
"Lunar Lake": ["0xb06d1"]
173+
# AMD
174+
"AMD Magny-Cours": ['0x100f91'], # 2010
175+
"AMD Lisbon": ['0x100f81'], # 2010
176+
"AMD Ryzen": ['0x810f81'], # 2017
177+
"AMD EPYC": ['0x800f12'], # 2017
178+
"AMD ROME": ['0x830f10'], # 2019
179+
"AMD Milan": ['0xa00f11'], # 2021
180+
"AMD Milan-X": ['0xa00f12'], # 2022
181+
"AMD Raphael": ['0xa60f12'], # 2022
182+
"AMD Genoa": ['0xa10f11'], # 2022
183+
"AMD Bergamo": ['0xaa0f01'], # 2023
184+
"AMD Siena SP6": ['0xaa0f02'], # 2023
185+
"AMD Turin": ['0xb00f21', '0xb10f10'], # 2024
186+
"AMD Grado": ['0xb40f40'], # 2025
187+
188+
# Hygon
189+
"Hygon Dhyana Plus": ["0x900f22"], # 2019
190+
"Hygon C86-4G 7490": ['0x900f41'], # 2024
191+
192+
# Intel
193+
"Penryn": ['0x1067a'], # 2007
194+
"Nehalem": ['0x106a', '0x106e5', '0x206e'], # 2008
195+
"Pineview": ['0x106ca'], # 2009
196+
"Westmere": ['0x2065', '0x206c', '0x206f'], # 2010
197+
"Sandy Bridge": ['0x206a', '0x206d6', '0x206d7'], # 2011
198+
"Ivy Bridge": ['0x306a', '0x306e'], # 2012
199+
"Haswell": ['0x306c', '0x4065', '0x4066', '0x306f'], # 2013
200+
"Broadwell": ['0x4067', '0x306d4', '0x5066', '0x406f'], # 2014
201+
"Skylake": ['0x406e3', '0x506e3', '0x50654', # 2015
202+
'0x50652'],
203+
"Knights Landing": ['0x5067'], # 2016
204+
"Kaby Lake": ['0x806e9', '0x906e9'], # 2016
205+
# Amber Lake Y (low power refresh of Kaby Lake) shares CPUID 0x806e9
206+
"Apollo Lake": ['0x506c9', '0x506ca'], # 2016
207+
"Knights Mill": ['0x8065'], # 2017
208+
"Coffee Lake": ['0x806ea', '0x906ea', '0x906eb', # 2017
209+
'0x906ec', '0x906ed'],
210+
"Gemini Lake": ['0x706a1', '0x706a8'], # 2017
211+
"Canon Lake": ['0x6066'], # 2018
212+
"Whisky Lake": ['0x806eb', '0x806ec'], # 2018
213+
# Amber Lake Y shares CPUID 0x806ec and 0x806eb with Whisky Lake
214+
"Amber Lake Y": ['0x406e8'], # 2018
215+
"Cascade Lake": ['0x50655', '0x50656', '0x50657'], # 2019
216+
"Ice Lake": ['0x606e6', '0x606a6', '0x706e6', # 2019
217+
'0x606c1'],
218+
"Comet Lake": ['0x806ec', '0xa065'], # 2019
219+
"Cooper Lake": ['0x5065a', '0x5065b'], # 2020
220+
"Tiger Lake": ['0x806c1'], # 2020
221+
"Elkhart Lake": ['0x90660', '0x90661'], # 2021
222+
"Jasper Lake": ['0x906c0'], # 2021
223+
"Rocket Lake": ['0xa0671'], # 2021
224+
"Alder Lake": ['0x906a4', '0x906a3', '0x90675', # 2021
225+
'0x90672'],
226+
"Raptor Lake": ['0xb0671', '0xb06f2', '0xb06f5', # 2022
227+
'0xb06a2'],
228+
"Sapphire Rapids": ['0x806f3', '0x806f6', '0x806f7', # 2023
229+
'0x806f8'],
230+
"Emerald Rapids": ['0xc06f2'], # 2023
231+
"Meteor Lake": ['0xa06a4'], # 2023
232+
"Sierra Forest": ['0xa06f3'], # 2024
233+
"Granite Rapids": ['0xa06e0', '0xa06d0', '0xa06d1'], # 2024
234+
"Granite Rapids-D": ['0xa06e1'], # 2024
235+
"Lunar Lake": ['0xb06d1'], # 2024
236+
"Arrow Lake": ['0xc0660', '0xc0652'], # 2024
237+
"Panther Lake": ['0xc06c0'] # 2025
217238
}
218239
for key in CPUIDS.keys():
219240
for value in CPUIDS[key]:

0 commit comments

Comments
 (0)