Subject: port-amiga/1965: yet another variant of A4000 recognition in loadbsd
To: None <gnats-bugs@gnats.netbsd.org>
From: Ignatios Souvatzis <is@beverly.rhein.de>
List: netbsd-bugs
Date: 01/17/1996 00:19:52
>Number:         1965
>Category:       port-amiga
>Synopsis:       There are A4000's whose "A4000 bonus" is spelled with little b
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 21 19:20:01 1996
>Last-Modified:
>Originator:     Ignatios Souvatzis
>Organization:
	
>Release:        1.1
>Environment:
	
System: NetBSD beverly.meka.fh-karlsruhe.de 1.1 NetBSD 1.1 (BEVERLY) #15: Thu Dec 21 11:55:35 MET 1995 is@beverly.rhein.de:/usr/src/sys/arch/amiga/compile/BEVERLY amiga


>Description:
	loadbsd recognizes the motherboard models by, among other methods,
	looking for some resident tags. The A4000 is recognized by "A1000 Bonus"
	(a typo in early 3.0 AmigaOS) or "A4000 Bonus" being present. 

	While testing some going-to-be-bootblock code, I found an A4000T, which
	even has "A4000 bonus" with small b.
>How-To-Repeat:
	err... check the resident list from AmigaOS. Try to boot NetBSD on a 
	machine with "A4000 bonus" in it, and watch it being recognized as A2000.
>Fix:
Index: loadbsd.c
===================================================================
RCS file: /monster/cvs/src/sys/arch/amiga/stand/loadbsd/loadbsd.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 loadbsd.c
--- loadbsd.c	1995/12/05 09:31:49	1.1.1.3
+++ loadbsd.c	1996/01/16 23:12:50
@@ -484,7 +484,8 @@
 			exit(1);
 		}
 	}
-	if (FindResident("A4000 Bonus") || FindResident("A1000 Bonus"))
+	if (FindResident("A4000 Bonus") || FindResident("A4000 bonus") ||
+	    FindResident("A1000 Bonus"))
 		cpuid |= 4000 << 16;
 	else if (FindResident("A3000 Bonus") || FindResident("A3000 bonus"))
 		cpuid |= 3000 << 16;
>Audit-Trail:
>Unformatted: