]> xenbits.xensource.com Git - xen.git/commitdiff
x86/boot: Introduce boot-helpers.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Nov 2024 16:57:29 +0000 (16:57 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 19 Nov 2024 19:53:51 +0000 (19:53 +0000)
Eclair complains that neither reloc_trampoline{32,64}() can see their
declarations.

reloc_trampoline32() needs to become asmlinkage, while reloc_trampoline64()
needs declaring properly in a way that both efi-boot.h and reloc-trampoline.c
can see.

Introduce boot-helpers.h for the purpose.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/boot/reloc-trampoline.c
xen/arch/x86/efi/efi-boot.h
xen/arch/x86/include/asm/boot-helpers.h [new file with mode: 0644]

index d5548eb08f856db033e5e8ed5ef7e96bbbbbfbe5..e35e7c78aa861528507904238616151fed03555e 100644 (file)
@@ -2,13 +2,15 @@
 
 #include <xen/compiler.h>
 #include <xen/stdint.h>
+
+#include <asm/boot-helpers.h>
 #include <asm/trampoline.h>
 
 extern const int32_t __trampoline_rel_start[], __trampoline_rel_stop[];
 extern const int32_t __trampoline_seg_start[], __trampoline_seg_stop[];
 
 #if defined(__i386__)
-void reloc_trampoline32(void)
+void asmlinkage reloc_trampoline32(void)
 #elif defined (__x86_64__)
 void reloc_trampoline64(void)
 #else
index 9d3f2b71447ebd82db1a5c63b8a7cc23e520de86..1d8902a9a7240cc8abcebb25516cd27f968b57b0 100644 (file)
@@ -4,6 +4,8 @@
  * therefore can define arch specific global variables.
  */
 #include <xen/vga.h>
+
+#include <asm/boot-helpers.h>
 #include <asm/e820.h>
 #include <asm/edd.h>
 #include <asm/microcode.h>
@@ -103,8 +105,6 @@ static void __init efi_arch_relocate_image(unsigned long delta)
     }
 }
 
-void reloc_trampoline64(void);
-
 static void __init relocate_trampoline(unsigned long phys)
 {
     trampoline_phys = phys;
diff --git a/xen/arch/x86/include/asm/boot-helpers.h b/xen/arch/x86/include/asm/boot-helpers.h
new file mode 100644 (file)
index 0000000..391e16a
--- /dev/null
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Declarations for helper functions compiled for both 32bit and 64bit.
+ *
+ * The 32bit forms are only used from assembly, so no declarations are
+ * provided.
+ */
+#ifndef X86_BOOT_HELPERS_H
+#define X86_BOOT_HELPERS_H
+
+void reloc_trampoline64(void);
+
+#endif /* X86_BOOT_HELPERS_H */