Module Name:    src
Committed By:   skrll
Date:           Mon Oct 21 13:37:07 UTC 2024

Modified Files:
        src/sys/arch/cats/cats: cats_machdep.c

Log Message:
Fix my thinko wrt PMAP_NEED_ALLOC_POOLPAGE and restore the code that was
#ifndef PMAP_NEED_ALLOC_POOLPAGE / #endif


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/cats/cats/cats_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/cats/cats/cats_machdep.c
diff -u src/sys/arch/cats/cats/cats_machdep.c:1.95 src/sys/arch/cats/cats/cats_machdep.c:1.96
--- src/sys/arch/cats/cats/cats_machdep.c:1.95	Sun Oct 20 15:06:35 2024
+++ src/sys/arch/cats/cats/cats_machdep.c	Mon Oct 21 13:37:07 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cats_machdep.c,v 1.95 2024/10/20 15:06:35 skrll Exp $	*/
+/*	$NetBSD: cats_machdep.c,v 1.96 2024/10/21 13:37:07 skrll Exp $	*/
 
 /*
  * Copyright (c) 1997,1998 Mark Brinicombe.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.95 2024/10/20 15:06:35 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.96 2024/10/21 13:37:07 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cats.h"
@@ -314,6 +314,13 @@ initarm(void *arm_bootargs)
 
 #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 	const bool mapallmem_p = true;
+
+	if (ram_size > KERNEL_VM_BASE - KERNEL_BASE) {
+		printf("%s: dropping RAM size from %luMB to %uMB\n",
+		    __func__, (unsigned long) (ram_size >> 20),
+		    (KERNEL_VM_BASE - KERNEL_BASE) >> 20);
+		ram_size = KERNEL_VM_BASE - KERNEL_BASE;
+        }
 #else
         const bool mapallmem_p = false;
 #endif

Reply via email to