Module Name:    src
Committed By:   martin
Date:           Tue Mar  4 11:51:34 UTC 2025

Modified Files:
        src/sys/arch/vax/vsa [netbsd-10]: lcg.c

Log Message:
Pull up following revision(s) (requested by hans in ticket #1069):

        sys/arch/vax/vsa/lcg.c: revision 1.13

vax/lcg(4): Check vax_siedata in lcg_match() and lcgcnprobe() as well.

LCG only exists on two specific VAXstation models, but not the MicroVAXen
sharing the same board type.

PR port-vax/59109: Booting 10.1 fails on Microvax 3100 model 80


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.11.2.1 src/sys/arch/vax/vsa/lcg.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/vax/vsa/lcg.c
diff -u src/sys/arch/vax/vsa/lcg.c:1.11 src/sys/arch/vax/vsa/lcg.c:1.11.2.1
--- src/sys/arch/vax/vsa/lcg.c:1.11	Sat Dec 10 19:50:43 2022
+++ src/sys/arch/vax/vsa/lcg.c	Tue Mar  4 11:51:34 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: lcg.c,v 1.11 2022/12/10 19:50:43 jakllsch Exp $ */
+/*	$NetBSD: lcg.c,v 1.11.2.1 2025/03/04 11:51:34 martin Exp $ */
 /*
  * LCG accelerated framebuffer driver
  * Copyright (c) 2003, 2004 Blaz Antonic
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lcg.c,v 1.11 2022/12/10 19:50:43 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lcg.c,v 1.11.2.1 2025/03/04 11:51:34 martin Exp $");
 
 #define LCG_NO_ACCEL
 
@@ -435,9 +435,23 @@ lcg_match(struct device *parent, struct 
 	struct vsbus_attach_args *va = aux;
 	volatile char * const ch = (char *)va->va_addr;
 
+	/*
+	 * Check the VAX board type. LCG can exist on two board types:
+	 * - KA46 (VAXstation 4000/60 or MicroVAX 3100/80)
+	 * - KA48 (VAXstation 4000 VLC or MicroVAX 3100/m{30,40}
+	 */
 	if ((vax_boardtype != VAX_BTYP_46) && (vax_boardtype != VAX_BTYP_48))
 		return 0;
 
+	/*
+	 * LCG supposedly only exists on VAXstations, not the MicroVAXen using
+	 * the same board type.
+	 *
+	 * These are "magic values", taken from vax/locore.c
+	 */
+	if ((vax_siedata & 0x3) != 2)
+		return 0;
+
 	*ch = 1;
 	if ((*ch & 1) == 0)
 		return 0;
@@ -953,6 +967,9 @@ lcgcnprobe(struct consdev *cndev)
 	if ((vax_boardtype != VAX_BTYP_46) && (vax_boardtype != VAX_BTYP_48))
 		return; /* Only for VS 4000/60 and VLC */
 
+	if ((vax_siedata & 0x3) != 2)
+		return; /* VAXstation only */
+
 	if (vax_confdata & 0x100)
 		return; /* Diagnostic console */
 

Reply via email to