はじめに
この記事は、Japan NetBSD Users' Group BoF 2018で発表した内容を整理し直したものです。
NetBSDでBitVisorをビルドしてみる話と言う
記事があって、ここでは、NetBSD上でBitVisorのUEFIブートローダーはビルドできなかったという結果が掲載されている。
最近は、UEFIブートローダーも含め、一式をちゃんとNetBSD上でビルドできるようになっているので、このことについて書いておく。
また、私は、BitViorをUEFIな環境で既に構築されているNetBSDを起動させるために使用するので、NetBSD/amd64l-current (8.99.24)以外でのビルドは試していない。
準備
最初に述べたように、NetBSD/amd64 8.99.24でビルドするので、x86_64用のCコンパイラーはGCC 6.4.0が既に用意されている。
これにより、UEFIブートローダー以外のものはビルドができる。
UEFIブートローダーは、mingw-w64によるx86_64用のクロスコンパイラーが必要となる。
まずはこのクロスコンパイラーをpkgsrcからインストールする。以下のように実行すれば良い。
$ cd /usr/pkgsrc/cross/mingw-w64-x86_64-gcc
$ make install
ここで、
mingw-w64-x86_64-gcc-bootstrap
というパッケージもインストールされるが、
これは
mingw-w64-x86_64-gcc
をビルドするために一時的に必要になるパッケージなので、
mingw-w64-x86_64-gcc
が正常にインストールされたら、
make deinstall
してかまわない。
GNU makeも必要なので、
pkgsrc/devel/gmake
をインストールしておくことになるが、
このパッケージをインストールしていない人はいないだろう。
ビルドする
以下のように実行することで、bitvisor.elf
とbitvisor/boot/uefi-loader/loadvmm.dll
、
bitvisor/boot/uefi-loader/loadvmm.efi
を生成できる。
$ cd ~/
$ hg clone ssh://hg@bitbucket.org/bitvisor/bitvisor
$ cd ~/bitvisor
$ gmake
$ PATH=/usr/pkg/cross/x86_64-w64-mingw32/bin:$PATH gmake -C boot/uefi-loader
次に、USBスティックを用意し、ここにEFIパーティションを作成して、BitVisorをインストールしていく。
NetBSD/amd64の稼動しているマシンにUSBスティックを差し込み、sd0
として認識された場合を記載する。
また、このマシンには、GPTなパーティションは存在しないものとする。
存在する場合には、/dev/dk0
の数字0
が変わる。
# gpt destroy sd0
# gpt create sd0
# gpt add -t efi sd0
# newfs_msdos /dev/rdk0
# mount_msdos /dev/dk0 /mnt
# mkdir -p /mnt/EFI/boot
# cp ~ryoon/bitvisor/bitvisor.elf /mnt/EFI/boot
# cp ~ryoon/bitvisor/boot/uefi-loader/loadmem.efi /mnt/EFI/boot/bootx64.efi
# umount /mnt
次に、このUSBスティックから起動させる。一時的にブートオーダー外のUSBスティックから起動するように操作する。
USBスティックをブートオーダーの最上位にすると、BitVisorがBitVisorを起動させようとしてエラーになるので、注意が必要である。
以下にHP Spectre x360 ae019TUで動かしているBitVisor上でのNetBSD/amd64 8.99.24のdmesgを示す。BitVisor上でなく起動させた場合とのdmesgの違いはないようだ。
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017,
2018 The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 8.99.24 (DTRACE7) #0: Thu Aug 30 18:01:22 JST 2018
ryoon@brownie:/usr/world/8.99/amd64/obj/sys/arch/amd64/compile/DTRACE7
total memory = 16132 MB
avail memory = 15608 MB
cpu_rng: RDSEED
timecounter: Timecounters tick every 10.000 msec
Kernelized RAIDframe activated
running cgd selftest aes-xts-256 aes-xts-512 done
[ 436.000000] uvideo* disabled
[ 436.000000] uvideo* already disabled
timecounter: Timecounter "i8254" frequency 1193182 Hz quality 100
efi: systbl at pa 3af15018
HP HP Spectre x360 Convertible 13-ae0xx ( )
mainbus0 (root)
ACPI: RSDP 0x000000003A360000 000024 (v02 HPQOEM)
ACPI: XSDT 0x000000003A3600C0 0000FC (v01 HPQOEM SLIC-MPC 01072009 HP 00010013)
ACPI: FACP 0x000000003A39AC60 000114 (v06 HPQOEM SLIC-MPC 01072009 HP 00010013)
ACPI: DSDT 0x000000003A360248 03AA13 (v02 HPQOEM 83B9 01072009 ACPI 20160422)
ACPI: FACS 0x000000003A7EAF00 000040
ACPI: APIC 0x000000003A39AD78 0000BC (v03 HPQOEM 83B9 01072009 HP 00010013)
ACPI: FPDT 0x000000003A39AE38 000044 (v01 HPQOEM 83B9 01072009 HP 00010013)
ACPI: FIDT 0x000000003A39AE80 00009C (v01 HPQOEM 83B9 01072009 HP 00010013)
ACPI: MCFG 0x000000003A39AF20 00003C (v01 HPQOEM 83B9 01072009 HP 00000097)
ACPI: SSDT 0x000000003A39AF60 0003A3 (v01 HPQOEM 83B9 00001000 ACPI 20160422)
ACPI: SSDT 0x000000003A39B308 005D97 (v02 HPQOEM 83B9 00001000 ACPI 20160422)
ACPI: MSDM 0x000000003A3A10A0 000055 (v03 HPQOEM SLIC-MPC 00000001 HP 00010013)
ACPI: SSDT 0x000000003A3A10F8 003156 (v02 HPQOEM 83B9 00003000 ACPI 20160422)
ACPI: HPET 0x000000003A3A4250 000038 (v01 HPQOEM 83B9 00000001 HP 0000005F)
ACPI: SSDT 0x000000003A3A4288 000024 (v02 HPQOEM 83B9 00000000 ACPI 20160422)
ACPI: UEFI 0x000000003A3A42B0 000042 (v01 HPQOEM 83B9 00000002 HP 01000013)
ACPI: SSDT 0x000000003A3A42F8 0017AE (v02 HPQOEM 83B9 00003000 ACPI 20160422)
ACPI: LPIT 0x000000003A3A5AA8 000094 (v01 HPQOEM 83B9 00000000 HP 0000005F)
ACPI: SSDT 0x000000003A3A5B40 000141 (v02 HPQOEM 83B9 00000000 ACPI 20160422)
ACPI: SSDT 0x000000003A3A5C88 00029F (v02 HPQOEM 83B9 00000000 ACPI 20160422)
ACPI: SSDT 0x000000003A3A5F28 0011E7 (v02 HPQOEM 83B9 00001000 ACPI 20160422)
ACPI: SSDT 0x000000003A3A7110 00023D (v02 HPQOEM 83B9 00000000 ACPI 20160422)
ACPI: DBGP 0x000000003A3A7350 000034 (v01 HPQOEM 83B9 00000002 HP 0000005F)
ACPI: DBG2 0x000000003A3A7388 000054 (v00 HPQOEM 83B9 00000002 HP 0000005F)
ACPI: DMAR 0x000000003A3A73E0 000114 (v01 HPQOEM 83B9 00000001 HP 00000001)
ACPI: NHLT 0x000000003A3A74F8 00002D (v00 HPQOEM 83B9 00000002 HP 01000013)
ACPI: SSDT 0x000000003A3A7528 000066 (v01 HPQOEM 83B9 00000001 ACPI 20160422)
ACPI: TPM2 0x000000003A3A7590 000034 (v03 HPQOEM 83B9 00000001 HP 00000000)
ACPI: ASF! 0x000000003A3A75C8 0000A0 (v32 HPQOEM 83B9 00000001 HP 000F4240)
ACPI: BGRT 0x000000003A3A7668 000038 (v01 HPQOEM 83B9 01072009 HP 00010013)
ACPI: WSMT 0x000000003A3A76A0 000028 (v01 HPQOEM 83B9 01072009 HP 00010013)
ACPI: 11 ACPI AML tables successfully acquired and loaded
ioapic0 at mainbus0 apid 2: pa 0xfec00000, version 0x20, 120 pins
x2APIC available but disabled by DMAR table
cpu0 at mainbus0 apid 0
cpu0: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu0: package 0, core 0, smt 0
cpu1 at mainbus0 apid 2
cpu1: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu1: package 0, core 1, smt 0
cpu2 at mainbus0 apid 4
cpu2: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu2: package 0, core 2, smt 0
cpu3 at mainbus0 apid 6
cpu3: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu3: package 0, core 3, smt 0
cpu4 at mainbus0 apid 1
cpu4: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu4: package 0, core 0, smt 1
cpu5 at mainbus0 apid 3
cpu5: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu5: package 0, core 1, smt 1
cpu6 at mainbus0 apid 5
cpu6: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu6: package 0, core 2, smt 1
cpu7 at mainbus0 apid 7
cpu7: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz, id 0x806ea
cpu7: package 0, core 3, smt 1
acpi0 at mainbus0: Intel ACPICA 20180810
acpi0: X/RSDT: OemId , AslId
acpi0: MCFG: segment 0, bus 0-255, address 0x00000000e0000000
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFBED67849808 0003FF (v02 PmRef Cpu0Cst 00003001 INTL 20160422)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFBED67849008 0005CD (v02 PmRef Cpu0Ist 00003000 INTL 20160422)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFBED678E2008 000D14 (v02 PmRef ApIst 00003000 INTL 20160422)
ACPI: Dynamic OEM Table Load:
ACPI: SSDT 0xFFFFFBF1037D8408 00030A (v02 PmRef ApCst 00003000 INTL 20160422)
acpi0: SCI interrupting at int 9
acpi0: fixed power button present
timecounter: Timecounter "ACPI-Fast" frequency 3579545 Hz quality 1000
hpet0 at acpi0: high precision event timer (mem 0xfed00000-0xfed00400)
timecounter: Timecounter "hpet0" frequency 24000000 Hz quality 2000
acpiec0 at acpi0 (EC0, PNP0C09-1): io 0x62,0x66
acpivga0 at acpi0 (GFX0): ACPI Display Adapter
acpiout0 at acpivga0 (DD01, 0x0100): ACPI Display Output Device
acpiout1 at acpivga0 (DD02, 0x0002): ACPI Display Output Device
acpiout2 at acpivga0 (DD03, 0x0300): ACPI Display Output Device
acpiout3 at acpivga0 (DD04, 0x0301): ACPI Display Output Device
acpiout4 at acpivga0 (DD05, 0x0302): ACPI Display Output Device
acpiout5 at acpivga0 (DD06, 0x0303): ACPI Display Output Device
acpiout6 at acpivga0 (DD07, 0x0304): ACPI Display Output Device
acpiout7 at acpivga0 (DD08, 0x0305): ACPI Display Output Device
acpiout8 at acpivga0 (DD09, 0x0009): ACPI Display Output Device
acpiout9 at acpivga0 (DD0A, 0x000a): ACPI Display Output Device
acpiout10 at acpivga0 (DD0B, 0x000b): ACPI Display Output Device
acpiout11 at acpivga0 (DD0C, 0x000c): ACPI Display Output Device
acpiout12 at acpivga0 (DD0D, 0x000d): ACPI Display Output Device
acpiout13 at acpivga0 (DD0E, 0x000e): ACPI Display Output Device
acpiout14 at acpivga0 (DD0F, 0x000f): ACPI Display Output Device
acpiout15 at acpivga0 (DD1F, 0x0400): ACPI Display Output Device
acpiout15: brightness levels: [0-100]
acpiout16 at acpivga0 (SKC0, 0xca00): ACPI Display Output Device
acpivga0: autoconfiguration error: unknown output device acpiout0
acpivga0: autoconfiguration error: unknown output device acpiout1
acpivga0: autoconfiguration error: unknown output device acpiout2
acpivga0: autoconfiguration error: unknown output device acpiout3
acpivga0: autoconfiguration error: unknown output device acpiout4
acpivga0: autoconfiguration error: unknown output device acpiout5
acpivga0: autoconfiguration error: unknown output device acpiout6
acpivga0: autoconfiguration error: unknown output device acpiout7
acpivga0: autoconfiguration error: unknown output device acpiout8
acpivga0: autoconfiguration error: unknown output device acpiout9
acpivga0: autoconfiguration error: unknown output device acpiout10
acpivga0: autoconfiguration error: unknown output device acpiout11
acpivga0: autoconfiguration error: unknown output device acpiout12
acpivga0: autoconfiguration error: unknown output device acpiout13
acpivga0: autoconfiguration error: unknown output device acpiout14
acpivga0: autoconfiguration error: unknown output device acpiout16
acpivga0: connected output devices:
acpivga0: 0x0400 (acpiout15): Unknown Output Device, head 0
FWHD (INT0800) at acpi0 not configured
LDRC (PNP0C02) at acpi0 not configured
attimer1 at acpi0 (TIMR, PNP0100): io 0x40-0x43,0x50-0x53 irq 0
CWDT (INT3F0D) at acpi0 not configured
SEN1 (INT3403) at acpi0 not configured
SEN2 (INT3403) at acpi0 not configured
SEN3 (INT3403) at acpi0 not configured
pckbc1 at acpi0 (PS2K, HPQ8001) (kbd port): io 0x60,0x64 irq 1
pckbc2 at acpi0 (PS2M, SYN326A) (aux port): irq 12
PDRC (PNP0C02) at acpi0 not configured
IOTR (PNP0C02) at acpi0 not configured
GPI0 (INT344B) at acpi0 not configured
TPL0 (ELAN2514) at acpi0 not configured
FPNT (SYNA8003) at acpi0 not configured
WLBT (HPQ6001) at acpi0 not configured
acpiwmi0 at acpi0 (WTBT, PNP0C14-TBFP): ACPI WMI Interface
acpiwmibus at acpiwmi0 not configured
PEPD (INT33A1) at acpi0 not configured
acpiwmi1 at acpi0 (WFDE, PNP0C14-SampleDev): ACPI WMI Interface
acpiwmibus at acpiwmi1 not configured
acpiwmi2 at acpi0 (WFTE, PNP0C14-TestDev): ACPI WMI Interface
acpiwmibus at acpiwmi2 not configured
TPM (MSFT0101) at acpi0 not configured
acpiwmi3 at acpi0 (WMID, PNP0C14-0): ACPI WMI Interface
wmihp0 at acpiwmi3: HP WMI mappings
ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20180810/dsopcode-251)
ACPI Error: Method parse/execution failed \HWMC, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Method parse/execution failed \_SB.WMID.WMAA, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20180810/dsopcode-251)
ACPI Error: Method parse/execution failed \HWMC, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Method parse/execution failed \_SB.WMID.WMAA, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20180810/dsopcode-251)
ACPI Error: Method parse/execution failed \HWMC, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Method parse/execution failed \_SB.WMID.WMAA, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20180810/dsopcode-251)
ACPI Error: Method parse/execution failed \HWMC, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Method parse/execution failed \_SB.WMID.WMAA, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20180810/dsopcode-251)
ACPI Error: Method parse/execution failed \HWMC, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
ACPI Error: Method parse/execution failed \_SB.WMID.WMAA, AE_AML_BUFFER_LIMIT (20180810/psparse-569)
acpibat0 at acpi0 (BAT0, PNP0C0A-1): ACPI Battery
acpiacad0 at acpi0 (ADP1, ACPI0003): ACPI AC Adapter
acpilid0 at acpi0 (LID0, PNP0C0D): ACPI Lid Switch
acpibut0 at acpi0 (PWRB, PNP0C0C): ACPI Power Button
VBPA (INT33D6) at acpi0 not configured
CIND (INT33D3) at acpi0 not configured
IETM (INT3400) at acpi0 not configured
PTID (INT340E) at acpi0 not configured
acpitz0 at acpi0 (TZ01): cpu0 cpu1 cpu2 cpu3 cpu4 cpu5 cpu6 cpu7
acpitz0: levels: hot 100.0 C, passive 99.0 C, passive cooling
ACPI: Enabled 5 GPEs in block 00 to 7F
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pms0: Synaptics touchpad version 8.16
pms0: Extended W mode, Palm detect, One button click pad, Multi-finger Report, Multi-finger
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pchb0 at pci0 dev 0 function 0: vendor 8086 product 5914 (rev. 0x08)
genfb0 at pci0 dev 2 function 0: vendor 8086 product 5917 (rev. 0x07)
genfb0: framebuffer at 0x50000000, size 3840x2160, depth 32, stride 15360
wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
drm at genfb0 not configured
vendor 8086 product 1903 (miscellaneous DASP, revision 0x08) at pci0 dev 4 function 0 not configured
vendor 8086 product 9d35 (miscellaneous prehistoric, revision 0x21) at pci0 dev 19 function 0 not configured
xhci0 at pci0 dev 20 function 0: vendor 8086 product 9d2f (rev. 0x21)
xhci0: interrupting at msi0 vec 0
xhci0: xHCI version 1.0
usb0 at xhci0: USB revision 3.0
usb1 at xhci0: USB revision 2.0
vendor 8086 product 9d31 (miscellaneous DASP, revision 0x21) at pci0 dev 20 function 2 not configured
dwiic0 at pci0 dev 21 function 0status 0x100002
reset 0xffffffff
rlo 0xffffffff
rho 0xffffffff
: I2C controller instance 0
dwiic0: interrupting at ioapic0 pin 16
ACPI Warning: \_SB.PCI0.I2C0.TPL0._DSM: Insufficient arguments - Caller passed 3, ACPI requires 4 (20180810/nsarguments-309)
status 0x100002
reset 0x3
rlo 0xdcc34004
rho 0x0
iic0 at dwiic0: I2C bus
ihidev0 at iic0 addr 0x10: vendor 0x4f3 product 0x2594, ELAN2514
ihidev0: 23 report ids
ihidev0: interrupting at irq 35
hid at ihidev0 reportid 1 not configured
hid at ihidev0 reportid 2 not configured
hid at ihidev0 reportid 3 not configured
hid at ihidev0 reportid 4 not configured
hid at ihidev0 reportid 6 not configured
ims0 at ihidev0 reportid 7: 3 buttons digitizer, tip, barrel, eraser
wsmouse1 at ims0 mux 0
hid at ihidev0 reportid 10 not configured
hid at ihidev0 reportid 14 not configured
hid at ihidev0 reportid 23 not configured
vendor 8086 product 9d3a (miscellaneous communications, revision 0x21) at pci0 dev 22 function 0 not configured
ppb0 at pci0 dev 28 function 0: vendor 8086 product 9d10 (rev. 0xf1)
ppb0: PCI Express capability version 2 x1 @ 8.0GT/s
ppb0: link is x1 @ 5.0GT/s
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled, rd/line, wr/inv ok
rtsx0 at pci1 dev 0 function 0: vendor 10ec product 525a (rev. 0x01)
rtsx0: interrupting at msi1 vec 0
sdmmc0 at rtsx0
ppb1 at pci0 dev 28 function 1: vendor 8086 product 9d11 (rev. 0xf1)
ppb1: PCI Express capability version 2 x1 @ 8.0GT/s
ppb1: link is x1 @ 2.5GT/s
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
iwm0 at pci2 dev 0 function 0: vendor 8086 product 24fd (rev. 0x78)
iwm0: interrupting at msi2 vec 0
ppb2 at pci0 dev 28 function 4: vendor 8086 product 9d14 (rev. 0xf1)
ppb2: PCI Express capability version 2 x4 @ 8.0GT/s
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
ppb3 at pci0 dev 29 function 0: vendor 8086 product 9d18 (rev. 0xf1)
ppb3: PCI Express capability version 2 x4 @ 8.0GT/s
pci4 at ppb3 bus 110
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
nvme0 at pci4 dev 0 function 0: vendor 1179 product 0116 (rev. 0x00)
nvme0: NVMe 1.2.1
nvme0: for admin queue interrupting at msix3 vec 0
nvme0: KXG50ZNV1T02 TOSHIBA, firmware AAHA4102, serial 187S11A9TP8T
nvme0: for io queue 1 interrupting at msix3 vec 1 affinity to cpu0
nvme0: for io queue 2 interrupting at msix3 vec 2 affinity to cpu1
nvme0: for io queue 3 interrupting at msix3 vec 3 affinity to cpu2
nvme0: for io queue 4 interrupting at msix3 vec 4 affinity to cpu3
nvme0: for io queue 5 interrupting at msix3 vec 5 affinity to cpu4
nvme0: for io queue 6 interrupting at msix3 vec 6 affinity to cpu5
nvme0: for io queue 7 interrupting at msix3 vec 7 affinity to cpu6
nvme0: for io queue 8 interrupting at msix3 vec 8 affinity to cpu7
ld0 at nvme0 nsid 1
ld0: 953 GB, 124519 cyl, 255 head, 63 sec, 512 bytes/sect x 2000409264 sectors
vendor 8086 product 9d27 (miscellaneous DASP, revision 0x21) at pci0 dev 30 function 0 not configured
vendor 8086 product 9d29 (miscellaneous DASP, revision 0x21) at pci0 dev 30 function 2 not configured
pcib0 at pci0 dev 31 function 0: vendor 8086 product 9d4e (rev. 0x21)
vendor 8086 product 9d21 (miscellaneous memory, revision 0x21) at pci0 dev 31 function 2 not configured
hdaudio0 at pci0 dev 31 function 3: HD Audio Controller
hdaudio0: interrupting at msi4 vec 0
hdafg0 at hdaudio0: vendor 10ec product 0295
hdafg0: DAC00 2ch: Speaker [Built-In]
hdafg0: DAC01 2ch: HP Out [Jack]
hdafg0: ADC02 2ch: Mic In [Built-In]
hdafg0: ADC03 2ch: Mic In [Jack]
hdafg0: 2ch/2ch 44100Hz 48000Hz 96000Hz 192000Hz PCM16 PCM20 PCM24
audio0 at hdafg0: full duplex, playback, capture, mmap, independent
hdafg0: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000
hdafg0: Latency: 128 milliseconds
spkr0 at audio0: PC Speaker (synthesized)
wsbell at spkr0 not configured
hdafg1 at hdaudio0: vendor 8086 product 280b
hdafg1: DP00 8ch: Digital Out [Jack]
hdafg1: 8ch/0ch 48000Hz PCM16*
ichsmb0 at pci0 dev 31 function 4: vendor 8086 product 9d23 (rev. 0x21)
ichsmb0: interrupting at ioapic0 pin 16
iic1 at ichsmb0: I2C bus
isa0 at pcib0
tpm0 at isa0 iomem 0xfed40000-0xfed44fff irq 7: device 0x001a15d1 rev 0x10
pcppi0 at isa0 port 0x61
spkr1 at pcppi0: PC Speaker
wsbell at spkr1 not configured
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
attimer1: attached to pcppi0
acpicpu0 at cpu0: ACPI CPU
acpicpu0: C1: FFH, lat 1 us, pow 1000 mW
acpicpu0: C2: FFH, lat 151 us, pow 200 mW
acpicpu0: C3: FFH, lat 1034 us, pow 200 mW
acpicpu0: P0: FFH, lat 10 us, pow 15000 mW, 2001 MHz, turbo boost
acpicpu0: P1: FFH, lat 10 us, pow 15000 mW, 2000 MHz
acpicpu0: P2: FFH, lat 10 us, pow 14088 mW, 1900 MHz
acpicpu0: P3: FFH, lat 10 us, pow 13193 mW, 1800 MHz
acpicpu0: P4: FFH, lat 10 us, pow 12317 mW, 1700 MHz
acpicpu0: P5: FFH, lat 10 us, pow 10617 mW, 1500 MHz
acpicpu0: P6: FFH, lat 10 us, pow 9796 mW, 1400 MHz
acpicpu0: P7: FFH, lat 10 us, pow 8989 mW, 1300 MHz
acpicpu0: P8: FFH, lat 10 us, pow 8199 mW, 1200 MHz
acpicpu0: P9: FFH, lat 10 us, pow 7426 mW, 1100 MHz
acpicpu0: P10: FFH, lat 10 us, pow 6670 mW, 1000 MHz
acpicpu0: P11: FFH, lat 10 us, pow 5209 mW, 800 MHz
acpicpu0: P12: FFH, lat 10 us, pow 4502 mW, 700 MHz
acpicpu0: P13: FFH, lat 10 us, pow 3812 mW, 600 MHz
acpicpu0: P14: FFH, lat 10 us, pow 3137 mW, 500 MHz
acpicpu0: P15: FFH, lat 10 us, pow 2478 mW, 400 MHz
acpicpu0: T0: I/O, lat 1 us, pow 0 mW, 100 %
acpicpu0: T1: I/O, lat 1 us, pow 0 mW, 88 %
acpicpu0: T2: I/O, lat 1 us, pow 0 mW, 76 %
acpicpu0: T3: I/O, lat 1 us, pow 0 mW, 64 %
acpicpu0: T4: I/O, lat 1 us, pow 0 mW, 52 %
acpicpu0: T5: I/O, lat 1 us, pow 0 mW, 40 %
acpicpu0: T6: I/O, lat 1 us, pow 0 mW, 28 %
acpicpu0: T7: I/O, lat 1 us, pow 0 mW, 16 %
coretemp0 at cpu0: thermal sensor, 1 C resolution, Tjmax=100
acpicpu1 at cpu1: ACPI CPU
coretemp1 at cpu1: thermal sensor, 1 C resolution, Tjmax=100
acpicpu2 at cpu2: ACPI CPU
coretemp2 at cpu2: thermal sensor, 1 C resolution, Tjmax=100
acpicpu3 at cpu3: ACPI CPU
coretemp3 at cpu3: thermal sensor, 1 C resolution, Tjmax=100
acpicpu4 at cpu4: ACPI CPU
acpicpu5 at cpu5: ACPI CPU
acpicpu6 at cpu6: ACPI CPU
acpicpu7 at cpu7: ACPI CPU
timecounter: Timecounter "clockinterrupt" frequency 100 Hz quality 0
timecounter: Timecounter "TSC" frequency 1992519060 Hz quality 3000
uhub0 at usb0: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 3.00/1.00, addr 0
uhub0: 6 ports with 6 removable, self powered
uhub1 at usb1: NetBSD (0000) xHCI root hub (0000), class 9/0, rev 2.00/1.00, addr 0
uhub1: 12 ports with 12 removable, self powered
acpiacad0: AC adapter online.
ld0: GPT GUID: 1be43938-fdfc-4b4b-a3ca-a5605ce6ca8c
dk0 at ld0: "EFI", 262144 blocks at 34, type: msdos
dk1 at ld0: "ROOT", 104857600 blocks at 262178, type: ffs
dk2 at ld0: "SWAP", 67108864 blocks at 105119778, type: swap
dk3 at ld0: "USR", 251658240 blocks at 172228642, type: ffs
dk4 at ld0: "HOME", 1576522349 blocks at 423886882, type: ffs
IPsec: Initialized Security Association Processing.
acpibat0: HP LION rechargeable battery
acpibat0: granularity: low->warn 0.010 Ah, warn->full 0.025 Ah
umass0 at uhub0 port 1 configuration 1 interface 0
umass0: SanDisk (0x781) Extreme (0x5580), rev 3.00/0.10, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: disk fixed
ugen0 at uhub1 port 5
ugen0: Chicony Electronics Co.,Ltd. (0x4f2) HP Wide Vision FHD Camera (0xb593), rev 2.00/0.11, addr 1
sd0: fabricating a geometry
sd0: 29923 MB, 29923 cyl, 64 head, 32 sec, 512 bytes/sect x 61282631 sectors
sd0: fabricating a geometry
sd0: GPT GUID: 43d2f7c4-c936-4007-9c14-482ea9eff122
dk5 at sd0: "bb0fbda9-7a58-4e4b-bb66-00e06c93d80d", 61282564 blocks at 34, type: msdos
ubt0 at uhub1 port 7
ubt0: vendor 8087 (0x8087) product 0a2b (0xa2b), rev 2.00/0.10, addr 3
WARNING: 16 errors while detecting hardware; check system log.
boot device: ld0
root on dk1 dumps on dk2
root file system type: ffs
kern.module.path=/stand/amd64/8.99.24/modules
iwm0: hw rev 0x230, fw ver 22.361476.0, address xx:xx:xx:xx:xx:xx
iwm0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
iwm0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
iwm0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wsdisplay0: screen 1 added (default, vt100 emulation)
wsdisplay0: screen 2 added (default, vt100 emulation)
wsdisplay0: screen 3 added (default, vt100 emulation)
wsdisplay0: screen 4 added (default, vt100 emulation)
違いがあるのは、CPUのfeaturesに仮想化関係がなくなることしか見付けられなかった。
BitVisor上の場合。
$ cpuctl identify 0
cpu0: highest basic info 00000016
cpu0: highest extended info 80000008
cpu0: "Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz"
cpu0: Intel 7th or 8th gen Core (Kaby Lake, Coffee Lake) (686-class), 1992.44 MHz
cpu0: family 0x6 model 0x8e stepping 0xa (id 0x806ea)
cpu0: features 0xbfebfbff
cpu0: features 0xbfebfbff
cpu0: features 0xbfebfbff
cpu0: features1 0x77fafb9f
cpu0: features1 0x77fafb9f
cpu0: features1 0x77fafb9f
cpu0: features2 0x2c100800
cpu0: features3 0x121
cpu0: features5 0x29c67af
cpu0: features5 0x29c67af
cpu0: SEF edx 0xc000000
cpu0: xsave features 0x7
cpu0: xsave instructions 0xf
cpu0: xsave area size: current 832, maximum 1088, xgetbv disabled
cpu0: I-cache 32KB 64B/line 8-way, D-cache 32KB 64B/line 8-way
cpu0: L2 cache 256KB 64B/line 4-way
cpu0: L3 cache 8MB 64B/line 16-way
cpu0: 64B prefetching
cpu0: ITLB 64 4KB entries 8-way, 2M/4M: 8 entries
cpu0: DTLB 64 4KB entries 4-way
cpu0: L2 STLB 1536 4KB entries 6-way
cpu0: L1 1GB page DTLB 4 1GB entries 4-way
cpu0: Initial APIC ID 0
cpu0: Cluster/Package ID 0
cpu0: Core ID 0
cpu0: SMT ID 0
cpu0: DSPM-eax 0x27f7
cpu0: DSPM-eax 0x27f7
cpu0: DSPM-ecx 0x9
cpu0: SEF highest subleaf 00000000
cpu0: microcode version 0x84, platform ID 7
BitVisorなしの場合。
$ cpuctl identify 0
cpu0: highest basic info 00000016
cpu0: highest extended info 80000008
cpu0: "Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz"
cpu0: Intel 7th or 8th gen Core (Kaby Lake, Coffee Lake) (686-class), 1992.56 MHz
cpu0: family 0x6 model 0x8e stepping 0xa (id 0x806ea)
cpu0: features 0xbfebfbff
cpu0: features 0xbfebfbff
cpu0: features 0xbfebfbff
cpu0: features1 0x7ffafbbf
cpu0: features1 0x7ffafbbf
cpu0: features1 0x7ffafbbf
cpu0: features1 0x7ffafbbf
cpu0: features2 0x2c100800
cpu0: features3 0x121
cpu0: features5 0x29c67af
cpu0: features5 0x29c67af
cpu0: SEF edx 0xc000000
cpu0: xsave features 0x1f
cpu0: xsave instructions 0xf
cpu0: xsave area size: current 832, maximum 1088, xgetbv enabled
cpu0: enabled xsave 0x7
cpu0: I-cache 32KB 64B/line 8-way, D-cache 32KB 64B/line 8-way
cpu0: L2 cache 256KB 64B/line 4-way
cpu0: L3 cache 8MB 64B/line 16-way
cpu0: 64B prefetching
cpu0: ITLB 64 4KB entries 8-way, 2M/4M: 8 entries
cpu0: DTLB 64 4KB entries 4-way
cpu0: L2 STLB 1536 4KB entries 6-way
cpu0: L1 1GB page DTLB 4 1GB entries 4-way
cpu0: Initial APIC ID 0
cpu0: Cluster/Package ID 0
cpu0: Core ID 0
cpu0: SMT ID 0
cpu0: DSPM-eax 0x27f7
cpu0: DSPM-eax 0x27f7
cpu0: DSPM-ecx 0x9
cpu0: SEF highest subleaf 00000000
cpu0: microcode version 0x84, platform ID 7
課題
tools/log
ディレクトリー以下の機能をNetBSDにも導入したい。