summaryrefslogtreecommitdiff
path: root/nuttx/include/nuttx/addrenv.h
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-10 08:41:01 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-10 08:41:01 -0600
commit964637c55aa7e3205590c3e509eb7058f4d0869c (patch)
treeb55791e804f4c0115c3ac945da6a141ef55b6db3 /nuttx/include/nuttx/addrenv.h
parent56bb85dc4173fec7d91379bd475c0310749d243c (diff)
downloadnuttx-964637c55aa7e3205590c3e509eb7058f4d0869c.tar.gz
nuttx-964637c55aa7e3205590c3e509eb7058f4d0869c.tar.bz2
nuttx-964637c55aa7e3205590c3e509eb7058f4d0869c.zip
Add configuration to use the fixed DRAM mapping for the page pool (if available) instead of remapping dynamically to access L2 page tables and page data. Also, add logic in address environment creation to initialize the shared data at the beginning of the .bss/.data process memory region.
Diffstat (limited to 'nuttx/include/nuttx/addrenv.h')
-rw-r--r--nuttx/include/nuttx/addrenv.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/addrenv.h b/nuttx/include/nuttx/addrenv.h
index 9782e9918..6b1fc2809 100644
--- a/nuttx/include/nuttx/addrenv.h
+++ b/nuttx/include/nuttx/addrenv.h
@@ -161,6 +161,31 @@
#define ARCH_SCRATCH_VBASE (CONFIG_ARCH_STACK_VBASE + ARCH_STACK_SIZE)
+/* There is no need to use the scratch memory region if the page pool memory
+ * is statically mapped.
+ */
+
+#ifdef CONFIG_ARCH_PGPOOL_MAPPING
+
+# ifndef CONFIG_ARCH_PGPOOL_PBASE
+# error CONFIG_ARCH_PGPOOL_PBASE not defined
+# endif
+
+# ifndef CONFIG_ARCH_PGPOOL_VBASE
+# error CONFIG_ARCH_PGPOOL_VBASE not defined
+# endif
+
+# ifndef CONFIG_ARCH_PGPOOL_SIZE
+# error CONFIG_ARCH_PGPOOL_SIZE not defined
+# endif
+
+# define CONFIG_ARCH_PGPOOL_PEND \
+ (CONFIG_ARCH_PGPOOL_PBASE + CONFIG_ARCH_PGPOOL_SIZE)
+# define CONFIG_ARCH_PGPOOL_VEND \
+ (CONFIG_ARCH_PGPOOL_VBASE + CONFIG_ARCH_PGPOOL_SIZE)
+
+#endif
+
/****************************************************************************
* Public Types
****************************************************************************/