phys_size_t getenv_bootm_size(void)
{
+ phys_size_t tmp;
char *s = getenv ("bootm_size");
if (s) {
- phys_size_t tmp;
tmp = (phys_size_t)simple_strtoull (s, NULL, 16);
return tmp;
}
+ s = getenv("bootm_low");
+ if (s)
+ tmp = (phys_size_t)simple_strtoull (s, NULL, 16);
+ else
+ tmp = 0;
+
#if defined(CONFIG_ARM)
- return gd->bd->bi_dram[0].size;
+ return gd->bd->bi_dram[0].size - tmp;
#else
- return gd->bd->bi_memsize;
+ return gd->bd->bi_memsize - tmp;
#endif
}