Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch * Add option MEMSIZE_RESERVED to reserves memory fo...
details: https://anonhg.NetBSD.org/src/rev/c01ed6ce6ed3
branches: trunk
changeset: 348392:c01ed6ce6ed3
user: ryo <ryo%NetBSD.org@localhost>
date: Mon Oct 17 10:36:56 2016 +0000
description:
* Add option MEMSIZE_RESERVED to reserves memory for Cortex-M4 area
* change KERNEL_BASE from 0x80008000 to 0x82000000
diffstat:
sys/arch/arm/imx/files.imx7 | 3 ++-
sys/arch/evbarm/conf/ARMADILLO-IOT-G3 | 3 ++-
sys/arch/evbarm/conf/std.imx7 | 6 +++---
sys/arch/evbarm/imx7/imx7_machdep.c | 11 +++++++++--
4 files changed, 16 insertions(+), 7 deletions(-)
diffs (87 lines):
diff -r a528a8e41854 -r c01ed6ce6ed3 sys/arch/arm/imx/files.imx7
--- a/sys/arch/arm/imx/files.imx7 Mon Oct 17 09:21:51 2016 +0000
+++ b/sys/arch/arm/imx/files.imx7 Mon Oct 17 10:36:56 2016 +0000
@@ -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/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
diff -r a528a8e41854 -r c01ed6ce6ed3 sys/arch/evbarm/conf/ARMADILLO-IOT-G3
--- a/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 Mon Oct 17 09:21:51 2016 +0000
+++ b/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 Mon Oct 17 10:36:56 2016 +0000
@@ -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 PMAPCOUNTERS
options MEMSIZE=512
+options MEMSIZE_RESERVED=32 # only reserved 32M for Cortex-M4 core
# Standard system options
diff -r a528a8e41854 -r c01ed6ce6ed3 sys/arch/evbarm/conf/std.imx7
--- a/sys/arch/evbarm/conf/std.imx7 Mon Oct 17 09:21:51 2016 +0000
+++ b/sys/arch/evbarm/conf/std.imx7 Mon Oct 17 10:36:56 2016 +0000
@@ -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_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"
diff -r a528a8e41854 -r c01ed6ce6ed3 sys/arch/evbarm/imx7/imx7_machdep.c
--- a/sys/arch/evbarm/imx7/imx7_machdep.c Mon Oct 17 09:21:51 2016 +0000
+++ b/sys/arch/evbarm/imx7/imx7_machdep.c Mon Oct 17 10:36:56 2016 +0000
@@ -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 @@
#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
Home |
Main Index |
Thread Index |
Old Index