libxl: arm: ensure DTB is page aligned

xc_dom_alloc_segment requires this. Since rambase and ramend are both page
aligned, rounding up the DTB is sufficient.

Reported-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
This commit is contained in:
Ian Campbell committed 2013-11-21 10:45:29 +00:00
1 parent 45ffa79447
commit d239c0a68f
1 file changed
+1 -1
+1 -1
View File
@@ -282,7 +282,7 @@ int arch_setup_meminit(struct xc_dom_image *dom)
{
const uint64_t rambase = dom->rambase_pfn << XC_PAGE_SHIFT;
const uint64_t ramend = rambase + ( dom->total_pages << XC_PAGE_SHIFT );
const uint64_t dtbsize = ( dom->devicetree_size + 3 ) & ~0x3;
const uint64_t dtbsize = ROUNDUP(dom->devicetree_size, XC_PAGE_SHIFT);
/* Place at 128MB if there is sufficient RAM */
if ( ramend >= rambase + 128*1024*1024 + dtbsize )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.