intel-ucode-split: list platform ids based on processor_flags

The Intel CPU "Platform Id" is a 3-bit integer reported by a given MSR.
Intel microcode updates have an 8-bit field to indicate Platform Id
compatibility - one bit in the mask for each of the possible Platform Id
values.  To simplify interpretation, report the Platform Id mask also as
a list.
This commit is contained in:
emaste 2018-05-16 01:55:52 +00:00
parent 2c2b0d59be
commit 08c74c8316

View File

@ -77,6 +77,8 @@ static void
dump_header(const struct microcode_update_header *hdr)
{
char buf[16];
int i;
bool platformid_printed;
printf("header version\t0x%x\n", hdr->header_version);
printf("revision\t0x%x\n", hdr->update_revision);
@ -87,7 +89,15 @@ dump_header(const struct microcode_update_header *hdr)
format_signature(buf, hdr->processor_signature));
printf("checksum\t0x%x\n", hdr->checksum);
printf("loader revision\t0x%x\n", hdr->loader_revision);
printf("processor flags\t0x%x\n", hdr->processor_flags);
printf("processor flags\t0x%x", hdr->processor_flags);
platformid_printed = false;
for (i = 0; i < 8; i++) {
if (hdr->processor_flags & 1 << i) {
printf("%s%d", platformid_printed ? ", " : "\t\t", i);
platformid_printed = true;
}
}
printf("\n");
printf("datasize\t0x%x\t\t0x%x\n", hdr->data_size,
hdr->data_size != 0 ? hdr->data_size : 2000);
printf("size\t\t0x%x\t\t0x%x\n", hdr->total_size,