@@ -176,7 +176,7 @@ extern unsigned long total_pages;
#define PDX_GROUP_SHIFT SECOND_SHIFT
/* Boot-time pagetable setup */
-extern void setup_pagetables(unsigned long boot_phys_offset);
+extern void setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr);
/* Map FDT in boot pagetable */
extern void *early_fdt_map(paddr_t fdt_paddr);
/* Remove early mappings */
@@ -634,7 +634,7 @@ static void clear_table(void *table)
/* Boot-time pagetable setup.
* Changes here may need matching changes in head.S */
-void __init setup_pagetables(unsigned long boot_phys_offset)
+void __init setup_pagetables(unsigned long boot_phys_offset, paddr_t xen_paddr)
{
uint64_t ttbr;
lpae_t pte, *p;
@@ -867,6 +867,7 @@ void __init start_xen(unsigned long boot_phys_offset,
struct bootmodule *xen_bootmodule;
struct domain *d;
int rc;
+ paddr_t xen_paddr = (paddr_t)(_start + boot_phys_offset);
dcache_line_bytes = read_dcache_line_bytes();
@@ -893,12 +894,11 @@ void __init start_xen(unsigned long boot_phys_offset,
cmdline_parse(cmdline);
/* Register Xen's load address as a boot module. */
- xen_bootmodule = add_boot_module(BOOTMOD_XEN,
- (paddr_t)(uintptr_t)(_start + boot_phys_offset),
+ xen_bootmodule = add_boot_module(BOOTMOD_XEN, xen_paddr,
(paddr_t)(uintptr_t)(_end - _start + 1), false);
BUG_ON(!xen_bootmodule);
- setup_pagetables(boot_phys_offset);
+ setup_pagetables(boot_phys_offset, xen_paddr);
setup_mm();