Merge pull request #304 from DonBearH/f_stack_aarch64

Support aarch64
This commit is contained in:
logwang 2018-11-08 16:36:48 +08:00 committed by GitHub
commit 14ee1f6131
4 changed files with 37 additions and 5 deletions

View File

@ -64,6 +64,7 @@ get_curthread(void)
}
#define curthread get_curthread()
#undef curthread
#define PCPU_GET(member) (get_pcpu()->pc_ ## member)
#define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value))

View File

@ -23,13 +23,23 @@ FF_KNI=1
#FF_NETGRAPH=1
#FF_IPFW=1
include ${TOPDIR}/mk/kern.pre.mk
ifeq ($(FF_DPDK),)
ifeq (${MACHINE_CPUARCH},aarch64)
FF_DPDK=${TOPDIR}/dpdk/build
else
FF_DPDK=${TOPDIR}/dpdk/x86_64-native-linuxapp-gcc
endif
endif
ifdef RTE_SDK
ifeq (${MACHINE_CPUARCH},aarch64)
FF_DPDK=${RTE_SDK}/build
else
FF_DPDK=${RTE_SDK}/x86_64-native-linuxapp-gcc
endif
endif
DPDK_CFLAGS= -Wall -Werror -include ${FF_DPDK}/include/rte_config.h
DPDK_CFLAGS+= -march=native -DRTE_MACHINE_CPUFLAG_SSE -DRTE_MACHINE_CPUFLAG_SSE2 -DRTE_MACHINE_CPUFLAG_SSE3
@ -37,8 +47,6 @@ DPDK_CFLAGS+= -DRTE_MACHINE_CPUFLAG_SSSE3 -DRTE_MACHINE_CPUFLAG_SSE4_1 -DRTE_MAC
DPDK_CFLAGS+= -DRTE_COMPILE_TIME_CPUFLAGS=RTE_CPUFLAG_SSE,RTE_CPUFLAG_SSE2,RTE_CPUFLAG_SSE3,RTE_CPUFLAG_SSSE3,RTE_CPUFLAG_SSE4_1,RTE_CPUFLAG_SSE4_2
DPDK_CFLAGS+= -I${FF_DPDK}/include
include ${TOPDIR}/mk/kern.pre.mk
KERNPREINCLUDES:= ${INCLUDES}
INCLUDES= -I${OVERRIDE_INCLUDES_ROOT} ${KERNPREINCLUDES}
INCLUDES+= -I./machine_include
@ -92,6 +100,13 @@ endif
endif
#
# fix the MACHINE_CPUARCH to match the FreeBSD directory name
#
ifeq (${MACHINE_CPUARCH},aarch64)
MACHINE_CPUARCH=arm64
endif
#
# Distilled from FreeBSD src/sys/conf/Makefile.i386
@ -262,7 +277,7 @@ KERN_MHEADERS+= \
KERN_MSRCS+= \
linker_if.m
ifeq (${MACHINE_CPUARCH},arm64)
LIBKERN_SRCS+= \
bcd.c \
crc32.c \
@ -270,7 +285,19 @@ LIBKERN_SRCS+= \
jenkins_hash.c \
strlcpy.c \
strnlen.c \
zlib.c
zlib.c \
fls.c \
flsl.c
else
LIBKERN_SRCS+= \
bcd.c \
crc32.c \
inet_ntoa.c \
jenkins_hash.c \
strlcpy.c \
strnlen.c \
zlib.c
endif
MACHINE_SRCS+= \

View File

@ -4,7 +4,7 @@
ifndef COMPILER_TYPE
ifeq ($(patsubst gcc%,gcc,$(notdir ${CC})),gcc)
COMPILER_TYPE:= gcc
COMPILER_TYPE:= gcc
else ifeq ($(notdir ${CC}), clang)
COMPILER_TYPE:= clang
else

View File

@ -101,6 +101,10 @@ CFLAGS+=
INLINE_LIMIT?= 8000
endif
ifeq (${MACHINE_CPUARCH},arm64)
INLINE_LIMIT?= 15000
endif
#
# GCC SSP support
#