mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-07-02 02:49:15 +00:00
kernel: add aarch64 architecture support
Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
@ -36,7 +36,15 @@ CFLAGS += -pipe -fno-builtin -fPIC
|
||||
|
||||
endif
|
||||
|
||||
CRT_CFLAGS := -fPIC -fPIE -pie -mno-red-zone -std=c++20 -I$(INCLUDE_DIR)
|
||||
CRT_CFLAGS := -fPIC -fPIE -pie -std=c++20 -I$(INCLUDE_DIR)
|
||||
|
||||
ifeq ($(OSARCH), amd64)
|
||||
CRT_CFLAGS += -mno-red-zone
|
||||
else ifeq ($(OSARCH), i386)
|
||||
CRT_CFLAGS += -mno-red-zone
|
||||
else ifeq ($(OSARCH), aarch64)
|
||||
CRT_CFLAGS +=
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -DDEBUG -ggdb3 -O0 -fdiagnostics-color=always -fstack-usage
|
||||
|
@ -73,7 +73,11 @@ DefineFunction(void, KernelPrint, const char *format, ...)
|
||||
{
|
||||
__builtin_va_list args;
|
||||
__builtin_va_start(args, format);
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
__KernelPrint(DriverID, (long)format, (long)args);
|
||||
#elif defined(__aarch64__)
|
||||
__KernelPrint(DriverID, (long)format, (long)__builtin_va_arg(args, void *));
|
||||
#endif
|
||||
__builtin_va_end(args);
|
||||
}
|
||||
|
||||
@ -81,7 +85,11 @@ DefineFunction(void, KernelLog, const char *format, ...)
|
||||
{
|
||||
__builtin_va_list args;
|
||||
__builtin_va_start(args, format);
|
||||
#if defined(__amd64__) || defined(__i386__)
|
||||
__KernelLog(DriverID, (long)format, (long)args);
|
||||
#elif defined(__aarch64__)
|
||||
__KernelLog(DriverID, (long)format, (long)__builtin_va_arg(args, void *));
|
||||
#endif
|
||||
__builtin_va_end(args);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user