2011-05-13 04:54:01 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
KMOD= vmm
|
|
|
|
|
2013-08-21 08:01:52 +00:00
|
|
|
SRCS= opt_acpi.h opt_ddb.h device_if.h bus_if.h pci_if.h
|
2011-05-13 04:54:01 +00:00
|
|
|
|
2011-05-14 20:35:01 +00:00
|
|
|
CFLAGS+= -DVMM_KEEP_STATS -DSMP
|
2013-08-21 08:01:52 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/io
|
2011-05-13 04:54:01 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/intel
|
2013-08-23 00:37:26 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../amd64/vmm/amd
|
2011-05-13 04:54:01 +00:00
|
|
|
|
|
|
|
# generic vmm support
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm
|
|
|
|
SRCS+= vmm.c \
|
|
|
|
vmm_dev.c \
|
2012-10-29 01:51:24 +00:00
|
|
|
vmm_host.c \
|
2012-09-25 22:31:35 +00:00
|
|
|
vmm_instruction_emul.c \
|
2014-03-11 16:56:00 +00:00
|
|
|
vmm_ioport.c \
|
2011-05-13 04:54:01 +00:00
|
|
|
vmm_ipi.c \
|
|
|
|
vmm_lapic.c \
|
|
|
|
vmm_mem.c \
|
|
|
|
vmm_msr.c \
|
|
|
|
vmm_stat.c \
|
|
|
|
vmm_util.c \
|
|
|
|
x86.c \
|
|
|
|
vmm_support.S
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/io
|
|
|
|
SRCS+= iommu.c \
|
|
|
|
ppt.c \
|
2014-03-11 16:56:00 +00:00
|
|
|
vatpic.c \
|
2014-03-25 19:20:34 +00:00
|
|
|
vatpit.c \
|
2013-11-25 19:04:51 +00:00
|
|
|
vhpet.c \
|
2013-11-12 22:51:03 +00:00
|
|
|
vioapic.c \
|
2011-05-13 04:54:01 +00:00
|
|
|
vlapic.c
|
|
|
|
|
|
|
|
# intel-specific files
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/intel
|
|
|
|
SRCS+= ept.c \
|
|
|
|
vmcs.c \
|
|
|
|
vmx_msr.c \
|
|
|
|
vmx.c \
|
|
|
|
vtd.c
|
|
|
|
|
|
|
|
# amd-specific files
|
|
|
|
.PATH: ${.CURDIR}/../../amd64/vmm/amd
|
2013-08-23 00:37:26 +00:00
|
|
|
SRCS+= vmcb.c \
|
|
|
|
svm.c \
|
|
|
|
npt.c \
|
|
|
|
amdv.c
|
|
|
|
|
|
|
|
OBJS= vmx_support.o svm_support.o
|
2011-05-13 04:54:01 +00:00
|
|
|
|
2013-08-23 00:37:26 +00:00
|
|
|
CLEANFILES= vmx_assym.s vmx_genassym.o svm_assym.s svm_genassym.o
|
2011-05-13 04:54:01 +00:00
|
|
|
|
|
|
|
vmx_assym.s: vmx_genassym.o
|
|
|
|
.if exists(@)
|
|
|
|
vmx_assym.s: @/kern/genassym.sh
|
|
|
|
.endif
|
|
|
|
sh @/kern/genassym.sh vmx_genassym.o > ${.TARGET}
|
|
|
|
|
2013-08-23 00:37:26 +00:00
|
|
|
svm_assym.s: svm_genassym.o
|
|
|
|
.if exists(@)
|
|
|
|
svm_assym.s: @/kern/genassym.sh
|
|
|
|
.endif
|
|
|
|
sh @/kern/genassym.sh svm_genassym.o > ${.TARGET}
|
|
|
|
|
2011-05-13 04:54:01 +00:00
|
|
|
vmx_support.o: vmx_support.S vmx_assym.s
|
|
|
|
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
|
|
|
|
${.IMPSRC} -o ${.TARGET}
|
|
|
|
|
2013-08-23 00:37:26 +00:00
|
|
|
svm_support.o: svm_support.S svm_assym.s
|
|
|
|
${CC} -c -x assembler-with-cpp -DLOCORE ${CFLAGS} \
|
|
|
|
${.IMPSRC} -o ${.TARGET}
|
|
|
|
|
2011-05-14 20:35:01 +00:00
|
|
|
vmx_genassym.o: vmx_genassym.c @ machine x86
|
2011-05-13 04:54:01 +00:00
|
|
|
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
|
|
|
|
|
2013-08-23 00:37:26 +00:00
|
|
|
svm_genassym.o: svm_genassym.c @ machine x86
|
|
|
|
${CC} -c ${CFLAGS:N-fno-common} ${.IMPSRC}
|
2011-05-13 04:54:01 +00:00
|
|
|
.include <bsd.kmod.mk>
|