mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
arch/x86_64: define the missing CONFIG_ARCH_HAVE_SYSCALL.
794c325947 ("arch/x64:Syscall support is enabled by default", 2025-05-27)
changed nine guards from CONFIG_LIB_SYSCALL to CONFIG_ARCH_HAVE_SYSCALL but
never added the Kconfig symbol. Only ARCH_HAVE_SYSCALL_HOOKS exists in tree;
ARCH_HAVE_SYSCALL itself is defined nowhere, so it is always unset and since
that commit x86_64 has had no x86_64_syscall_entry(), no x86_64_syscall(), no
IA32_LSTAR/IA32_STAR programming and no syscall stub layer in any
configuration:
arch/x86_64/src/common/Make.defs:37 x86_64_syscall.c not compiled
arch/x86_64/src/common/CMakeLists.txt:41 likewise
arch/x86_64/include/irq.h:86
arch/x86_64/src/intel64/intel64_cpu.c:247, :386
arch/x86_64/src/intel64/intel64_head.S:83, :351, :538
arch/x86_64/src/intel64/intel64_saveusercontext.S:108
qemu-intel64:knsh_romfs and qemu-intel64:knsh_romfs_pci are the two
CONFIG_BUILD_KERNEL configurations in tree, and neither can have worked in
that time. They still link -- nothing references the missing pieces, so
libstubs.a is simply never pulled in -- and then die the first time user code
executes SYSCALL.
Define the symbol with the condition the code had before that commit, which
is LIB_SYSCALL: every protected and every kernel build needs the interface,
and a flat build is left exactly as it is today.
Impact: restores the system call interface for CONFIG_BUILD_KERNEL and
CONFIG_BUILD_PROTECTED on x86_64. CONFIG_BUILD_FLAT is unaffected --
qemu-intel64:nsh still builds with ARCH_HAVE_SYSCALL unset.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This commit is contained in:
parent
caa700c138
commit
59b47cf3f4
1 changed files with 7 additions and 0 deletions
|
|
@ -151,6 +151,7 @@ config ARCH_X86_64
|
|||
select ARCH_HAVE_SETJMP
|
||||
select ARCH_HAVE_PERF_EVENTS
|
||||
select ARCH_HAVE_POWEROFF
|
||||
select ARCH_HAVE_SYSCALL if LIB_SYSCALL
|
||||
---help---
|
||||
x86-64 architectures.
|
||||
|
||||
|
|
@ -611,6 +612,12 @@ config ARCH_HAVE_RTC_SUBSECONDS
|
|||
bool
|
||||
default n
|
||||
|
||||
config ARCH_HAVE_SYSCALL
|
||||
bool
|
||||
default n
|
||||
---help---
|
||||
Indicates that the architecture provides the system call interface.
|
||||
|
||||
config ARCH_HAVE_SYSCALL_HOOKS
|
||||
bool
|
||||
default n
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue