Source-Changes-HG archive

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

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



details:   https://anonhg.NetBSD.org/src/rev/6b5ba1c8a401
branches:  netbsd-9
changeset: 371814:6b5ba1c8a401
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Oct 10 15:02:50 2022 +0000

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

        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 ff579717e6c7 -r 6b5ba1c8a401 sys/arch/x86/include/i82093reg.h
--- a/sys/arch/x86/include/i82093reg.h  Tue Oct 04 17:26:46 2022 +0000
+++ b/sys/arch/x86/include/i82093reg.h  Mon Oct 10 15:02:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i82093reg.h,v 1.6 2019/06/19 06:32:46 msaitoh Exp $ */
+/*     $NetBSD: i82093reg.h,v 1.6.2.1 2022/10/10 15:02:50 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 ff579717e6c7 -r 6b5ba1c8a401 sys/arch/x86/x86/ioapic.c
--- a/sys/arch/x86/x86/ioapic.c Tue Oct 04 17:26:46 2022 +0000
+++ b/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:02:50 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $      */
+/*     $NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 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.63 2019/06/19 06:32:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -371,8 +371,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)
@@ -383,7 +384,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