Module Name: src Committed By: martin Date: Mon Oct 10 15:02:51 UTC 2022
Modified Files: src/sys/arch/x86/include [netbsd-9]: i82093reg.h src/sys/arch/x86/x86 [netbsd-9]: ioapic.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/x86/x86/ioapic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/include/i82093reg.h diff -u src/sys/arch/x86/include/i82093reg.h:1.6 src/sys/arch/x86/include/i82093reg.h:1.6.2.1 --- src/sys/arch/x86/include/i82093reg.h:1.6 Wed Jun 19 06:32:46 2019 +++ src/sys/arch/x86/include/i82093reg.h Mon Oct 10 15:02:50 2022 @@ -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. */ Index: src/sys/arch/x86/x86/ioapic.c diff -u src/sys/arch/x86/x86/ioapic.c:1.63 src/sys/arch/x86/x86/ioapic.c:1.63.2.1 --- src/sys/arch/x86/x86/ioapic.c:1.63 Wed Jun 19 06:32:46 2019 +++ src/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:02:50 2022 @@ -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 @@ ioapic_attach(device_t parent, device_t * 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 @@ ioapic_attach(device_t parent, device_t 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);