summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2024-05-12 17:21:58 +0000
committerFelix Held <felix-coreboot@felixheld.de>2024-05-14 13:08:04 +0000
commitd05611d264b5dcf4223f927bf88c6504fb04f3f7 (patch)
tree612d2a2abe7b6ca84b0968c5c57e782b558753dd /src/arch
parent06b25c26a18a5d9044ba91c65e0cda3fc19daf56 (diff)
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>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/x86/Makefile.mk1
-rw-r--r--src/arch/x86/boot.c1
-rw-r--r--src/arch/x86/c_exit.S36
-rw-r--r--src/arch/x86/include/arch/boot/boot.h16
4 files changed, 0 insertions, 54 deletions
diff --git a/src/arch/x86/Makefile.mk b/src/arch/x86/Makefile.mk
index 19945465bc..2bd4338715 100644
--- a/src/arch/x86/Makefile.mk
+++ b/src/arch/x86/Makefile.mk
@@ -253,7 +253,6 @@ ramstage-$(CONFIG_ACPI_BERT) += acpi_bert_storage.c
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 4e547b0e77..8694ff782d 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 069a66c91e..0000000000
--- 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 e719d20aa5..0000000000
--- 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 */