Support new AMD microcode format, update bundled AMD microcode patch file
The format of the AMD microcode patches has changed for family 0x14 and 0x15, patches for those families are now encrypted. The microcode patch loader uses too strict consistency checks that fail on the new patch file, and the boot-time microcode patch loader truncates the new patches, which can cause panics.
To fix this, the consistency checks need to be relaxed to support the new format, and the structure holding a single microcode patch needs to be extended to support the bigger patches for family 0x14 and 0x15. Similar changes have been made to Linux, NetBSD and Xen.
Also, AMD has released new microcode in January, see http://www.amd64.org/support/microcode.html
Therefore, the AMD microcode patch file bundled with Illumos should be updated.
Updated by Hans Rosenfeld over 8 years ago
- updated AMD microcode patch file (webrev seems to have trouble with binary files)
- relaxed consistency check in ucode_validate_amd()
- increased size of ucode_file_amd_t to support the bigger encrypted patches for family 0x15
- limited the check for patches containing x86 code to patches for families before 0x14
- wrapped the wrmsr() calls in on_trap()/no_trap() to avoid panics with broken patch files
- make ucode_force_update work in the AMD-specific code paths