Module Name: src Committed By: martin Date: Mon Oct 10 15:04:31 UTC 2022
Modified Files: src/sys/arch/x86/include [netbsd-8]: i82093reg.h src/sys/arch/x86/x86 [netbsd-8]: ioapic.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/x86/include/i82093reg.h cvs rdiff -u -r1.52.10.1 -r1.52.10.2 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.5 src/sys/arch/x86/include/i82093reg.h:1.5.4.1 --- src/sys/arch/x86/include/i82093reg.h:1.5 Sat Apr 22 04:25:09 2017 +++ src/sys/arch/x86/include/i82093reg.h Mon Oct 10 15:04:31 2022 @@ -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. */ Index: src/sys/arch/x86/x86/ioapic.c diff -u src/sys/arch/x86/x86/ioapic.c:1.52.10.1 src/sys/arch/x86/x86/ioapic.c:1.52.10.2 --- src/sys/arch/x86/x86/ioapic.c:1.52.10.1 Tue Nov 21 11:01:02 2017 +++ src/sys/arch/x86/x86/ioapic.c Mon Oct 10 15:04:31 2022 @@ -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 @@ 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) @@ -385,7 +386,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);