-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please support AMD microcode checks #150
Comments
I'm not aware of a generic way to check for microcode updates on AMD. Intel has |
How about:
|
The The analysis in Opteron Exposed: Reverse Engineering AMD K8 Microcode Updates looks promising giving us an idea howto parse the microcode files to get the available revisions and check for CPU compatibility. |
Yes, it is:
|
I've created a small PoC script. Could you please give test-amd-ucode.pl a try? It would be nice if you could try it booting with and w/o ucode updates applied. |
I don't have the
|
Thanks for the PoC. This is Ryzen 7 1800X running Ubuntu 18.04.3 with a 5.3.0-24-generic kernel:
|
And this is an EPYC 7351P running Debian 10 with a 4.19.0-6-amd64 kernel:
https://github.com/speed47/spectre-meltdown-checker currently reports this for it:
|
I did expect it should be available on most systems. What kernel and linux distri are you using? Maybe the CPUID could be build from |
@tomreyn Thanks for trying the PoC. It looks like for the Ryzen there are no microcode updates available. For the Epic the PoC has found an update but getting the ucode version from the update file seems to be incomplete. We still need to find a way to get the valid version number from the update file. |
I've updated the PoC test-amd-ucode.pl to revision 6: @yochananmarqos @tomreyn |
I'm using 5.4.5 on Manjaro GNOME. I forgot I hadn't mentioned that. I've got a Ryzen 5 2500U. The new revision works:
|
@liske You're right, the Epic system has a 'BIOS update' (an UEFI firmware upgrade released for this Supermicro Board in summer 2019) provided microcode which is newer than what's available through Debians amd64-microcode package (Debian 10 provides package version 3.20181128.1, meaning AMD released this microcode on 2018-11-28), so the OS did not perform an early microcode update during boot. So far, AMD primarily shipped microcode updates for Family 17h through mainboard firmware upgrades, but they have also released separate microcode upgrades to the public in a few occasions now. Unfortunately, the latest release in October caused stability problems on some systems so neither Ubuntu nor Debian ship it for now). I am, however, hopeful that AMD will continue to make microcode updates available directly to the general public so that end users will not depend on mainboard vendors to (continue to) provide those (in a timely fashion). Output of rev6 on the same Epyc system:
|
The CPUID calculation from @tomreyn There is a more recent amd64-microcode package in Debian testing. I had a look at it's ChangeLog and it should provide the microcode revision |
I'm using the
|
/proc/cpuiinfo from the Epyc system:
/proc/cpuiinfo from the Ryzen system:
The microcode package in Debian bullseye is the one Ubuntu reverted the upgrade for (see the link to the bug - and its duplicate report - posted above). While it may work without problem on this particular Epyc system, this is a production system and I am afraid I have no means to reboot it with a different microcode (from a different Debian release) just for testing purposes. I can do further tests on the Ryzen system if this would help (please specify tests to run / information to provide)? Maybe there is code in ME Extractor (and its microcode repository) or in spectre-meltdown-checker which you could make use of? I am not a developer myself, so can't really tell. On a side note, a new microcode package was just released by AMD which apparently drops the problematic ones from October. |
Just another (final?) PoC update test-amd-ucode.pl revision 7. I've updated the CPUID calculation from |
|
@yochananmarqos The CPUID= output in the first section (SYSTEM) should have changed to report the correct value, although there might be no microcode update avail for your cpu. |
You're right, I missed that eyeballing it. Using diff would be too efficient. 😜️ EDIT: Updated diff after
|
I've added experimental AMD microcode support to git HEAD. |
While, so far, AMD prefers to make microcode updates available via firmware upgrades primarily (and checking for those is not yet implemented in needrestart - but maybe could be via fwupd), this may change in the future. Also, some systems supported by needrestart may already provide microcode updates for AMD systems (e.g. to ensure continued CPU hardware security support on systems where mainboard manufacturers no longer provide firmware upgrades, or chose against including the latest microcode upgrades in firmware upgrades they continue to provide).
So supporting tests for pending reboots to apply microcode upgrades on AMD systems may be nice to have. (Admittedly, I consider this to be of much lesser urgency than in Intel land, though.)
The text was updated successfully, but these errors were encountered: