diff options
-rw-r--r-- | nuttx/arch/arm/src/arm/pg_macros.h | 11 | ||||
-rwxr-xr-x | nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c | 19 | ||||
-rwxr-xr-x | nuttx/configs/ea3131/src/up_fillpage.c | 2 |
3 files changed, 25 insertions, 7 deletions
diff --git a/nuttx/arch/arm/src/arm/pg_macros.h b/nuttx/arch/arm/src/arm/pg_macros.h index 499093781..fc50f6146 100644 --- a/nuttx/arch/arm/src/arm/pg_macros.h +++ b/nuttx/arch/arm/src/arm/pg_macros.h @@ -281,9 +281,14 @@ /* This is the total number of pages used in the text/data mapping: */ -#define PG_TOTAL_NPPAGES (PG_TEXT_NPPAGES + PG_DATA_PAGES + PG_PGTABLE_NPAGES) -#define PG_TOTAL_NVPAGES (PG_TEXT_NVPAGES + PG_DATA_PAGES + PG_PGTABLE_NPAGES) -#if PG_TOTAL_NPPAGES >PG_RAM_PAGES +#define PG_TOTAL_NPPAGES (PG_TEXT_NPPAGES + PG_DATA_NPAGES + PG_PGTABLE_NPAGES) +#define PG_TOTAL_NVPAGES (PG_TEXT_NVPAGES + PG_DATA_NPAGES + PG_PGTABLE_NPAGES) +#define PG_TOTAL_PSIZE (PG_TOTAL_NPPAGES << PAGESHIFT) +#define PG_TOTAL_VSIZE (PG_TOTAL_NVPAGES << PAGESHIFT) + +/* Sanity check: */ + +#if PG_TOTAL_NPPAGES > PG_RAM_PAGES # error "Total pages required exceeds RAM size" #endif diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c b/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c index e6b587fd3..79ba8464e 100755 --- a/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c +++ b/nuttx/arch/arm/src/lpc313x/lpc313x_allocateheap.c @@ -51,6 +51,11 @@ #include "up_internal.h" #include "lpc313x_memorymap.h" +#ifdef CONFIG_PAGING +# include <nuttx/page.h> +# include "pg_macros.h" +#endif + /************************************************************************ * Pre-processor Definitions ************************************************************************/ @@ -121,10 +126,18 @@ * will let the heap run all the way to the end of SRAM. */ -#ifdef PGTABLE_IN_HIGHSRAM -# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE - PGTABLE_SIZE) +#ifdef CONFIG_PAGING +# ifdef PGTABLE_IN_HIGHSRAM +# define LPC313X_HEAP_VEND (PG_LOCKED_VBASE + PG_TOTAL_VSIZE - PGTABLE_SIZE) +# else +# define LPC313X_HEAP_VEND (PG_LOCKED_VBASE + PG_TOTAL_VSIZE) +# endif #else -# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE) +# ifdef PGTABLE_IN_HIGHSRAM +# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE - PGTABLE_SIZE) +# else +# define LPC313X_HEAP_VEND (LPC313X_INTSRAM_VSECTION + LPC313X_ISRAM_SIZE) +# endif #endif /************************************************************************ diff --git a/nuttx/configs/ea3131/src/up_fillpage.c b/nuttx/configs/ea3131/src/up_fillpage.c index 04f2e8157..8f11dd48a 100755 --- a/nuttx/configs/ea3131/src/up_fillpage.c +++ b/nuttx/configs/ea3131/src/up_fillpage.c @@ -119,7 +119,7 @@ #ifdef CONFIG_PAGING_BLOCKINGFILL int up_fillpage(FAR _TCB *tcb, FAR void *vpage) { - pglldbg("TCB: %p vpage: %d far: %08x\n", tcb, vpage, tcb->xcp.far); + pglldbg("TCB: %p vpage: %p far: %08x\n", tcb, vpage, tcb->xcp.far); # warning "Not implemented" return -ENOSYS; } |