Module Name: src Committed By: tsutsui Date: Sun Jul 11 13:36:02 UTC 2021
Modified Files: src/sys/arch/hppa/dev: sti_sgc.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hppa/dev/sti_sgc.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/hppa/dev/sti_sgc.c diff -u src/sys/arch/hppa/dev/sti_sgc.c:1.2 src/sys/arch/hppa/dev/sti_sgc.c:1.3 --- src/sys/arch/hppa/dev/sti_sgc.c:1.2 Mon Apr 15 20:40:37 2019 +++ src/sys/arch/hppa/dev/sti_sgc.c Sun Jul 11 13:36:02 2021 @@ -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 @@ extern int stidebug; #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 @@ sti_sgc_getrom(struct confargs *ca) 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)