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>
{
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 )