Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/x86 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/55c6210cd181
branches:  netbsd-8
changeset: 371822:55c6210cd181
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Oct 10 15:04:31 2022 +0000

description:
Pull up following revision(s) (requested by msaitoh in ticket #1769):

        sys/arch/x86/x86/ioapic.c: revision 1.66
        sys/arch/x86/include/i82093reg.h: revision 1.7

Print detail about misconfigured APIC ID.

IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276.

diffstat:

 sys/arch/x86/include/i82093reg.h |   4 ++--
 sys/arch/x86/x86/ioapic.c        |  12 +++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diffs (58 lines):

diff -r 96ce2369c721 -r 55c6210cd181 sys/arch/x86/include/i82093reg.h
--- a/sys/arch/x86/include/i82093reg.h  Thu Sep 29 14:43:06 2022 +0000
+++ b/sys/arch/x86/include/i82093reg.h  Mon Oct 10 15:04:31 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82093reg.h,v 1.5 2017/04/22 04:25:09 nonaka Exp $ */
+/*     $NetBSD: i82093reg.h,v 1.5.4.1 2022/10/10 15:04:31 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 #define IOAPIC_ID              0x00
 
 #define        IOAPIC_ID_SHIFT         24
-#define                IOAPIC_ID_MASK          0x0f000000
+#define                IOAPIC_ID_MASK          0xff000000
 
 /* Version, and maximum interrupt pin number. */
   
diff -r 96ce2369c721 -r 55c6210cd181 sys/arch/x86/x86/ioapic.c
--- a/sys/arch/x86/x86/ioapic.c Thu Sep 29 14:43:06 2022 +0000
+++ b/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:04:31 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $  */
+/*     $NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $  */
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -373,8 +373,9 @@
         * mapping later ...
         */
        if (apic_id != sc->sc_pic.pic_apicid) {
-               aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n",
-                                apic_id);
+               aprint_debug_dev(sc->sc_dev,
+                   "apid is misconfigured (%d != %d)\n",
+                   apic_id, sc->sc_pic.pic_apicid);
 
                ioapic_write(sc, IOAPIC_ID,
                    (ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK)
@@ -385,7 +386,8 @@
                
                if (apic_id != sc->sc_pic.pic_apicid)
                        aprint_error_dev(sc->sc_dev,
-                           "can't remap to apid %d\n", sc->sc_pic.pic_apicid);
+                           "can't remap apid from %d to %d\n",
+                           apic_id, sc->sc_pic.pic_apicid);
                else
                        aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n",
                            sc->sc_pic.pic_apicid);



Home | Main Index | Thread Index | Old Index