Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mac68k Add MAC68K_MEMSIZE option to hard-code memor...



details:   https://anonhg.NetBSD.org/src/rev/ddec00609470
branches:  trunk
changeset: 981054:ddec00609470
user:      rin <rin%NetBSD.org@localhost>
date:      Fri Feb 26 10:54:12 2021 +0000

description:
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.

diffstat:

 sys/arch/mac68k/conf/GENERIC      |  8 ++++++--
 sys/arch/mac68k/conf/files.mac68k |  4 +++-
 sys/arch/mac68k/mac68k/machdep.c  |  9 +++++++--
 3 files changed, 16 insertions(+), 5 deletions(-)

diffs (85 lines):

diff -r 09bf52e257f9 -r ddec00609470 sys/arch/mac68k/conf/GENERIC
--- a/sys/arch/mac68k/conf/GENERIC      Fri Feb 26 10:47:24 2021 +0000
+++ b/sys/arch/mac68k/conf/GENERIC      Fri Feb 26 10:54:12 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.233 2021/01/21 06:51:55 nia Exp $
+# $NetBSD: GENERIC,v 1.234 2021/02/26 10:54:12 rin Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.233 $"
+#ident                 "GENERIC-$Revision: 1.234 $"
 
 makeoptions    COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer"
        # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for
@@ -43,6 +43,10 @@
 # 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
diff -r 09bf52e257f9 -r ddec00609470 sys/arch/mac68k/conf/files.mac68k
--- a/sys/arch/mac68k/conf/files.mac68k Fri Feb 26 10:47:24 2021 +0000
+++ b/sys/arch/mac68k/conf/files.mac68k Fri Feb 26 10:54:12 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.mac68k,v 1.130 2019/08/22 14:52:58 rin Exp $
+#      $NetBSD: files.mac68k,v 1.131 2021/02/26 10:54:12 rin Exp $
 
 # mac68k-specific configuration info
 
@@ -10,6 +10,8 @@
 
 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
 
diff -r 09bf52e257f9 -r ddec00609470 sys/arch/mac68k/mac68k/machdep.c
--- a/sys/arch/mac68k/mac68k/machdep.c  Fri Feb 26 10:47:24 2021 +0000
+++ b/sys/arch/mac68k/mac68k/machdep.c  Fri Feb 26 10:54:12 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $        */
+/*     $NetBSD: machdep.c,v 1.360 2021/02/26 10:54:12 rin Exp $        */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.360 2021/02/26 10:54:12 rin Exp $");
 
 #include "opt_adb.h"
 #include "opt_compat_netbsd.h"
@@ -82,6 +82,7 @@
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
 #include "opt_kgdb.h"
+#include "opt_mac68k.h"
 #include "opt_modular.h"
 
 #include "akbd.h"
@@ -903,7 +904,11 @@
         */
        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");



Home | Main Index | Thread Index | Old Index