Bugfixes.. still integrating SAMA5 ELF with address environment

This commit is contained in:
Gregory Nutt 2014-08-25 15:27:58 -06:00
parent 17cc5caa98
commit 00f5e8f70e
3 changed files with 7 additions and 7 deletions

View File

@ -213,7 +213,7 @@ int up_addrenv_create(size_t textsize, size_t datasize,
{
/* Allocate one physical page */
paddr = mm_pgalloc(ARCH_SECT2PG(1));
paddr = mm_pgalloc(1);
if (!paddr)
{
ret = -ENOMEM;
@ -226,7 +226,7 @@ int up_addrenv_create(size_t textsize, size_t datasize,
/* Temporarily map the page into the virtual address space */
flags = irqsave();
l1save = mmu_l1_getentry(vaddr);
l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
set_l1_entry(ARCH_SCRATCH_VBASE, paddr);
l2table = (FAR uint32_t *)ARCH_SCRATCH_VBASE;
@ -256,7 +256,7 @@ int up_addrenv_create(size_t textsize, size_t datasize,
{
/* Allocate one physical page */
paddr = mm_pgalloc(ARCH_SECT2PG(1));
paddr = mm_pgalloc(1);
if (!paddr)
{
ret = -ENOMEM;
@ -269,7 +269,7 @@ int up_addrenv_create(size_t textsize, size_t datasize,
/* Temporarily map the page into the virtual address space */
flags = irqsave();
l1save = mmu_l1_getentry(vaddr);
l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
set_l1_entry(ARCH_SCRATCH_VBASE, paddr);
l2table = (FAR uint32_t *)ARCH_SCRATCH_VBASE;

View File

@ -242,7 +242,7 @@ CONFIG_SAMA5_ISRAM_HEAP=y
CONFIG_SAMA5_DDRCS_RESERVE=y
CONFIG_SAMA5_DDRCS_HEAP_END=0x28000000
CONFIG_SAMA5_DDRCS_PGHEAP=y
CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET=0x28000000
CONFIG_SAMA5_DDRCS_PGHEAP_OFFSET=0x08000000
CONFIG_SAMA5_DDRCS_PGHEAP_SIZE=134217728
#

View File

@ -104,12 +104,12 @@ gran_common_initialize(FAR void *heapstart, size_t heapsize, uint8_t log2gran,
/* Check parameters if debug is on. Note the size of a granule is
* limited to 2**31 bytes and that the size of the granule must be greater
* than the alignment size.
* than or equal to the alignment size.
*/
DEBUGASSERT(heapstart && heapsize > 0 &&
log2gran > 0 && log2gran < 32 &&
log2gran > log2align);
log2gran >= log2align);
/* Get the aligned start of the heap */