Module Name:    src
Committed By:   ryo
Date:           Mon Oct 17 10:36:57 UTC 2016

Modified Files:
        src/sys/arch/arm/imx: files.imx7
        src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 std.imx7
        src/sys/arch/evbarm/imx7: imx7_machdep.c

Log Message:
* Add option MEMSIZE_RESERVED to reserves memory for Cortex-M4 area
* change KERNEL_BASE from 0x80008000 to 0x82000000


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/files.imx7
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbarm/conf/std.imx7
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/imx7/imx7_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/arm/imx/files.imx7
diff -u src/sys/arch/arm/imx/files.imx7:1.1 src/sys/arch/arm/imx/files.imx7:1.2
--- src/sys/arch/arm/imx/files.imx7:1.1	Tue May 17 06:44:45 2016
+++ src/sys/arch/arm/imx/files.imx7	Mon Oct 17 10:36:56 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx7,v 1.1 2016/05/17 06:44:45 ryo Exp $
+#	$NetBSD: files.imx7,v 1.2 2016/10/17 10:36:56 ryo Exp $
 #
 # Configuration info for the Freescale i.MX7
 #
@@ -7,6 +7,7 @@ include "arch/arm/pic/files.pic"
 include "arch/arm/cortex/files.cortex"
 
 defparam opt_imx.h				MEMSIZE
+defparam opt_imx.h				MEMSIZE_RESERVED
 defflag opt_imx.h				IMX7
 
 file	arch/arm/arm32/arm32_boot.c

Index: src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
diff -u src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.2 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.3
--- src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.2	Sun Aug  7 10:44:05 2016
+++ src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3	Mon Oct 17 10:36:56 2016
@@ -1,4 +1,4 @@
-# $NetBSD: ARMADILLO-IOT-G3,v 1.2 2016/08/07 10:44:05 christos Exp $
+# $NetBSD: ARMADILLO-IOT-G3,v 1.3 2016/10/17 10:36:56 ryo Exp $
 #
 # ARMADILLO-IOT-G3 -- Atmark Techno, Armadillo-IoT G3
 #
@@ -22,6 +22,7 @@ options 	MULTIPROCESSOR
 options 	PMAPCOUNTERS
 
 options 	MEMSIZE=512
+options 	MEMSIZE_RESERVED=32	# only reserved 32M for Cortex-M4 core
 
 # Standard system options
 

Index: src/sys/arch/evbarm/conf/std.imx7
diff -u src/sys/arch/evbarm/conf/std.imx7:1.1 src/sys/arch/evbarm/conf/std.imx7:1.2
--- src/sys/arch/evbarm/conf/std.imx7:1.1	Tue May 17 06:44:46 2016
+++ src/sys/arch/evbarm/conf/std.imx7	Mon Oct 17 10:36:56 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: std.imx7,v 1.1 2016/05/17 06:44:46 ryo Exp $
+#	$NetBSD: std.imx7,v 1.2 2016/10/17 10:36:56 ryo Exp $
 #
 # standard NetBSD/evbarm options for i.MX7 board
 
@@ -25,8 +25,8 @@ options 	CORTEX_PMC
 options 	CORTEX_PMC_CCNT_HZ=792000000
 
 options 	KERNEL_BASE_EXT=0x80000000
-makeoptions 	KERNEL_BASE_PHYS="0x80008000"
-makeoptions 	KERNEL_BASE_VIRT="0x80008000"
+makeoptions	KERNEL_BASE_PHYS="0x82000000"
+makeoptions	KERNEL_BASE_VIRT="0x82000000"
 
 makeoptions	BOARDMKFRAG="${THISARM}/conf/mk.imx7"
 makeoptions	CPPFLAGS+="-I$S/../../../include"

Index: src/sys/arch/evbarm/imx7/imx7_machdep.c
diff -u src/sys/arch/evbarm/imx7/imx7_machdep.c:1.3 src/sys/arch/evbarm/imx7/imx7_machdep.c:1.4
--- src/sys/arch/evbarm/imx7/imx7_machdep.c:1.3	Mon May 30 17:43:46 2016
+++ src/sys/arch/evbarm/imx7/imx7_machdep.c	Mon Oct 17 10:36:57 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: imx7_machdep.c,v 1.3 2016/05/30 17:43:46 dholland Exp $	*/
+/*	$NetBSD: imx7_machdep.c,v 1.4 2016/10/17 10:36:57 ryo Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.3 2016/05/30 17:43:46 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imx7_machdep.c,v 1.4 2016/10/17 10:36:57 ryo Exp $");
 
 #include "opt_evbarm_boardtype.h"
 #include "opt_arm_debug.h"
@@ -220,7 +220,14 @@ initarm(void *arg)
 #endif
 
 	bootconfig.dramblocks = 1;
+#ifdef MEMSIZE_RESERVED
+	/* reserved for Cortex-M4 core */
+	memsize -= MEMSIZE_RESERVED * 1024 * 1024;
+	bootconfig.dram[0].address = KERN_VTOPHYS(KERNEL_BASE) +
+	    MEMSIZE_RESERVED * 1024 * 1024;
+#else
 	bootconfig.dram[0].address = KERN_VTOPHYS(KERNEL_BASE);
+#endif
 	bootconfig.dram[0].pages = memsize / PAGE_SIZE;
 
 #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS

Reply via email to