Bugfixes.. still integrating SAMA5 ELF with address environment

This commit is contained in:
Gregory Nutt
2014-08-25 15:27:58 -06:00
parent 9857f09baf
commit cfa8174fe4
+4 -4
View File
@@ -213,7 +213,7 @@ int up_addrenv_create(size_t textsize, size_t datasize,
{ {
/* Allocate one physical page */ /* Allocate one physical page */
paddr = mm_pgalloc(ARCH_SECT2PG(1)); paddr = mm_pgalloc(1);
if (!paddr) if (!paddr)
{ {
ret = -ENOMEM; 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 */ /* Temporarily map the page into the virtual address space */
flags = irqsave(); flags = irqsave();
l1save = mmu_l1_getentry(vaddr); l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
set_l1_entry(ARCH_SCRATCH_VBASE, paddr); set_l1_entry(ARCH_SCRATCH_VBASE, paddr);
l2table = (FAR uint32_t *)ARCH_SCRATCH_VBASE; 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 */ /* Allocate one physical page */
paddr = mm_pgalloc(ARCH_SECT2PG(1)); paddr = mm_pgalloc(1);
if (!paddr) if (!paddr)
{ {
ret = -ENOMEM; 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 */ /* Temporarily map the page into the virtual address space */
flags = irqsave(); flags = irqsave();
l1save = mmu_l1_getentry(vaddr); l1save = mmu_l1_getentry(ARCH_SCRATCH_VBASE);
set_l1_entry(ARCH_SCRATCH_VBASE, paddr); set_l1_entry(ARCH_SCRATCH_VBASE, paddr);
l2table = (FAR uint32_t *)ARCH_SCRATCH_VBASE; l2table = (FAR uint32_t *)ARCH_SCRATCH_VBASE;