[OpenBIOS] [PATCH 16/24] libopenbios: move prototypes for start_elf() and __context into libopenbios
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Tue Sep 6 00:01:32 CEST 2016
Also fix up the incorrect x86 prototype which is missing the volatile qualifier.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland at ilande.co.uk>
---
arch/ppc/qemu/context.c | 1 -
arch/sparc32/boot.h | 4 ----
arch/sparc64/boot.h | 4 ----
arch/x86/boot.h | 4 ----
arch/x86/context.c | 2 +-
include/libopenbios/initprogram.h | 3 +++
6 files changed, 4 insertions(+), 14 deletions(-)
diff --git a/arch/ppc/qemu/context.c b/arch/ppc/qemu/context.c
index 6fbec17..cbf2380 100644
--- a/arch/ppc/qemu/context.c
+++ b/arch/ppc/qemu/context.c
@@ -32,7 +32,6 @@
static void start_main(void); /* forward decl. */
void __exit_context(void); /* assembly routine */
-unsigned int start_elf(unsigned long entry_point);
void entry(void);
void of_client_callback(void);
diff --git a/arch/sparc32/boot.h b/arch/sparc32/boot.h
index 6aabba3..0001699 100644
--- a/arch/sparc32/boot.h
+++ b/arch/sparc32/boot.h
@@ -9,10 +9,6 @@
// linux_load.c
int linux_load(struct sys_info *info, const char *file, const char *cmdline);
-// context.c
-extern struct context * volatile __context;
-unsigned int start_elf(unsigned long entry_point);
-
// boot.c
extern const char *bootpath;
extern void boot(void);
diff --git a/arch/sparc64/boot.h b/arch/sparc64/boot.h
index d7ca862..f7b739f 100644
--- a/arch/sparc64/boot.h
+++ b/arch/sparc64/boot.h
@@ -9,10 +9,6 @@
// linux_load.c
int linux_load(struct sys_info *info, const char *file, const char *cmdline);
-// context.c
-extern struct context * volatile __context;
-unsigned int start_elf(unsigned long entry_point);
-
// boot.c
extern uint64_t kernel_image;
extern uint64_t kernel_size;
diff --git a/arch/x86/boot.h b/arch/x86/boot.h
index fff6719..94c37b5 100644
--- a/arch/x86/boot.h
+++ b/arch/x86/boot.h
@@ -9,10 +9,6 @@
/* linux_load.c */
int linux_load(struct sys_info *info, const char *file, const char *cmdline);
-/* context.c */
-extern struct context *__context;
-unsigned int start_elf(unsigned long entry_point);
-
/* boot.c */
extern void boot(void);
extern void go(void);
diff --git a/arch/x86/context.c b/arch/x86/context.c
index 17d4f0e..6bb2f69 100644
--- a/arch/x86/context.c
+++ b/arch/x86/context.c
@@ -45,7 +45,7 @@ static struct context main_ctx __attribute__((section (".initctx"))) = {
/* This is used by assembly routine to load/store the context which
* it is to switch/switched. */
-struct context *__context = &main_ctx;
+struct context * volatile __context = &main_ctx;
/* Client program context */
static struct context *client_ctx;
diff --git a/include/libopenbios/initprogram.h b/include/libopenbios/initprogram.h
index 406b84a..c42d956 100644
--- a/include/libopenbios/initprogram.h
+++ b/include/libopenbios/initprogram.h
@@ -17,6 +17,9 @@
#ifndef _H_INITPROGRAM
#define _H_INITPROGRAM
+extern struct context * volatile __context;
+extern unsigned int start_elf(unsigned long address);
+
extern int arch_init_program(void);
extern void init_program(void);
--
1.7.10.4
More information about the OpenBIOS
mailing list