From: Antti Kantee Date: Tue, 17 May 2016 12:28:59 +0000 (+0000) Subject: Switch to new-style pci hypercall defs X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ff3d5f76d07d44e8eb553e5a5c89fd0bddaeb5dd;p=osstest%2Frumprun.git Switch to new-style pci hypercall defs Fixes issue #38 --- diff --git a/build-rr.sh b/build-rr.sh index 549b099..30054ca 100755 --- a/build-rr.sh +++ b/build-rr.sh @@ -439,9 +439,12 @@ buildpci () { if eval ${PLATFORM_PCI_P}; then - ${RUMPMAKE} -f ${PLATFORMDIR}/pci/Makefile.pci ${STDJ} obj - ${RUMPMAKE} -f ${PLATFORMDIR}/pci/Makefile.pci ${STDJ} dependall - ${RUMPMAKE} -f ${PLATFORMDIR}/pci/Makefile.pci ${STDJ} install + ( + cd ${PLATFORMDIR}/pci + ${RUMPMAKE} ${STDJ} obj + ${RUMPMAKE} ${STDJ} dependall + ${RUMPMAKE} ${STDJ} install + ) fi } diff --git a/lib/Makefile.pcicommon b/lib/Makefile.pcicommon deleted file mode 100644 index 4ba0222..0000000 --- a/lib/Makefile.pcicommon +++ /dev/null @@ -1,30 +0,0 @@ -# Used via $platform/Makefile.pci -# (i.e. not really a lib. but can't think of a better place -# where to stuff this file) - -RUMPTOP= ${TOPRUMP} -MYDIR:= ${.PARSEDIR} - -RUMPCOMP_USER_SRCS.rumpdev_pci= ${PCI_HYPERCALLS} -RUMPCOMP_USER_PATH.rumpdev_pci= ${PCI_HYPERCALLS_PATH} -RUMPCOMP_USER_CPPFLAGS.rumpdev_pci= ${PCI_CPPFLAGS} -RUMPCOMP_USER_CPPFLAGS.rumpdev_pci+= -I${MYDIR}/../include -RUMPCOMP_USER_CPPFLAGS.rumpdev_pci+= -I${RROBJ}/include -RUMPCOMP_USER_CPPFLAGS.rumpdev_pci+= -I${PCI_HYPERCALLS_PATH} -RUMPCOMP_USER_CFLAGS.rumpdev_pci= ${BUILDRUMP_TOOL_CFLAGS} - -RUMPCOMP_CPPFLAGS.rumpdev_pci= -I${PCI_HYPERCALLS_PATH} - -.export RUMPCOMP_USER_SRCS.rumpdev_pci -.export RUMPCOMP_USER_PATH.rumpdev_pci -.export RUMPCOMP_USER_CFLAGS.rumpdev_pci -.export RUMPCOMP_USER_CPPFLAGS.rumpdev_pci -.export RUMPCOMP_CPPFLAGS.rumpdev_pci - -.include "${RUMPTOP}/dev/Makefile.rumpdevcomp" - -.for pcidev in ${RUMPPCIDEVS} -SUBDIR+= ${RUMPTOP}/dev/lib/lib${pcidev} -.endfor - -.include diff --git a/platform/hw/pci/Makefile b/platform/hw/pci/Makefile new file mode 100644 index 0000000..08114d9 --- /dev/null +++ b/platform/hw/pci/Makefile @@ -0,0 +1,21 @@ +RUMPTOP= ${TOPRUMP} + +.include "${RUMPRUN_MKCONF}" +.include "${BUILDRUMP_TOOLFLAGS}" + +RUMPCOMP_MAKEFILEINC_rumpdev_pci:= ${.PARSEDIR}/Makefile.pcihyperdefs +.export RUMPCOMP_MAKEFILEINC_rumpdev_pci + +RUMPRUN_OBJDIR=${RROBJ} +RUMPRUN_TOOL_CFLAGS=${BUILDRUMP_TOOL_CFLAGS} + +.export RUMPRUN_OBJDIR +.export RUMPRUN_TOOL_CFLAGS + +.include "${RUMPTOP}/dev/Makefile.rumpdevcomp" + +.for pcidev in ${RUMPPCIDEVS} +SUBDIR+= ${RUMPTOP}/dev/lib/lib${pcidev} +.endfor + +.include diff --git a/platform/hw/pci/Makefile.pci b/platform/hw/pci/Makefile.pci deleted file mode 100644 index 59ac4b9..0000000 --- a/platform/hw/pci/Makefile.pci +++ /dev/null @@ -1,10 +0,0 @@ -PCIDIR:= ${.PARSEDIR} - -.include "${RUMPRUN_MKCONF}" -.include "${BUILDRUMP_TOOLFLAGS}" - -PCI_HYPERCALLS= rumppci.c rumpdma.c -PCI_HYPERCALLS_PATH:= ${PCIDIR} -PCI_CPPFLAGS:= -I${PCIDIR}/../include - -.include "${PCIDIR}/../../../lib/Makefile.pcicommon" diff --git a/platform/hw/pci/Makefile.pcihyperdefs b/platform/hw/pci/Makefile.pcihyperdefs new file mode 100644 index 0000000..9834e45 --- /dev/null +++ b/platform/hw/pci/Makefile.pcihyperdefs @@ -0,0 +1,17 @@ +# make defs for hypercalls for PCI component + +RUMPRUN_PCIDIR:= ${.PARSEDIR} +.PATH: ${RUMPRUN_PCIDIR} + +.ifndef RUMPRUN_OBJDIR +.error ${.PARSEDIR} invoked improperly +.endif + +RUMPCOMP_USER_SRCS= rumppci.c rumpdma.c +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR} +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR}/../include +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR}/../../../include +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_OBJDIR}/include +RUMPCOMP_USER_CFLAGS+= ${RUMPRUN_TOOL_CFLAGS} + +CPPFLAGS+= -I${RUMPRUN_PCIDIR} diff --git a/platform/xen/pci/Makefile b/platform/xen/pci/Makefile new file mode 100644 index 0000000..08114d9 --- /dev/null +++ b/platform/xen/pci/Makefile @@ -0,0 +1,21 @@ +RUMPTOP= ${TOPRUMP} + +.include "${RUMPRUN_MKCONF}" +.include "${BUILDRUMP_TOOLFLAGS}" + +RUMPCOMP_MAKEFILEINC_rumpdev_pci:= ${.PARSEDIR}/Makefile.pcihyperdefs +.export RUMPCOMP_MAKEFILEINC_rumpdev_pci + +RUMPRUN_OBJDIR=${RROBJ} +RUMPRUN_TOOL_CFLAGS=${BUILDRUMP_TOOL_CFLAGS} + +.export RUMPRUN_OBJDIR +.export RUMPRUN_TOOL_CFLAGS + +.include "${RUMPTOP}/dev/Makefile.rumpdevcomp" + +.for pcidev in ${RUMPPCIDEVS} +SUBDIR+= ${RUMPTOP}/dev/lib/lib${pcidev} +.endfor + +.include diff --git a/platform/xen/pci/Makefile.pci b/platform/xen/pci/Makefile.pci deleted file mode 100644 index 7c0748d..0000000 --- a/platform/xen/pci/Makefile.pci +++ /dev/null @@ -1,10 +0,0 @@ -PCIDIR:= ${.PARSEDIR} - -.include "${RUMPRUN_MKCONF}" -.include "${BUILDRUMP_TOOLFLAGS}" - -PCI_HYPERCALLS= rumphyper_pci.c rumphyper_dma.c -PCI_HYPERCALLS_PATH:= ${PCIDIR} -PCI_CPPFLAGS:= -I${PCIDIR}/../xen/include - -.include "${PCIDIR}/../../../lib/Makefile.pcicommon" diff --git a/platform/xen/pci/Makefile.pcihyperdefs b/platform/xen/pci/Makefile.pcihyperdefs new file mode 100644 index 0000000..dfa5a75 --- /dev/null +++ b/platform/xen/pci/Makefile.pcihyperdefs @@ -0,0 +1,17 @@ +# make defs for hypercalls for PCI component + +RUMPRUN_PCIDIR:= ${.PARSEDIR} +.PATH: ${RUMPRUN_PCIDIR} + +.ifndef RUMPRUN_OBJDIR +.error ${.PARSEDIR} invoked improperly +.endif + +RUMPCOMP_USER_SRCS= rumphyper_pci.c rumphyper_dma.c +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR}/../xen/include +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR} +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_PCIDIR}/../../../include +RUMPCOMP_USER_CPPFLAGS+=-I${RUMPRUN_OBJDIR}/include +RUMPCOMP_USER_CFLAGS+= ${RUMPRUN_TOOL_CFLAGS} + +CPPFLAGS+= -I${RUMPRUN_PCIDIR}