From 6a01ac25040e69186033d3d4292aa48545f34383 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Fri, 23 Jul 2021 10:09:45 -0600 Subject: arch/x86/thread: Add #error when compiling for x86_64 The x86 thread code is all x86_32 specific. It needs to be updated to work with 64 bit. For now just throw an error when compiling. BUG=b:179699789 TEST=none Suggested-by: Furquan Shaikh Signed-off-by: Raul E Rangel Change-Id: I96187ad84bdec40c6883748afa41e217bc389b79 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56571 Tested-by: build bot (Jenkins) Reviewed-by: Julius Werner --- src/arch/x86/thread.c | 4 ++++ src/arch/x86/thread_switch.S | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/arch/x86/thread.c b/src/arch/x86/thread.c index a9fda66245..fa6096161b 100644 --- a/src/arch/x86/thread.c +++ b/src/arch/x86/thread.c @@ -2,6 +2,10 @@ #include +#if ENV_X86_64 +#error COOP_MULTITASKING does not currently support x86_64 +#endif + /* The stack frame looks like the following after a pushad instruction. */ struct pushad_regs { uint32_t edi; /* Offset 0x00 */ diff --git a/src/arch/x86/thread_switch.S b/src/arch/x86/thread_switch.S index 049f092741..3c6a34dd13 100644 --- a/src/arch/x86/thread_switch.S +++ b/src/arch/x86/thread_switch.S @@ -1,5 +1,9 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#if ENV_X86_64 +#error COOP_MULTITASKING does not currently support x86_64 +#endif + .code32 .text -- cgit v1.2.3