pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/intel-microcode-netbsd/files Modify the exten...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fd3d8811335b
branches:  trunk
changeset: 385351:fd3d8811335b
user:      msaitoh <msaitoh%pkgsrc.org@localhost>
date:      Thu Sep 15 14:39:03 2022 +0000

description:
Modify the extended header stuff for new x86/include/cpu_ucode.h. NFC.

diffstat:

 sysutils/intel-microcode-netbsd/files/extract.c |  13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 4e2c0ac33971 -r fd3d8811335b sysutils/intel-microcode-netbsd/files/extract.c
--- a/sysutils/intel-microcode-netbsd/files/extract.c   Thu Sep 15 13:12:06 2022 +0000
+++ b/sysutils/intel-microcode-netbsd/files/extract.c   Thu Sep 15 14:39:03 2022 +0000
@@ -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 <sys/stat.h>
 #include <stdlib.h>
@@ -106,13 +106,18 @@
        }
        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);
                        }



Home | Main Index | Thread Index | Old Index