A Python library for parsing and interpreting AMD microcode patch files.
pip install amd-ucode-patchInstalling the package provides the following command line tools.
Inspect one or more AMD microcode patch files and print their header information as a table.
amd_ucode_patch_info <files...> [-f {text,md,csv}]Arguments:
files: One or more patch files to inspect. Glob patterns (e.g.*.binor**/*.bin) are expanded automatically.-f,--format: Output format. One of:text(default): A table rendered for the terminal.md: A Markdown table.csv: Comma separated values.
For every patch file the following fields are reported: file name, date, update revision, loader ID, processor revision, CPUID, family, model, stepping, autorun, encrypted and body size.
The package can also be used programmatically:
from amd_ucode_patch.parse import ucode_patch_parse
patch = ucode_patch_parse("firmware.bin")
print(patch.header.cpuid_str)
print(patch.header.update_revision)