summaryrefslogtreecommitdiff
path: root/nuttx/mm
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-25 11:18:32 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-25 11:18:32 -0600
commit28928fed5e3f5ef6b3ff882cda1fb448ce76196b (patch)
tree6fab8a2f346a4e8e2af6771e2f7c0bbdb897771a /nuttx/mm
parent59d9019f45c3e0229b12eda8a57118e6e69f99ea (diff)
downloadnuttx-28928fed5e3f5ef6b3ff882cda1fb448ce76196b.tar.gz
nuttx-28928fed5e3f5ef6b3ff882cda1fb448ce76196b.tar.bz2
nuttx-28928fed5e3f5ef6b3ff882cda1fb448ce76196b.zip
Cortex-A/SAMA5 address environment support is code complete (untested)
Diffstat (limited to 'nuttx/mm')
-rw-r--r--nuttx/mm/Kconfig12
-rw-r--r--nuttx/mm/mm_pgalloc.c22
2 files changed, 8 insertions, 26 deletions
diff --git a/nuttx/mm/Kconfig b/nuttx/mm/Kconfig
index 0f7d56102..977baeb86 100644
--- a/nuttx/mm/Kconfig
+++ b/nuttx/mm/Kconfig
@@ -158,18 +158,6 @@ config MM_PGSIZE
16384}. This is easily extensible, but only those values are
currently support.
-config MM_PGPOOL_PADDR
- hex "Page Memory Pool Start"
- ---help---
- Physical address of the start of the page memory pool. This
- will be aligned to the page size if it is not already aligned.
-
-config MM_PGPOOL_SIZE
- int "Page Memory Pool Size"
- ---help---
- The size of the page memory pool in bytes. This will be aligned
- if it is not already aligned.
-
config DEBUG_PGALLOC
bool "Page Allocator Debug"
default n
diff --git a/nuttx/mm/mm_pgalloc.c b/nuttx/mm/mm_pgalloc.c
index f270ce67a..bd61a4bf6 100644
--- a/nuttx/mm/mm_pgalloc.c
+++ b/nuttx/mm/mm_pgalloc.c
@@ -56,11 +56,6 @@
* CONFIG_MM_PGSIZE - The page size. Must be one of {1024, 2048,
* 4096, 8192, or 16384}. This is easily extensible, but only those
* values are currently support.
- * CONFIG_MM_PGPOOL_PADDR - Physical address of the start of the page
- * memory pool. This will be aligned to the page size if it is not
- * already aligned.
- * CONFIG_MM_PGPOOL_SIZE - The size of the page memory pool in bytes. This
- * will be aligned if it is not already aligned.
* CONFIG_DEBUG_PGALLOC - Just like CONFIG_DEBUG_MM, but only generates
* output from the page allocation logic.
*
@@ -112,28 +107,27 @@ static GRAN_HANDLE g_pgalloc;
* Initialize the page allocator.
*
* Input Parameters:
- * None
+ * heap_start - The physical address of the start of memory region that
+ * will be used for the page allocator heap
+ * heap_size - The size (in bytes) of the memory region that will be used
+ * for the page allocator heap.
*
* Returned Value:
- * Mpme
+ * None
*
****************************************************************************/
-void mm_pginitialize(void)
+void mm_pginitialize(FAR void *heap_start, size_t heap_size)
{
#ifdef CONFIG_GRAN_SINGLE
int ret;
- ret = gran_initialize((FAR void *)CONFIG_MM_PGPOOL_PADDR,
- CONFIG_MM_PGPOOL_SIZE,
- MM_PGSHIFT, MM_PGSHIFT);
+ ret = gran_initialize(heap_start, heap_size, MM_PGSHIFT, MM_PGSHIFT);
DEBUGASSERT(ret == OK);
UNUSED(ret);
#else
- g_pgalloc = gran_initialize((FAR void *)CONFIG_MM_PGPOOL_PADDR,
- CONFIG_MM_PGPOOL_SIZE,
- MM_PGSHIFT, MM_PGSHIFT);
+ g_pgalloc = gran_initialize(heap_start, heap_size, MM_PGSHIFT, MM_PGSHIFT);
DEBUGASSERT(pg_alloc != NULL);
#endif