mirror of
https://github.com/deadw00d/AROS.git
synced 2025-11-23 20:21:25 +00:00
Use GPRs only for kernel of x86_64
Doing this guarantees that kernel code does not modify values of SSE/AVX registers when executing interrupt handler code. SSE/AVX are not part of of register frame saved when entering interrupt handler code. Note: generic interrupt handler code will call into specific driver interrupt handlers (or software interrupt code executed via Cause). This code can also be writing to SSE/AVX registers and damaging them. This case is not handled in this commit.
This commit is contained in:
@ -23,6 +23,7 @@ FILES := platform_init powerstate_handlers supervisor exec_idle intserver_vblank
|
||||
|
||||
# From kernel.resource we need only kernel_syscalls.h
|
||||
USER_INCLUDES := $(PRIV_EXEC_INCLUDES)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
|
||||
%build_archspecific \
|
||||
mainmmake=kernel-exec maindir=rom/exec arch=pc \
|
||||
|
||||
@ -79,6 +79,7 @@ FILES := \
|
||||
MAINDIR := rom/kernel
|
||||
USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) \
|
||||
-isystem $(SRCDIR)/arch/all-native/bootconsole/include -DAROS_ARCHITECTURE="\"$(AROS_TARGET_PLATFORM)\""
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
|
||||
#MM- kernel-kernel-pc-common : kernel-acpica-sharedlib-linklib linklibs-bootconsole \
|
||||
#MM kernel-kernel-native kernel-acpica-sharedlib-includes
|
||||
|
||||
@ -30,6 +30,7 @@ AFILES := \
|
||||
|
||||
USER_AFLAGS := -I$(GENINCDIR)
|
||||
USER_INCLUDES := $(PRIV_EXEC_INCLUDES)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
|
||||
# Allow to add architecture-specific options
|
||||
-include $(SRCDIR)/arch/all-$(FAMILY)/exec/make.opts
|
||||
|
||||
@ -21,6 +21,7 @@ FILES := cpu_init createcontext
|
||||
|
||||
USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) \
|
||||
-I$(GENINCDIR)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
USER_CPPFLAGS := -D__AROS_EXEC_LIBRARY__
|
||||
|
||||
# Allow to add architecture-specific options
|
||||
|
||||
@ -12,6 +12,7 @@ AFILES := userstate
|
||||
#MM kernel-exec-pc-x86_64 : kernel-kernel-pc-x86_64-includes kernel-exec-includes includes-asm_h
|
||||
|
||||
USER_AFLAGS := -isystem $(GENINCDIR)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
|
||||
%build_archspecific \
|
||||
mainmmake=kernel-exec maindir=rom/exec arch=pc-x86_64 \
|
||||
|
||||
@ -33,6 +33,7 @@ MAINDIR := rom/kernel
|
||||
USER_AFLAGS := -I$(GENINCDIR) -I$(SRCDIR)/arch/all-pc/kernel
|
||||
USER_INCLUDES := $(PRIV_KERNEL_INCLUDES) -I$(SRCDIR)/arch/all-native/kernel \
|
||||
-isystem $(SRCDIR)/arch/all-native/bootconsole/include
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
#USER_CPPFLAGS := -DTARGET_SECTION_COMMENT=\"$(AROS_SECTION_COMMENT)\"
|
||||
|
||||
#MM kernel-kernel-pc-x86_64 : kernel-pc-acpica-includes includes-asm_h includes kernel-kernel-includes linklibs-bootconsole
|
||||
|
||||
@ -58,6 +58,9 @@ PRIV_EXEC_INCLUDES = \
|
||||
# platform.h can be overriden in arch-specific directory
|
||||
USER_INCLUDES += $(PRIV_EXEC_INCLUDES) -I$(SRCDIR)/rom/debug
|
||||
USER_CPPFLAGS := -DAROS_ARCH_$(ARCH)
|
||||
ifeq ($(AROS_TARGET_CPU),x86_64)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
endif
|
||||
ifeq ($(AROS_TARGET_CPU),m68k)
|
||||
# Make sure we optimize this code for size on m68k..
|
||||
OPTIMIZATION_CFLAGS := -Os
|
||||
|
||||
@ -29,7 +29,10 @@ PRIV_KERNEL_INCLUDES = \
|
||||
|
||||
USER_INCLUDES := $(PRIV_KERNEL_INCLUDES)
|
||||
USER_CPPFLAGS := -D__AROS_EXEC_LIBRARY__ \
|
||||
-DAROS_ARCHITECTURE="\"$(AROS_TARGET_PLATFORM)\"" \
|
||||
-DAROS_ARCHITECTURE="\"$(AROS_TARGET_PLATFORM)\""
|
||||
ifeq ($(AROS_TARGET_CPU),x86_64)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
endif
|
||||
|
||||
# Allow to add architecture-specific options
|
||||
-include $(SRCDIR)/arch/all-$(FAMILY)/kernel/make.opts
|
||||
|
||||
@ -24,6 +24,9 @@ USER_CPPFLAGS := \
|
||||
#USER_CPPFLAGS += -DDEBUG=1
|
||||
USER_LDFLAGS := -noclibs
|
||||
USER_INCLUDES += $(PRIV_EXEC_INCLUDES)
|
||||
ifeq ($(AROS_TARGET_CPU),x86_64)
|
||||
USER_CFLAGS += $(CFLAGS_GENERAL_REGS_ONLY)
|
||||
endif
|
||||
|
||||
# Allow to add architecture-specific options
|
||||
-include $(SRCDIR)/arch/all-$(FAMILY)/exec/make.opts
|
||||
|
||||
Reference in New Issue
Block a user