diff options
-rw-r--r-- | src/arch/arm/include/arch/stages.h | 1 | ||||
-rw-r--r-- | src/arch/arm/stages.c | 16 | ||||
-rw-r--r-- | src/arch/arm64/include/arch/stages.h | 1 | ||||
-rw-r--r-- | src/arch/mips/include/arch/stages.h | 1 | ||||
-rw-r--r-- | src/arch/mips/stages.c | 6 | ||||
-rw-r--r-- | src/arch/riscv/include/arch/stages.h | 1 | ||||
-rw-r--r-- | src/arch/riscv/stages.c | 16 | ||||
-rw-r--r-- | src/arch/x86/include/arch/stages.h | 11 |
8 files changed, 0 insertions, 53 deletions
diff --git a/src/arch/arm/include/arch/stages.h b/src/arch/arm/include/arch/stages.h index ef4658ef89..2d20604589 100644 --- a/src/arch/arm/include/arch/stages.h +++ b/src/arch/arm/include/arch/stages.h @@ -19,6 +19,5 @@ extern void main(void); void stage_entry(void); -void stage_exit(void *); #endif diff --git a/src/arch/arm/stages.c b/src/arch/arm/stages.c index 6e5b8cd4a5..2beaacd1f8 100644 --- a/src/arch/arm/stages.c +++ b/src/arch/arm/stages.c @@ -34,19 +34,3 @@ __attribute__((weak)) void stage_entry(void) { main(); } - -/* we had marked 'doit' as 'noreturn'. - * There is no apparent harm in leaving it as something we can return from, and in the one - * case where we call a payload, the payload is allowed to return. - * Hence, leave it as something we can return from. - */ -void stage_exit(void *addr) -{ - void (*doit)(void) = addr; - /* - * Most stages load code so we need to sync caches here. Should maybe - * go into cbfs_load_stage() instead... - */ - cache_sync_instructions(); - doit(); -} diff --git a/src/arch/arm64/include/arch/stages.h b/src/arch/arm64/include/arch/stages.h index 6dbf389001..3a3f56e9bf 100644 --- a/src/arch/arm64/include/arch/stages.h +++ b/src/arch/arm64/include/arch/stages.h @@ -21,7 +21,6 @@ extern void main(void); void stage_entry(void); -void stage_exit(void *); void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size); #endif diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h index 71132e38a8..664c136bbf 100644 --- a/src/arch/mips/include/arch/stages.h +++ b/src/arch/mips/include/arch/stages.h @@ -19,6 +19,5 @@ extern void main(void); void stage_entry(void); -void stage_exit(void *); #endif /* __MIPS_ARCH_STAGES_H */ diff --git a/src/arch/mips/stages.c b/src/arch/mips/stages.c index 54df7927da..e940faa6cb 100644 --- a/src/arch/mips/stages.c +++ b/src/arch/mips/stages.c @@ -20,9 +20,3 @@ void stage_entry(void) { main(); } - -void stage_exit(void *addr) -{ - void (*doit)(void) = addr; - doit(); -} diff --git a/src/arch/riscv/include/arch/stages.h b/src/arch/riscv/include/arch/stages.h index d07983e9f9..9e2a37827e 100644 --- a/src/arch/riscv/include/arch/stages.h +++ b/src/arch/riscv/include/arch/stages.h @@ -19,7 +19,6 @@ extern void main(void); void stage_entry(void) __attribute__((section(".text.stage_entry"))); -void stage_exit(void *); void jmp_to_elf_entry(void *entry, unsigned long buffer, unsigned long size); #endif diff --git a/src/arch/riscv/stages.c b/src/arch/riscv/stages.c index a3a5e02d59..053fd7634c 100644 --- a/src/arch/riscv/stages.c +++ b/src/arch/riscv/stages.c @@ -30,19 +30,3 @@ void stage_entry(void) { main(); } - -/* we had marked 'doit' as 'noreturn'. - * There is no apparent harm in leaving it as something we can return from, and in the one - * case where we call a payload, the payload is allowed to return. - * Hence, leave it as something we can return from. - */ -void stage_exit(void *addr) -{ - void (*doit)(void) = addr; - /* - * Most stages load code so we need to sync caches here. Should maybe - * go into cbfs_load_stage() instead... - */ - //cache_sync_instructions(); - doit(); -} diff --git a/src/arch/x86/include/arch/stages.h b/src/arch/x86/include/arch/stages.h index 6f68326b13..49921ae0e1 100644 --- a/src/arch/x86/include/arch/stages.h +++ b/src/arch/x86/include/arch/stages.h @@ -20,15 +20,4 @@ void asmlinkage copy_and_run(void); -static inline void stage_exit(void *entry) -{ - __asm__ volatile ( -#ifdef __x86_64__ - "jmp *%%rdi\n" -#else - "jmp *%%edi\n" -#endif - :: "D"(entry) - ); -} #endif |