From owner-svn-src-head@freebsd.org Wed May 16 01:55:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D869FEE5E4A; Wed, 16 May 2018 01:55:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8D1477027D; Wed, 16 May 2018 01:55:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E02913C46; Wed, 16 May 2018 01:55:52 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4G1tq6S045966; Wed, 16 May 2018 01:55:52 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4G1tqsv045965; Wed, 16 May 2018 01:55:52 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201805160155.w4G1tqsv045965@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 16 May 2018 01:55:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333661 - head/tools/tools/intel-ucode-split X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: head/tools/tools/intel-ucode-split X-SVN-Commit-Revision: 333661 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2018 01:55:53 -0000 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,