Fix heap layout issue
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2925 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
74b678fb1a
commit
a4859ef3a6
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
/************************************************************************
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user