Skip to content
Snippets Groups Projects
Commit 4a3685df authored by Japheth Lim's avatar Japheth Lim Committed by Anna Lyons
Browse files

ARM boot: abort if out of freemem slots

This fails early if the build process failed to calculate a suitable
MAX_NUM_FREEMEM_REG.
parent e42700a4
No related branches found
No related tags found
No related merge requests found
......@@ -41,8 +41,19 @@ BOOT_CODE bool_t insert_region(region_t reg)
return true;
}
}
#ifdef CONFIG_ARCH_ARM
/* boot.h should have calculated MAX_NUM_FREEMEM_REG correctly.
* If we've run out, then something is wrong.
* Note that the capDL allocation toolchain does not know about
* MAX_NUM_FREEMEM_REG, so throwing away regions may prevent
* capDL applications from being loaded! */
printf("Can't fit memory region 0x%lx-0x%lx, try increasing MAX_NUM_FREEMEM_REG (currently %d)\n",
reg.start, reg.end, (int)MAX_NUM_FREEMEM_REG);
assert(!"Ran out of freemem slots");
#else
printf("Dropping memory region 0x%lx-0x%lx, try increasing MAX_NUM_FREEMEM_REG (currently %d)\n",
reg.start, reg.end, (int)MAX_NUM_FREEMEM_REG);
#endif
return false;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment