]> xenbits.xensource.com Git - people/sstabellini/xen-unstable.git/.git/commitdiff
temporary fix for Xen start
authorLuca Miccio <206497@studenti.unimore.it>
Mon, 6 Jan 2020 16:12:53 +0000 (17:12 +0100)
committerLuca Miccio <206497@studenti.unimore.it>
Tue, 7 Jan 2020 09:50:38 +0000 (10:50 +0100)
Signed-off-by: Luca Miccio <206497@studenti.unimore.it>
xen/arch/arm/setup.c

index d938f271053588797e9283d88cbc9760627462ba..006bef94a0fcf3b5fc39433b6ab84eb46388df06 100644 (file)
@@ -850,7 +850,7 @@ void __init start_xen(unsigned long boot_phys_offset,
     };
     int rc;
     uint32_t xen_size = (_end - _start);
-    paddr_t xen_paddr;
+    paddr_t xen_paddr = (paddr_t)(_start + boot_phys_offset);
 
     dcache_line_bytes = read_dcache_line_bytes();
 
@@ -881,23 +881,18 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     if ( !coloring_init() )
         panic("Xen Coloring support: setup failed\n");
+
     xen_size = XEN_COLOR_MAP_SIZE;
+    // TODO: find a better way
+    if ( xen_size > 2*1024*1024 )
+        xen_paddr = get_xen_paddr(xen_size);
 
     /* Register Xen's load address as a boot module. */
-    xen_bootmodule = add_boot_module(BOOTMOD_XEN,
-                             (paddr_t)(uintptr_t)(_start + boot_phys_offset),
-                             (paddr_t)(uintptr_t)(xen_size + 1), false);
+    xen_bootmodule = add_boot_module(BOOTMOD_XEN, xen_paddr, xen_size,  false);
     BUG_ON(!xen_bootmodule);
 
-    xen_paddr = get_xen_paddr(xen_size);
     setup_pagetables(boot_phys_offset, xen_paddr);
 
-    /* Update Xen's address now that we have relocated. */
-    printk("Update BOOTMOD_XEN from %"PRIpaddr"-%"PRIpaddr" => %"PRIpaddr"-%"PRIpaddr"\n",
-           xen_bootmodule->start, xen_bootmodule->start + xen_bootmodule->size,
-           xen_paddr, xen_paddr + xen_bootmodule->size);
-    xen_bootmodule->start = xen_paddr;
-
     setup_mm();
 
     /* Parse the ACPI tables for possible boot-time configuration */