Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/dev Fix silent freeze on probing sti(4) frameb...



details:   https://anonhg.NetBSD.org/src/rev/b490d985e0cb
branches:  trunk
changeset: 1022279:b490d985e0cb
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jul 11 13:36:02 2021 +0000

description:
Fix silent freeze on probing sti(4) framebuffer on 712/60.  PR/52162

Ok'ed by skrll@.
Should be pulled up to netbsd-9 and netbsd-8.

diffstat:

 sys/arch/hppa/dev/sti_sgc.c |  18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r 77e9063719be -r b490d985e0cb sys/arch/hppa/dev/sti_sgc.c
--- a/sys/arch/hppa/dev/sti_sgc.c       Sun Jul 11 13:32:06 2021 +0000
+++ b/sys/arch/hppa/dev/sti_sgc.c       Sun Jul 11 13:36:02 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $        */
+/*     $NetBSD: sti_sgc.c,v 1.3 2021/07/11 13:36:02 tsutsui Exp $      */
 
 /*     $OpenBSD: sti_sgc.c,v 1.38 2009/02/06 22:51:04 miod Exp $       */
 
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.2 2019/04/15 20:40:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti_sgc.c,v 1.3 2021/07/11 13:36:02 tsutsui Exp $");
 
 #include "opt_cputype.h"
 
@@ -73,6 +73,16 @@
 #define        STI_ROMSIZE     (sizeof(struct sti_dd) * 4)
 #define        STI_ID_FDDI     0x280b31af      /* Medusa FDDI ROM id */
 
+/*
+ * hpa addresses to check on-board variants
+ * XXX should check via device_register(9)?
+ * 
+ * 0xf4000000: HPA1991AC19 on 715/33, 715/50
+ * 0xf8000000: HPA1439A on 735/99, HPA208LCxxx on 715/80, 715/100, 712
+ */
+#define        STI_ONBOARD_HPA0        0xf4000000
+#define        STI_ONBOARD_HPA1        0xf8000000
+
 /* gecko optional graphics */
 #define        STI_GOPT1_REV   0x17
 #define        STI_GOPT2_REV   0x70
@@ -118,7 +128,9 @@
        rom = PAGE0->pd_resv2[1];
        hppa_pagezero_unmap(pagezero_cookie);
 
-       if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC) {
+       if (ca->ca_type.iodc_sv_model == HPPA_FIO_GSGC &&
+           ca->ca_hpa != STI_ONBOARD_HPA0 &&
+           ca->ca_hpa != STI_ONBOARD_HPA1) {
                int i;
                for (i = sizeof(sti_sgc_opt); i--; )
                        if (sti_sgc_opt[i] == ca->ca_type.iodc_revision)



Home | Main Index | Thread Index | Old Index