]> xenbits.xensource.com Git - xen.git/commitdiff
x86/boot: Introduce bootstrap_map_bm() to map boot_module's
authorDaniel P. Smith <dpsmith@apertussolutions.com>
Wed, 23 Oct 2024 16:11:43 +0000 (17:11 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 24 Oct 2024 16:57:59 +0000 (17:57 +0100)
Convert converting the call to bzimage_headroom(), as well as using
bi->mod[0].  It will be used externally by later changes.

No functional change.

Signed-off-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
xen/arch/x86/include/asm/setup.h
xen/arch/x86/setup.c

index 8b7843104ff7412d1cc7b7b3b39d629da89de39e..4874ee8936fce6b624b91d9558c893822f9f7dd2 100644 (file)
@@ -38,6 +38,8 @@ extern struct boot_info xen_boot_info;
 unsigned long initial_images_nrpages(nodeid_t node);
 void discard_initial_images(void);
 
+struct boot_module;
+void *bootstrap_map_bm(const struct boot_module *bm);
 void *bootstrap_map(const module_t *mod);
 void bootstrap_unmap(void);
 
index 8e32d6c49c546d2a738cbce6cb35b307fc9e1076..ee03725af3800b2a38209bb36d70baad31ac7e26 100644 (file)
@@ -475,6 +475,11 @@ void *__init bootstrap_map(const module_t *mod)
                               pfn_to_paddr(mod->mod_start) + mod->mod_end);
 }
 
+void *__init bootstrap_map_bm(const struct boot_module *bm)
+{
+    return bootstrap_map(bm->mod);
+}
+
 void __init bootstrap_unmap(void)
 {
     bootstrap_map_addr(0, 0);
@@ -1403,7 +1408,9 @@ void asmlinkage __init noreturn __start_xen(void)
         mod[bi->nr_modules].mod_end = __2M_rwdata_end - _stext;
     }
 
-    modules_headroom = bzimage_headroom(bootstrap_map(mod), mod->mod_end);
+    modules_headroom =
+        bzimage_headroom(bootstrap_map_bm(&bi->mods[0]),
+                         bi->mods[0].mod->mod_end);
     bootstrap_unmap();
 
 #ifndef highmem_start