BHyVeビルドめも11

( ..)φカキカキ
iommu.cのコンパイルエラーの修正はインクルードするファイルの変更で済みましたヽ(・∀・ )ノ キャッ キャッ

diffはこれだけでpci関連のヘッダファイルは昨日調べたから割と簡単に済んだのですが。

--- a/sys/platform/pc64/vmm/io/iommu.c
+++ b/sys/platform/pc64/vmm/io/iommu.c
@@ -35,12 +35,12 @@
 #include <sys/bus.h>
 #include <sys/cdefs.h>

-#include <dev/pci/pcivar.h>
-#include <dev/pci/pcireg.h>
+#include <bus/pci/pcivar.h>
+#include <bus/pci/pcireg.h>

 #include <machine/md_var.h>

-#include "vmm_util.h"
+#include "../vmm_util.h"
 #include "iommu.h"

 static boolean_t iommu_avail;

fbsdとdbsdはちょっとだけパスが違うんですよね。fbsdはdev/以下だけどdbsdはbus/以下という感じで。あとは、iommu.cでは無かったけどmachine/pci_cfgreg.hはbus/pci/x86_64/pci_cfgreg.hという感じでfbsdはmachine/にして機種依存部分を抽象化させてるところがdbsdだとされてないというのがありました。これは昨日のvtd.cですが。

そして、次はppt.cですね。これはヘッダの修正の他にも色々ありそうですね~

--------------------------------------------------------------
>>> Kernel build for BHYVE started on Sat Jul  7 17:42:21 JST 2012
--------------------------------------------------------------
===> BHYVE
cd /usr/src/sys/config;  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin  config  -d /usr/obj/usr/src/sys/BHYVE  /usr/src/sys/config/BHYVE
Kernel build directory is /usr/obj/usr/src/sys/BHYVE
cd /usr/obj/usr/src/sys/BHYVE;  MAKEOBJDIRPREFIX=/usr/obj/usr/src/world_x86_64  OBJTREE=/usr/obj  MACHINE_ARCH=x86_64  MACHINE=x86_64  MACHINE_PLATFORM=pc64  OBJFORMAT_PATH=/usr/obj/usr/src/ctools_x86_64_x86_64  HOST_CCVER=gcc44  CCVER=gcc44  BINUTILSVER=binutils221  DESTDIR=/usr/obj/usr/src/world_x86_64  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/ctools_x86_64_x86_64/usr/sbin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/bin:/usr/obj/usr/src/ctools_x86_64_x86_64/usr/games:/usr/obj/usr/src/btools_x86_64/usr/sbin:/usr/obj/usr/src/btools_x86_64/usr/bin:/usr/obj/usr/src/btools_x86_64/bin:/usr/obj/usr/src/btools_x86_64/usr/games:/usr/pkg/bin make KERNEL=kernel all
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wold-style-definition -std=c99 -Wold-style-declaration -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/BHYVE -I"/usr/src/sys/dev/acpica5" -I"/usr/src/sys/contrib/dev/acpica-unix/include" -I/usr/src/sys/dev/netif/ath/hal -I/usr/src/sys/dev/netif/ath/hal/ath_hal  -D_KERNEL -include opt_global.h  -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -ffreestanding -mpreferred-stack-boundary=4 -fno-stack-protector -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a  -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt -msoft-float -fno-asynchronous-unwind-tables -fno-omit-frame-pointer  /usr/src/sys/platform/pc64/vmm/io/ppt.c -Werror
/usr/src/sys/platform/pc64/vmm/io/ppt.c:40:21: error: sys/smp.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:42:28: error: dev/pci/pcivar.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:43:28: error: dev/pci/pcireg.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:45:30: error: machine/resource.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:50:23: error: vmm_lapic.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:51:21: error: vmm_ktr.h: No such file or directory
/usr/src/sys/platform/pc64/vmm/io/ppt.c:71: error: 'PCIR_MAX_BAR_0' undeclared here (not in a function)
cc1: warnings being treated as errors
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_probe':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:104: error: implicit declaration of function 'pci_get_bus'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:104: error: nested extern declaration of 'pci_get_bus'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:105: error: implicit declaration of function 'pci_get_slot'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:105: error: nested extern declaration of 'pci_get_slot'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:106: error: implicit declaration of function 'pci_get_function'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:106: error: nested extern declaration of 'pci_get_function'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:114: error: dereferencing pointer to incomplete type
/usr/src/sys/platform/pc64/vmm/io/ppt.c:114: error: 'PCIM_HDRTYPE' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:114: error: (Each undeclared identifier is reported only once
/usr/src/sys/platform/pc64/vmm/io/ppt.c:114: error: for each function it appears in.)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:114: error: 'PCIM_HDRTYPE_NORMAL' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_attach':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:126: error: implicit declaration of function 'printf'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:126: error: nested extern declaration of 'printf'
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_teardown_msi':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:221: error: implicit declaration of function 'pci_release_msi'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:221: error: nested extern declaration of 'pci_release_msi'
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_teardown_msix':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:266: error: implicit declaration of function 'free'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:266: error: nested extern declaration of 'free'
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'pptintr':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:381: error: implicit declaration of function 'lapic_set_intr'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:381: error: nested extern declaration of 'lapic_set_intr'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:394: error: 'FILTER_STRAY' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:396: error: 'FILTER_HANDLED' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_setup_msi':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:450: error: implicit declaration of function 'pci_msi_count'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:450: error: nested extern declaration of 'pci_msi_count'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:471: error: implicit declaration of function 'pci_alloc_msi'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:471: error: nested extern declaration of 'pci_alloc_msi'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:503: error: 'INTR_TYPE_NET' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:505: error: passing argument 4 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'void (*)(void *)' but argument is of type 'int (*)(void *)'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:505: error: passing argument 6 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'void **' but argument is of type 'struct pptintr_arg *'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:505: error: passing argument 7 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'lwkt_serialize_t' but argument is of type 'void **'
/usr/src/sys/platform/pc64/vmm/io/ppt.c: In function 'ppt_setup_msix':
/usr/src/sys/platform/pc64/vmm/io/ppt.c:548: error: dereferencing pointer to incomplete type
/usr/src/sys/platform/pc64/vmm/io/ppt.c:556: error: implicit declaration of function 'pci_msix_count'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:556: error: nested extern declaration of 'pci_msix_count'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:558: error: implicit declaration of function 'pci_alloc_msix'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:558: error: nested extern declaration of 'pci_alloc_msix'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:574: error: implicit declaration of function 'malloc'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:574: error: nested extern declaration of 'malloc'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:574: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/io/ppt.c:575: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/io/ppt.c:576: error: assignment makes pointer from integer without a cast
/usr/src/sys/platform/pc64/vmm/io/ppt.c:587: error: 'PCIM_MSIX_VCTRL_MASK' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:605: error: 'INTR_TYPE_NET' undeclared (first use in this function)
/usr/src/sys/platform/pc64/vmm/io/ppt.c:607: error: passing argument 4 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'void (*)(void *)' but argument is of type 'int (*)(void *)'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:607: error: passing argument 6 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'void **' but argument is of type 'struct pptintr_arg *'
/usr/src/sys/platform/pc64/vmm/io/ppt.c:607: error: passing argument 7 of 'bus_setup_intr' from incompatible pointer type
/usr/src/sys/sys/bus.h:322: note: expected 'lwkt_serialize_t' but argument is of type 'void **'
*** Error code 1

Stop in /usr/obj/usr/src/sys/BHYVE.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.