6e869e402d
- All three functions are included in the kernel by default. They call a backend function cpu_in_cksum after possibly computing the checksum of the pseudo header. - cpu_in_cksum is the core to implement the one-complement sum. The default implementation is moderate fast on most platforms and provides a 32bit accumulator with 16bit addends for L32 platforms and a 64bit accumulator with 32bit addends for L64 platforms. It handles edge cases like very large mbuf chains (could happen with native IPv6 in the future) and provides a good base for new native implementations. - Modify i386 and amd64 assembly to use the new interface. This disables the MD implementations on !x86 until the conversion is done. For Alpha, the portable version is faster.
155 lines
3.2 KiB
Makefile
155 lines
3.2 KiB
Makefile
# $NetBSD: Makefile.xen,v 1.26 2008/01/25 21:12:13 joerg Exp $
|
|
# NetBSD: Makefile.i386,v 1.132 2003/07/05 16:56:10 simonb Exp
|
|
|
|
# Makefile for NetBSD
|
|
#
|
|
# This makefile is constructed from a machine description:
|
|
# config machineid
|
|
# Most changes should be made in the machine description
|
|
# /sys/arch/xen/conf/``machineid''
|
|
# after which you should do
|
|
# config machineid
|
|
# Machine generic makefile changes should be made in
|
|
# /sys/arch/xen/conf/Makefile.xen
|
|
# after which config should be rerun for all machines of that type.
|
|
#
|
|
# To specify debugging, add the config line: makeoptions DEBUG="-g"
|
|
# A better way is to specify -g only for a few files.
|
|
#
|
|
# makeoptions DEBUGLIST="uvm* trap if_*"
|
|
|
|
.include "$S/arch/xen/conf/Makefile.arch.inc"
|
|
USETOOLS?= no
|
|
NEED_OWN_INSTALL_TARGET?=no
|
|
.include <bsd.own.mk>
|
|
|
|
##
|
|
## (1) port identification
|
|
##
|
|
XEN= $S/arch/xen
|
|
I386= $S/arch/i386
|
|
AMD64= $S/arch/amd64
|
|
GENASSYM_CONF= $S/arch/${XEN_BUILD}/${XEN_BUILD}/genassym.cf
|
|
|
|
ARCH_INC= $S/arch/xen/include/${XEN_BUILD}
|
|
|
|
##
|
|
## (2) compile settings
|
|
##
|
|
DEFCOPTS= -O2
|
|
CPPFLAGS+= -D${XEN_BUILD}
|
|
AFLAGS+= -x assembler-with-cpp -traditional-cpp ${DBG} -D__XEN__
|
|
EXTRA_INCLUDES= -I${.CURDIR}/xen-ma
|
|
|
|
.if ${XEN_BUILD} == "amd64"
|
|
CPPFLAGS+= -Dx86_64
|
|
CFLAGS+= -mcmodel=kernel
|
|
CFLAGS+= -mno-red-zone
|
|
.endif
|
|
|
|
|
|
##
|
|
## (3) libkern and compat
|
|
##
|
|
KERN_AS= obj
|
|
|
|
##
|
|
## (4) local objects, compile rules, and dependencies
|
|
##
|
|
MD_OBJS= locore.o spl.o copy.o vector.o
|
|
MD_CFILES=
|
|
|
|
MD_SFILES= $S/arch/${XEN_BUILD}/${XEN_BUILD}/locore.S \
|
|
$S/arch/${XEN_BUILD}/${XEN_BUILD}/spl.S \
|
|
$S/arch/${XEN_BUILD}/${XEN_BUILD}/vector.S \
|
|
$S/arch/${XEN_BUILD}/${XEN_BUILD}/copy.S
|
|
|
|
copy.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/copy.S assym.h
|
|
${NORMAL_S}
|
|
|
|
locore.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/locore.S assym.h
|
|
${NORMAL_S}
|
|
|
|
spl.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/spl.S assym.h
|
|
${NORMAL_S}
|
|
|
|
vector.o: $S/arch/${XEN_BUILD}/${XEN_BUILD}/vector.S assym.h
|
|
${NORMAL_S}
|
|
.ifndef noBEGIN
|
|
.if !make(obj) && !make(clean) && !make(cleandir)
|
|
.BEGIN:
|
|
.for A in ${XEN_MACHINE_ARCHS}
|
|
rm -f ${A}
|
|
ln -s $S/arch/${A}/include ${A}
|
|
.endfor
|
|
-rm -rf xen-ma
|
|
mkdir xen-ma
|
|
ln -s ../${XEN_BUILD} xen-ma/machine
|
|
rm -f machine
|
|
ln -s ${ARCH_INC} machine
|
|
.endif
|
|
.endif
|
|
|
|
##
|
|
## (5) link settings
|
|
##
|
|
.if ${XEN_BUILD} == i386
|
|
TEXTADDR?= 0xc0100000
|
|
.elif ${XEN_BUILD} == amd64
|
|
TEXTADDR?= 0xffffffff80100000
|
|
.endif
|
|
LINKFLAGS_NORMAL= -X
|
|
.if (${OBJECT_FMT} == "ELF")
|
|
KERN_LDSCRIPT?= kern.ldscript.Xen
|
|
LINKFORMAT= -T $S/arch/${XEN_BUILD}/conf/${KERN_LDSCRIPT}
|
|
.else
|
|
LINKFORMAT= -z
|
|
.endif
|
|
|
|
##
|
|
## (6) port specific target dependencies
|
|
##
|
|
|
|
.if ${XEN_BUILD} == i386
|
|
freebsd_sigcode.o ibcs2_sigcode.o linux_sigcode.o: assym.h
|
|
svr4_sigcode.o mach_sigcode.o: assym.h
|
|
apmcall.o pnpbioscall.o bioscall.o: assym.h
|
|
mptramp.o: assym.h
|
|
.elif ${XEN_BUILD} == amd64
|
|
locore.o machdep.o: Makefile
|
|
linux32_sigcode.o netbsd32_sigcode.o: assym.h
|
|
.endif
|
|
busfunc.o cpu_in_cksum.o cpufunc.o lock_stubs.o: assym.h
|
|
|
|
##
|
|
## (7) misc settings
|
|
##
|
|
|
|
##
|
|
## (8) config(8) generated machinery
|
|
##
|
|
%INCLUDES
|
|
|
|
%OBJS
|
|
|
|
%CFILES
|
|
|
|
%SFILES
|
|
|
|
%LOAD
|
|
|
|
%RULES
|
|
|
|
## Include rules for Atheros WLAN
|
|
.include "$S/contrib/dev/ath/netbsd/Makefile.ath.inc"
|
|
|
|
##
|
|
## (9) port independent kernel machinery
|
|
##
|
|
.include "$S/conf/Makefile.kern.inc"
|
|
|
|
##
|
|
## (10) Appending make options.
|
|
##
|
|
%MAKEOPTIONSAPPEND
|