Received: by mail.netbsd.org (Postfix, from userid 605) id CEE7184E6B; Thu, 15 Sep 2022 14:39:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 1489A84D51 for ; Thu, 15 Sep 2022 14:39:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 6Ctn9sW0uVcd for ; Thu, 15 Sep 2022 14:39:03 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id 5E94084D37 for ; Thu, 15 Sep 2022 14:39:03 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 52A05FA90; Thu, 15 Sep 2022 14:39:03 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1663252743245040" MIME-Version: 1.0 Date: Thu, 15 Sep 2022 14:39:03 +0000 From: "SAITOH Masanobu" Subject: CVS commit: pkgsrc/sysutils/intel-microcode-netbsd/files To: pkgsrc-changes@NetBSD.org Reply-To: msaitoh@netbsd.org X-Mailer: log_accum Message-Id: <20220915143903.52A05FA90@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1663252743245040 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: msaitoh Date: Thu Sep 15 14:39:03 UTC 2022 Modified Files: pkgsrc/sysutils/intel-microcode-netbsd/files: extract.c Log Message: Modify the extended header stuff for new x86/include/cpu_ucode.h. NFC. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1663252743245040 Content-Disposition: inline Content-Length: 1308 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c diff -u pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c:1.5 pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c:1.6 --- pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c:1.5 Fri May 10 18:26:46 2019 +++ pkgsrc/sysutils/intel-microcode-netbsd/files/extract.c Thu Sep 15 14:39:03 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: extract.c,v 1.5 2019/05/10 18:26:46 maxv Exp $ */ +/* $NetBSD: extract.c,v 1.6 2022/09/15 14:39:03 msaitoh Exp $ */ #include #include @@ -106,13 +106,18 @@ writeout(struct intel1_ucode_header *uh, } if (eh) { printf("%s: Check the extended header.\n", __func__); + /* + * The processor signature structure table start from the next + * to the header. The header size is 20. + */ + eps = (struct intel1_ucode_proc_signature *) + ((uint8_t *)eh + 20); for (j = 0; j < eh->uet_count; j++) { - eps = &eh->uet_proc_sig[j]; for (i = 0; i < 8; i++) { - if (!(eps->ups_proc_flags & (1 << i))) + if (!(eps[j].ups_proc_flags & (1 << i))) continue; snprintf(alias, sizeof(alias), "%08x-%d", - eps->ups_signature, i); + eps[j].ups_signature, i); used += link_unless_newer_exists(name, alias, uh->uh_rev); } --_----------=_1663252743245040--