add arm64 support

- add arm64 dependent codes with GICv3 and SVE support
- fix bugs based on architecture separation requests
This commit is contained in:
Takayuki Okamoto
2017-09-05 15:06:27 +09:00
parent 704096b139
commit 9989f41fd3
192 changed files with 26941 additions and 34 deletions

View File

@ -1,3 +1,4 @@
# configure.ac COPYRIGHT FUJITSU LIMITED 2015-2016
AC_PREREQ(2.63)
m4_define([IHK_VERSION_m4],[0.9.0])dnl
m4_define([MCKERNEL_VERSION_m4],[0.9.0])dnl
@ -169,8 +170,21 @@ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
AC_DEFINE_UNQUOTED(ROOTFSDIR,"$prefix/rootfs",[Path of bind-mount source directory])
case $WITH_TARGET in
attached-mic|builtin-x86|smp-x86)
ARCH=`uname -m`
# POSTK_DEBUG_ARCH_DEP_30, Expansion of the branch.
# attached-mic|builtin-x86|smp-x86)
# ARCH=`uname -m`
# AC_PROG_CC
# XCC=$CC
# ;;
attached-mic|builtin-x86|smp-*)
case $WITH_TARGET in
attached-mic|builtin-x86|smp-x86)
ARCH=`uname -m`
;;
smp-arm64)
ARCH=arm64
;;
esac
AC_PROG_CC
XCC=$CC
CFLAGS="$CFLAGS -ffreestanding -fno-tree-loop-distribute-patterns"
@ -183,6 +197,14 @@ case $WITH_TARGET in
[no])
CC=$XCC
;;
smp-arm64)
ARCH=arm64
AC_CHECK_PROG(XCC,
[${CROSS_COMPILE}gcc],
[${CROSS_COMPILE}gcc],
[no])
CC=$XCC
;;
*)
AC_MSG_ERROR([target $WITH_TARGET is unknwon])
;;
@ -233,6 +255,9 @@ case $WITH_TARGET in
if test "X$SBINDIR" = X; then
SBINDIR="$prefix/sbin"
fi
if test "X$ETCDIR" = X; then
ETCDIR="$prefix/etc"
fi
if test "X$KMODDIR" = X; then
KMODDIR="$prefix/kmod"
fi
@ -259,9 +284,6 @@ case $WITH_TARGET in
if test "X$INCDIR" = X; then
INCDIR="$prefix/include"
fi
if test "X$ETCDIR" = X; then
ETCDIR="$prefix/etc"
fi
if test "X$KMODDIR" = X; then
KMODDIR="$prefix/kmod"
fi
@ -269,6 +291,32 @@ case $WITH_TARGET in
MANDIR="$prefix/smp-x86/man"
fi
;;
smp-arm64)
if test "X$KERNDIR" = X; then
KERNDIR="$prefix/smp-arm64/kernel"
fi
if test "X$BINDIR" = X; then
BINDIR="$prefix/bin"
fi
if test "X$SBINDIR" = X; then
SBINDIR="$prefix/sbin"
fi
if test "X$MCKERNEL_INCDIR" = X; then
MCKERNEL_INCDIR="$prefix/include"
fi
if test "X$MCKERNEL_LIBDIR" = X; then
MCKERNEL_LIBDIR="$prefix/lib"
fi
if test "X$INCDIR" = X; then
INCDIR="$prefix/include"
fi
if test "X$KMODDIR" = X; then
KMODDIR="$prefix/kmod"
fi
if test "X$MANDIR" = X; then
MANDIR="$prefix/smp-arm64/man"
fi
;;
*)
AC_MSG_ERROR([target $WITH_TARGET is unknwon])
;;
@ -344,6 +392,8 @@ MCCTRL_FIND_KSYM([vdso_end])
MCCTRL_FIND_KSYM([vdso_pages])
MCCTRL_FIND_KSYM([__vvar_page])
MCCTRL_FIND_KSYM([hpet_address])
# POSTK_DEBUG_ARCH_DEP_50, add:find kernel symbol.
MCCTRL_FIND_KSYM([vdso_spec])
MCCTRL_FIND_KSYM([hv_clock])
MCCTRL_FIND_KSYM([sys_readlink])
MCCTRL_FIND_KSYM([walk_page_range])
@ -352,7 +402,9 @@ case $ENABLE_MEMDUMP in
yes|no|auto)
;;
default)
if test "x$WITH_TARGET" = "xsmp-x86" ; then
# POSTK_DEBUG_ARCH_DEP_30, Expansion of the branch.
# if test "x$WITH_TARGET" = "xsmp-x86" ; then
if test "x$WITH_TARGET" = "xsmp-*" ; then
ENABLE_MEMDUMP=auto
else
ENABLE_MEMDUMP=no
@ -365,6 +417,8 @@ esac
if test "x$ENABLE_MEMDUMP" != "xno" ; then
enableval=yes
# POSTK_DEBUG_ARCH_DEP_32, AC_CHECK_LIB for libiberty
AC_CHECK_LIB([iberty],[hex_init],[],[enableval=no])
AC_CHECK_LIB([bfd],[bfd_init],[],[enableval=no])
AC_CHECK_HEADER([bfd.h],[],[enableval=no])
@ -455,12 +509,29 @@ AC_SUBST(DCFA_RESEASE_DATE)
AC_SUBST(uncomment_if_ENABLE_MEMDUMP)
AC_CONFIG_HEADERS([config.h])
# POSTK_DEBUG_ARCH_DEP_37
#AC_CONFIG_FILES([
# Makefile
# executer/user/Makefile
# executer/kernel/mcctrl/Makefile
# executer/kernel/mcctrl/arch/x86_64/Makefile
# executer/kernel/mcoverlayfs/Makefile
# kernel/Makefile
# kernel/Makefile.build
# arch/x86/tools/mcreboot-attached-mic.sh
# arch/x86/tools/mcshutdown-attached-mic.sh
# arch/x86/tools/mcreboot-builtin-x86.sh
# arch/x86/tools/mcreboot-smp-x86.sh
# arch/x86/tools/mcstop+release-smp-x86.sh
# arch/x86/tools/mcshutdown-builtin-x86.sh
# arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in
#])
AC_CONFIG_FILES([
Makefile
executer/user/Makefile
executer/user/arch/x86_64/Makefile
executer/user/arch/$ARCH/Makefile
executer/kernel/mcctrl/Makefile
executer/kernel/mcctrl/arch/x86_64/Makefile
executer/kernel/mcctrl/arch/$ARCH/Makefile
executer/kernel/mcoverlayfs/Makefile
executer/kernel/mcoverlayfs/linux-3.10.0-327.36.1.el7/Makefile
executer/kernel/mcoverlayfs/linux-4.0.9/Makefile
@ -479,6 +550,8 @@ AC_CONFIG_FILES([
arch/x86/tools/mcreboot.1:arch/x86/tools/mcreboot.1in
arch/x86/tools/irqbalance_mck.service
arch/x86/tools/irqbalance_mck.in
kernel/config/config.smp-arm64
arch/arm64/kernel/vdso/Makefile
])
AS_IF([test "x$enable_dcfa" = xyes], [