From 28928fed5e3f5ef6b3ff882cda1fb448ce76196b Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 25 Aug 2014 11:18:32 -0600 Subject: Cortex-A/SAMA5 address environment support is code complete (untested) --- nuttx/mm/Kconfig | 12 ------------ nuttx/mm/mm_pgalloc.c | 22 ++++++++-------------- 2 files changed, 8 insertions(+), 26 deletions(-) (limited to 'nuttx/mm') 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 -- cgit v1.2.3