# 4.4BSD secmodel. selection is hardcoded for now
SRCS+= secmodel.c
SRCS+= secmodel_suser.c
SRCS+= secmodel_extensions.c
SRCS+= secmodel_extensions_rump.c # stubs
# sys/dev
SRCS+= clock_subr.c
# sys/crypto
# Note: these are here only for cprng. More crypto algos for drivers
# are available from the rumpkern_crypto component
SRCS+= nist_hash_drbg.c
SRCS+= cprng_fast.c
SRCS+= chacha_impl.c
SRCS+= chacha_ref.c
SRCS+= chacha_selftest.c
# BLAKE2
# for hash_address
SRCS+= blake2s.c
include "${RUMPTOP}/Makefile.rump"
include <bsd.own.mk>
#
# If archdir exists, it is required to provide:
# 1) kobj_reloc() and kobj_machdep()
# 2) rump_cpu_bootstrap()
# 3) ...?
# 4) PROFIT!
#
#
# Check if we are building compat. In compat mode we need to provide
# the kernel of our compat target (amd64->i386 & sparc64->sparc), so
# take MD stuff from the right arch.
#
if defined(COMPAT_MACHINE_CPU) \
&& exists(${RUMPTOP}/librump/rumpkern/arch/${COMPAT_MACHINE_CPU})
ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${COMPAT_MACHINE_CPU}
LIBKERN_ARCH= ${COMPAT_MACHINE_CPU}
elif defined(MLIBDIR)
ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MLIBDIR}
LIBKERN_ARCH= ${MLIBDIR}
elif exists(${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU})
ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_CPU}
else
ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/${MACHINE_ARCH}
endif
if !exists(${ARCHDIR})
ARCHDIR= ${RUMPTOP}/librump/rumpkern/arch/generic
endif
include "${ARCHDIR}/Makefile.inc"
PATH: ${ARCHDIR}
if ${MACHINE} == "sun3"
CPPFLAGS+= -Dsun3
endif
# include libkern source files
KERNDIR=${RUMPTOP}/../lib/libkern
if "${_RUMP_NATIVEABI}" == "yes"
KERNMISCCPPFLAGS+= -D_RUMPKERNEL
endif
include "${RUMPTOP}/../lib/libkern/Makefile.libkern"
# Some architectures require a little special massage with atomic
# compare-and-swap. This is because the kernel version is using
# instructions or routines unavailable to us in userspace.
#
if (${MACHINE_CPU} == "arm" && "${FEAT_LDREX}" != "yes") \
|| ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "hppa" \
|| ${MACHINE_CPU} == "mips" || ${MACHINE_CPU} == "sh3" \
|| ${MACHINE_ARCH} == "vax" || ${MACHINE_ARCH} == "m68000"
CPPFLAGS+= -I${RUMPTOP}/../../common/lib/libc/atomic
SRCS+= atomic_cas_generic.c
#SRCS+= rump_atomic_cas_up.c
endif