mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
xen/arm: Panic if we can't copy the DTB to dom0 memory
Signed-off-by: Julien Grall <julien.grall@linaro.org> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
8529ac933e
commit
ffcbfb66ee
1 file changed
+4
-1
@@ -535,11 +535,14 @@ static int prepare_dtb(struct domain *d, struct kernel_info *kinfo)
|
||||
static void dtb_load(struct kernel_info *kinfo)
|
||||
{
|
||||
void * __user dtb_virt = (void * __user)(register_t)kinfo->dtb_paddr;
|
||||
unsigned long rc;
|
||||
|
||||
printk("Loading dom0 DTB to 0x%"PRIpaddr"-0x%"PRIpaddr"\n",
|
||||
kinfo->dtb_paddr, kinfo->dtb_paddr + fdt_totalsize(kinfo->fdt));
|
||||
|
||||
raw_copy_to_guest(dtb_virt, kinfo->fdt, fdt_totalsize(kinfo->fdt));
|
||||
rc = raw_copy_to_guest(dtb_virt, kinfo->fdt, fdt_totalsize(kinfo->fdt));
|
||||
if ( rc != 0 )
|
||||
panic("Unable to copy the DTB to dom0 memory (rc = %lu)\n", rc);
|
||||
xfree(kinfo->fdt);
|
||||
}
|
||||
|
||||
|
||||