arch/x86: Remove unused `protected_mode_jump` API
This patch removes all instances of the `protected_mode_jump` API and
its associated header file.
The API is no longer used by any code within the tree.
BUG=b:332759882
TEST=Built and booted 64-bit coreboot with 32-bit payload successfully.
Change-Id: I3eb31b09c92512338ccc540f60289960bd6bf439
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82372
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/src/arch/x86/Makefile.mk b/src/arch/x86/Makefile.mk
index 1994546..2bd4338 100644
--- a/src/arch/x86/Makefile.mk
+++ b/src/arch/x86/Makefile.mk
@@ -253,7 +253,6 @@
ramstage-y += boot.c
ramstage-y += post.c
ramstage-y += c_start.S
-ramstage-y += c_exit.S
ramstage-y += cpu.c
ramstage-y += cpu_common.c
ramstage-$(CONFIG_DEBUG_HW_BREAKPOINTS) += breakpoint.c
diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c
index 4e547b0..8694ff7 100644
--- a/src/arch/x86/boot.c
+++ b/src/arch/x86/boot.c
@@ -1,6 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0-only */
-#include <arch/boot/boot.h>
#include <arch/cpu.h>
#include <commonlib/helpers.h>
#include <console/console.h>
diff --git a/src/arch/x86/c_exit.S b/src/arch/x86/c_exit.S
deleted file mode 100644
index 069a66c..0000000
--- a/src/arch/x86/c_exit.S
+++ /dev/null
@@ -1,36 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <arch/ram_segs.h>
-#include <cpu/x86/cr.h>
-
-#if ENV_X86_64
-
- /*
- * Functions to handle mode switches from long mode to protected
- * mode.
- */
-.text
-.code64
- .section ".text.protected_mode_jump", "ax", @progbits
- .globl protected_mode_jump
-protected_mode_jump:
-
- push %rbp
- mov %rsp, %rbp
-
- /* Arguments to stack */
- push %rdi
- push %rsi
-
- #include <cpu/x86/64bit/exit32.inc>
-
- movl -8(%ebp), %eax /* Function to call */
- movl -16(%ebp), %ebx /* Argument 0 */
-
- /* Align the stack */
- andl $0xFFFFFFF0, %esp
- subl $12, %esp
- pushl %ebx /* Argument 0 */
-
- jmp *%eax
-#endif
diff --git a/src/arch/x86/include/arch/boot/boot.h b/src/arch/x86/include/arch/boot/boot.h
deleted file mode 100644
index e719d20..0000000
--- a/src/arch/x86/include/arch/boot/boot.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#ifndef X86_BOOT_H
-#define X86_BOOT_H
-
-#include <types.h>
-/*
- * Jump to function in protected mode.
- * @arg func_ptr Function to jump to in protected mode
- * @arg Argument to pass to called function
- *
- * @noreturn
- */
-void protected_mode_jump(uint32_t func_ptr, uint32_t argument);
-
-#endif /* X86_BOOT_H */