Module Name: src Committed By: rin Date: Tue Sep 18 02:58:10 UTC 2018
Modified Files: src/sys/dev/hpc: hpckbd.c Log Message: Apply workaround introduced in r1.31 to hpcmips. Fix kernel crash when console is attached. Now, my MC/R550 boots multiuser. Thanks Masahiko Ito for encouraging me to do bisection to find this out. XXX pullup-8, pullup-7 To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/hpc/hpckbd.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/dev/hpc/hpckbd.c diff -u src/sys/dev/hpc/hpckbd.c:1.32 src/sys/dev/hpc/hpckbd.c:1.33 --- src/sys/dev/hpc/hpckbd.c:1.32 Mon Aug 7 23:57:40 2017 +++ src/sys/dev/hpc/hpckbd.c Tue Sep 18 02:58:10 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: hpckbd.c,v 1.32 2017/08/07 23:57:40 uwe Exp $ */ +/* $NetBSD: hpckbd.c,v 1.33 2018/09/18 02:58:10 rin Exp $ */ /*- * Copyright (c) 1999-2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.32 2017/08/07 23:57:40 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hpckbd.c,v 1.33 2018/09/18 02:58:10 rin Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -261,10 +261,11 @@ hpckbd_getevent(struct hpckbd_core* hc, } -#ifdef hpcsh +#if defined(hpcsh) || defined(hpcmips) /* - * XXX: Use the old wrong code for now as hpcsh attaches console very - * early and it's convenient to be able to do early DDB on wscons. + * XXX: Use the old wrong code for now as hpcsh and hpcmips attach console very + * early when malloc(9) is not yet available. It is convenient to be able to do + * early DDB on wscons. */ void hpckbd_keymap_setup(struct hpckbd_core *hc, @@ -278,8 +279,10 @@ hpckbd_keymap_setup(struct hpckbd_core * * XXX The way this is done is really wrong. The __UNCONST() * is a hint as to what is wrong. This actually ends up modifying * initialized data which is marked "const". + * * The reason we get away with it here is that on sh3 kernel - * is directly mapped. + * is directly mapped. For mips, read-only data is mapped + * read/write at the moment. */ desc = (struct wscons_keydesc *)__UNCONST(hpckbd_keymapdata.keydesc); for (i = 0; desc[i].name != 0; i++) {