Module Name:    src
Committed By:   martin
Date:           Tue Apr 27 10:31:18 UTC 2021

Modified Files:
        src/sys/arch/mac68k/conf [netbsd-9]: GENERIC files.mac68k
        src/sys/arch/mac68k/mac68k [netbsd-9]: machdep.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #1256):

        sys/arch/mac68k/mac68k/machdep.c: revision 1.360
        sys/arch/mac68k/conf/GENERIC: revision 1.234
        sys/arch/mac68k/conf/files.mac68k: revision 1.131

Add MAC68K_MEMSIZE option to hard-code memory size in MB, instead of
that given by Booter. Work around Booter bug by which max memory is
restricted to 255MB.


To generate a diff of this commit:
cvs rdiff -u -r1.228 -r1.228.2.1 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.129 -r1.129.2.1 src/sys/arch/mac68k/conf/files.mac68k
cvs rdiff -u -r1.353.2.1 -r1.353.2.2 src/sys/arch/mac68k/mac68k/machdep.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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.228 src/sys/arch/mac68k/conf/GENERIC:1.228.2.1
--- src/sys/arch/mac68k/conf/GENERIC:1.228	Fri Apr 26 21:40:31 2019
+++ src/sys/arch/mac68k/conf/GENERIC	Tue Apr 27 10:31:17 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.228 2019/04/26 21:40:31 sevan Exp $
+# $NetBSD: GENERIC,v 1.228.2.1 2021/04/27 10:31:17 martin Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include 	"arch/mac68k/conf/std.mac68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.228 $"
+#ident 		"GENERIC-$Revision: 1.228.2.1 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks"	# see share/mk/sys.mk
 
@@ -41,6 +41,10 @@ options 	FPU_EMULATE
 # You need to set the total memory in the MacOS Booter.
 #options 	DJMEMCMAX
 
+# Use hard-coded memory size in MB, instead of parameter given by Booter.
+# Workaround for Booter bug by which max memory is restricted to 255MB.
+#options 	MAC68K_MEMSIZE=256
+
 # Standard system options
 
 options 	INSECURE	# disable kernel security levels

Index: src/sys/arch/mac68k/conf/files.mac68k
diff -u src/sys/arch/mac68k/conf/files.mac68k:1.129 src/sys/arch/mac68k/conf/files.mac68k:1.129.2.1
--- src/sys/arch/mac68k/conf/files.mac68k:1.129	Fri Jul 26 10:48:44 2019
+++ src/sys/arch/mac68k/conf/files.mac68k	Tue Apr 27 10:31:17 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.mac68k,v 1.129 2019/07/26 10:48:44 rin Exp $
+#	$NetBSD: files.mac68k,v 1.129.2.1 2021/04/27 10:31:17 martin Exp $
 
 # mac68k-specific configuration info
 
@@ -10,6 +10,8 @@ defflag	opt_grf_compat.h	GRF_COMPAT
 
 defflag	opt_wsdisplay_compat.h	WSDISPLAY_COMPAT_ITEFONT
 
+defparam opt_mac68k.h		MAC68K_MEMSIZE
+
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 8
 

Index: src/sys/arch/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.353.2.1 src/sys/arch/mac68k/mac68k/machdep.c:1.353.2.2
--- src/sys/arch/mac68k/mac68k/machdep.c:1.353.2.1	Sun Aug 18 10:00:41 2019
+++ src/sys/arch/mac68k/mac68k/machdep.c	Tue Apr 27 10:31:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.353.2.1 2019/08/18 10:00:41 martin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.353.2.2 2021/04/27 10:31:17 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,13 +74,14 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353.2.1 2019/08/18 10:00:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.353.2.2 2021/04/27 10:31:17 martin Exp $");
 
 #include "opt_adb.h"
 #include "opt_copy_symtab.h"
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
 #include "opt_kgdb.h"
+#include "opt_mac68k.h"
 #include "opt_modular.h"
 #include "opt_compat_netbsd.h"
 #include "akbd.h"
@@ -902,7 +903,11 @@ getenvvars(u_long flag, char *buf)
 	 */
 	mac68k_machine.machineid = machineid = getenv("MACHINEID");
 	mac68k_machine.mach_processor = getenv("PROCESSOR");
+#ifndef MAC68K_MEMSIZE
 	mac68k_machine.mach_memsize = getenv("MEMSIZE");
+#else
+	mac68k_machine.mach_memsize = MAC68K_MEMSIZE;
+#endif
 	mac68k_machine.do_graybars = getenv("GRAYBARS");
 	mac68k_machine.serial_boot_echo = getenv("SERIALECHO");
 	mac68k_machine.serial_console = getenv("SERIALCONSOLE");

Reply via email to