svn commit: r333661 - head/tools/tools/intel-ucode-split
Ed Maste
emaste at FreeBSD.org
Wed May 16 01:55:53 UTC 2018
Author: emaste
Date: Wed May 16 01:55:52 2018
New Revision: 333661
URL: https://svnweb.freebsd.org/changeset/base/333661
Log:
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.
Modified:
head/tools/tools/intel-ucode-split/intel-ucode-split.c
Modified: head/tools/tools/intel-ucode-split/intel-ucode-split.c
==============================================================================
--- head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:41:36 2018 (r333660)
+++ head/tools/tools/intel-ucode-split/intel-ucode-split.c Wed May 16 01:55:52 2018 (r333661)
@@ -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,
More information about the svn-src-all
mailing list