2020/1/11 ついに動作を確認。ZynqMPのQEMU環境はLinux立ち上げ時にGEM3とSD1しか正しく動作させられない様子。 最初からの手順は別記事としてまとめる。
2019/12/24
動かすまで苦労しているのと気になる人がいると思うのでメモを公開。
ただ、まだ最後まで動かせていません。
待ち時間がそこそこ長いので、情報は待ち時間発生ごとにアップデートします。
環境:
OS:Ubuntu 18.04.03 LTS
メモリ:16GB
ツール:Vitis 2019.2, Vivado 2019.2, petalinux 2019.2, xrt-2019.2
対象:Ultra96v2
VitisのAcceleration PlatformでUltra96を使ってAcclerationを行う場合、以下の条件が必要と思う。ultra96対応するために行った回避策も一応載せておきます。
条件1:rootfsはramdiskであること
=> Emulation-SWで生成するsd imageがパーティショニングに対応していないように見えることが理由。今回は個人的によく使うSDブートではなく、rootfsをramdiskにしてとりあえず回避。そのうちSDブート対応する方法を調べるか、公式に対応されるのを待つ。
条件2: メインメモリが1Gb以上必要
=>条件1のramdiskはそこそこサイズが大きいので 最低1Gbは必要と思う。
Ultra96の場合は特に問題ない。
PynqZ2でもAccleration Platformを動かそうとしたけどlinux kernelが動作しなくて諦めた。
条件3:qemu_args.txtとpmu_args.txtを正しく指定する必要がある。
=> petalinux-boot --qemu --u-bootを動かしたときのパラメータを参考に作成。大きなramdiskを使用したカーネルの立ち上げは失敗する模様。
条件4:QEMUを使用してkernelを起動させた後にホストとの通信疎通が必要(多分)
=>XilinxのQEMUのドキュメント読むとwireless通信モジュールのモデルやUSBモデルが用意されていなさそうなので、本物そのものの構成だとQEMUを使用してホストOSと通信ができず次の条件4が満足できない。
GEM3をEMIOでPLに出力し、未接続にした。
条件5: rootfsにTCF Agentの設定が必要
=>デフォルトの設定で動作するようになっていたため問題なし。
また、Vitisのチュートリアルに従いながらUltra96の設定を行っていくと以下の問題があるので、それぞれ対応した。
問題1:QEMU実行パラメータの問題でU-bootがSDカードを認識しない。
2020/1/11 下記変更は不要。SD0をLinuxが認識してくれないので。U-Bootは認識するので動作可能なsdイメージを-driveで指定すれば良い。
問題2:U-bootのデバイス指定がうまくなく、SDカードを認識しない。if {$cpu_type == "cortex-a53"} {
if { [info exists sdimage] } {
if {[file isfile $sdimage]} {
append qemu_args " -drive \"file=$sdimage,if=u-bootsd,format=raw,index=0\""
} elseif {[file isdirectory $sdimage]} {
append qemu_args " -drive \"file=[file join $sdimage sd_card.img],if=sd,format=raw,index=0\""
}
} else {
puts "WARNING : \[LAUNCH_EMULATOR\] sd-card-image option is not provided.Currently picking up default sd_card.img from _vimage/emulation folder"
append qemu_args " -drive \"file=[file join [pwd] _vimage emulation sd_card.img],if=sd,format=raw,index=0\""
}
2020/1/11以下は間違いで、U-BootはSD0を認識可能であるが、Linux側で認識ができない状況の模様。SD0は動作可能なsdイメージをqemu_arg.txtで指定するため結局不要だった。ZynqMPはPin-Ctrl Driverに対応している部分しかLinuxは認識することができない?
デバッグメッセージを有効にさせたりpatchを当てる方法は参考になった。
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842475/PetaLinux+Yocto+Tips#PetaLinuxYoctoTips-ConfiguringFSBLandPMUFWdebugsinPetaLinuxProject
qemu_argsとpmu_argsの最終結果は別記事にまとめる。
実行時のログは以下の通り。
Running SW Emulation INFO : [LAUNCH_EMULATOR] pl_sim_dir option is not provided. WARNING : [LAUNCH_EMULATOR] qemu_args_file is not specified. Using default file which is in _vimage/emulation to run the emulation WARNING : [LAUNCH_EMULATOR] pmc_args_file is not specified. Using default file which is in _vimage/emulation to run the emulation WARNING : [LAUNCH_EMULATOR] sd-card-image option is not provided.Currently picking up default sd_card.img from _vimage/emulation folder Starting QEMU - Press <Ctrl-a h> for help Waiting for QEMU to start. qemu-system-aarch64: -redir tcp:1440::1534: The -redir option is deprecated. Please use '-netdev user,hostfwd=...' instead. qemu-system-aarch64: -chardev socket,id=pmu-apu-rp,host=127.0.0.1,port=7546,server: info: QEMU waiting for connection on: disconnected:tcp:127.0.0.1:7546,server .. QEMU started. qemu_pid=4379. Waiting for PMU to start. qemu-system-aarch64 : -chardev socket,id=pl-rp,host=127.0.0.1,port=8959,server: info: QEMU waiting for connection on: disconnected:tcp:127.0.0.1:8959,server QEMU 2.11.1 monitor - type 'help' for more information (qemu) .. PMC started in nopl. pmc_pid=4384 Starting PL simulation.Generating PLLauncher commandline running PLL Launcherclass=" client="" clk_ignore_unused="" clocksource:="" cma-reserved="" cma:="" code="" colour="" command="" compatible="" compressed="" compression:="" conduit="" conf="" configuration="" connected="" console:="" console="ttyPS0,115200" convention="" copyright="" core:="" cp15="" cpu0="" cpu1:="" cpu1="" cpu2:="" cpu2="" cpu3:="" cpu3="" cpu:="" cpu="" cpuidle:="" cpus="" created="" crng_init="0" d32360="" d4765e239e973e6df2fd138028718f37c0b544fc="" data="" default:="" delay="" dentry="" description:="" detected:="" detected="" device:="" device="" devtmpfs:="" dhcp="" disable="" disabled="" dma:="" dma="" dr_mode="" dram:="" driver="" dt.="" dummy="" eactivate="" earlycon:="" earlycon="" ed400000="" efi:="" efi="" el0="" el2="" el="" embedded="" enabled.="" enabled="" enabling="" end="" entries:="" entries="" entry="" environment="" eoi="" erase="" err:="" erratum="" eth0:="" ethernet="" event="" every="" f394cca5da5d87c67b4f50c4be5d26f2592bbc12="" family="" fat...="" fdt:="" fdt="" features:="" ff010000="" ff0e0000="" ff160000:="" ff160000="" ff170000:="" ffffffff="" firmware.="" firmware="" fit="" flat="" flattened="" for="" found.="" found="" frequency..="" from="" function:="" function="" futex="" gcc="" gem:="" gen="" geometry="" get_random_bytes="" getting="" gib="" gic:="" giometti="" gmii="" governor="" group="" grouping="" gzip="" hash="" hierarchical="" high="" hit="" host="" hub="" hugetlb="" hw-breakpoint:="" i-cache="" id:="" id="" ids="" image="" implementation.="" in:="" in="" init="" initialised="" initialized="" initializing="" inode-cache="" int64x1="" int64x2="" int64x4="" int64x8="" integrity="" interface:="" interface="" invalid="" irqs:="" is="" jan="" jiffies:="" kernel="" key="" kib="" legacy="" len:="" level:="" line:="" linux.it="" linux="" linuxpps="" load="" loading="" loop="" lpj="260000)" machine="" manufacturer="" mask:="" max_cycles:="" max_idle_ns:="" mb="" measuring="" media:="" media="" mem:="" memory:="" memory="" menu="" method="" mib="" migrate_info_type="" minimum:="" mitigation="" mmc:="" mmc="" mmio="" mobility="" mode="" model:="" mount-cache="" mountpoint-cache="" ms="" n8="" name:="" neon="" neonx1="" neonx2="" neonx4="" neonx8="" net:="" netlink="" network="" new="" no="" node="" non="" not="" notice:="" nr_cpu_ids="4" nr_cpus="8" nr_irqs:="" ns="" oe-host="" oe-user="" oem:="" of:="" of="" ok="" on.="" on="" options="" order:="" os:="" out:="" page="" pages:="" pages="" parameters="" partition="" partitions="" patching="" percpu:="" petalinux-user-image="" petalinux="" phyaddr="" phys="" physical="" pid_max:="" pinctrl="" pmu="" pmu_rom="" pmufw:="" point:="" pool="" pps_core:="" pre-allocated="" preallocated="" prettyprint="" probing="" processor="" processors="" protocol="" psci:="" psci="" psciv1.1="" ptrval____="" qemu-system-aarch64:="" qemu="" r8192="" raid6:="" ramdisk="" random:="" rcu:="" rcu="" rcu_fanout_leaf="16," rd="" read="" reason:="" recovery="" registered="" registers.="" release="" required="" res="1" reserved="" reset="" resolution="" restricting="" rmw="" rodata="" rodolfo="" rproc="" running="" rwdata="" s53656="" s="" sat="" sched_clock:="" scsi="" sd="" sd_mode="" sec="" secondary="" secure="" serial="" services="" sha1="" shared-dma-pool="" size:="" size="" skipped="" smc="" smp:="" smp="" software="" speculative="" speed:="" speed="" split="" srcu="" standard="" start:="" start_kernel="" started="" starting="" state="initialized" stop="" store="" subimage="" subsys="" subsystem="" support="" supported.="" system-top.dtb="" table="" the="" timer="" to="" total="" tracing="" tree="" trying="" type:="" type="2000" u-boot="" u94208="" uefi="" unavailable="" uncompressed="" unknown="" up="" usb="" usbcore:="" usbfs="" using="" utc="" v0.10="" v0.2="" v1.1="" v2.00="" v2.0="" v4="" valid="" value:="" value="" vdso:="" ver.="" verifying="" version:="" version="" video="" videodev:="" vipt="" vlan="" warning:="" watchpoint="" width:="" will="" with="" workaround="" wraps="" x3f8="" x410fd034="" x94="" xczuunkn="" xilinx-v2019.1-12-g713dace9="" xilinx="" xlnx="" xor:="" xor="" xpbr-v8.1.0-0="" zonelists="" zynq="" zynqmp="">[ 2.757116] PTP clock support registered [ 2.758075] EDAC MC: Ver: 3.0.0 [ 2.782269] zynqmp-ipi-mbox mailbox@ff990400: Probed ZynqMP IPI Mailbox driver. [ 2.793609] zynqmp-ipi-mbox mailbox@ff90000: Probed ZynqMP IPI Mailbox driver. [ 2.796819] FPGA manager framework [ 2.799401] Advanced Linux Sound Architecture Driver Initialized.class="prettyprint” [ 2.816463] Bluetooth: Core ver 2.22 [ 2.820549] NET: Registered protocol family 31 [ 2.820968] Bluetooth: HCI device and connection manager initialized [ 2.822728] Bluetooth: HCI socket layer initialized [ 2.823151] Bluetooth: L2CAP socket layer initialized [ 2.824201] Bluetooth: SCO socket layer initialized [ 2.850951] clocksource: Switched to clocksource arch_sys_counter [ 2.853813] VFS: Disk quotas dquot_6.6.0 [ 2.854599] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 3.199314] NET: Registered protocol family 2 [ 3.223417] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes) [ 3.229747] TCP established hash table entries: 16384 (order: 5, 131072 bytes) [ 3.231141] TCP bind hash table entries: 16384 (order: 6, 262144 bytes) [ 3.235401] TCP: Hash tables configured (established 16384 bind 16384) [ 3.242906] UDP hash table entries: 1024 (order: 3, 32768 bytes) [ 3.243662] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes) [ 3.247213] NET: Registered protocol family 1 [ 3.268211] RPC: Registered named UNIX socket transport module. [ 3.269503] RPC: Registered udp transport module. [ 3.270998] RPC: Registered tcp transport module. [ 3.271272] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 3.294559] Trying to unpack rootfs image as initramfs... [ 52.573268] Freeing initrd memory: 109188K [ 52.587031] hw perfevents: no interrupt-affinity property for /pmu, guessing. [ 52.596543] hw perfevents: enabled with armv8_pmuv3 PMU driver, 1 counters available [ 52.608746] Initialise system trusted keyrings [ 52.632129] workingset: timestamp_bits=62 max_order=19 bucket_order=0 [ 52.687407] NFS: Registering the id_resolver key type [ 52.687777] Key type id_resolver registered [ 52.687907] Key type id_legacy registered [ 52.688171] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 52.689691] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc. [ 56.935489] NET: Registered protocol family 38 [ 57.267345] Key type asymmetric registered [ 57.268127] Asymmetric key parser 'x509' registered [ 57.269643] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247) [ 57.270805] io scheduler noop registered [ 57.271200] io scheduler deadline registered [ 57.271962] io scheduler cfq registered (default) [ 57.272368] io scheduler mq-deadline registered [ 57.274872] io scheduler kyber registered [ 58.927342] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled [ 59.209083] brd: module loaded [ 59.293061] loop: module loaded [ 59.307100] mtdoops: mtd device (mtddev=name/number) must be supplied [ 59.346804] libphy: Fixed MDIO Bus: probed [ 59.372771] tun: Universal TUN/TAP device driver, 1.6 [ 59.389951] hrtimer: interrupt took 27914892 ns [ 59.418792] CAN device driver interface [ 59.433328] usbcore: registered new interface driver asix [ 59.433987] usbcore: registered new interface driver ax88179_178a [ 59.434613] usbcore: registered new interface driver cdc_ether [ 59.435185] usbcore: registered new interface driver net1080 [ 59.435754] usbcore: registered new interface driver cdc_subset [ 59.436287] usbcore: registered new interface driver zaurus [ 59.439999] usbcore: registered new interface driver cdc_ncm [ 59.548177] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 59.556486] ehci-pci: EHCI PCI platform driver [ 59.567724] usbcore: registered new interface driver uas [ 59.570118] usbcore: registered new interface driver usb-storage [ 59.599470] rtc_zynqmp ffa60000.rtc: rtc core: registered ffa60000.rtc as rtc0 [ 59.600295] i2c /dev entries driver [ 59.638379] usbcore: registered new interface driver uvcvideo [ 59.638736] USB Video Class driver (1.1.1) [ 59.653975] Bluetooth: HCI UART driver ver 2.3 [ 59.655620] Bluetooth: HCI UART protocol H4 registered [ 59.657263] Bluetooth: HCI UART protocol BCSP registered [ 59.659265] Bluetooth: HCI UART protocol LL registered [ 59.659602] Bluetooth: HCI UART protocol ATH3K registered [ 59.660286] Bluetooth: HCI UART protocol Three-wire (H5) registered [ 59.661133] Bluetooth: HCI UART protocol Intel registered [ 59.661562] Bluetooth: HCI UART protocol QCA registered [ 59.662144] usbcore: registered new interface driver bcm203x [ 59.662656] usbcore: registered new interface driver bpa10x [ 59.663179] usbcore: registered new interface driver bfusb [ 59.663663] usbcore: registered new interface driver btusb [ 59.663898] Bluetooth: Generic Bluetooth SDIO driver ver 0.1 [ 59.664540] usbcore: registered new interface driver ath3k [ 59.686108] EDAC MC: ECC not enabled [ 59.688253] EDAC ZynqMP-OCM: ECC not enabled - Disabling EDAC driver [ 59.708202] sdhci: Secure Digital Host Controller Interface driver [ 59.708535] sdhci: Copyright(c) Pierre Ossman [ 59.708827] sdhci-pltfm: SDHCI platform and OF driver helper [ 59.717142] ledtrig-cpu: registered to indicate activity on CPUs [ 59.719379] zynqmp_firmware_probe Platform Management API v1.1 [ 59.721412] zynqmp_firmware_probe Trustzone version v1.0 [ 73.361006] zynqmp_clk_mux_get_parent() getparent failed for clock: lpd_wdt, ret = -22 [ 73.485322] alg: No test for xilinx-zynqmp-aes (zynqmp-aes) [ 73.487671] zynqmp_aes zynqmp_aes: AES Successfully Registered [ 73.487671] [ 73.510533] alg: No test for xilinx-keccak-384 (zynqmp-keccak-384) [ 73.558941] alg: No test for xilinx-zynqmp-rsa (zynqmp-rsa) [ 73.585593] usbcore: registered new interface driver usbhid [ 73.587115] usbhid: USB HID core driver [ 74.113848] fpga_manager fpga0: Xilinx ZynqMP FPGA Manager registered [ 74.143698] usbcore: registered new interface driver snd-usb-audio [ 74.194868] pktgen: Packet Generator for packet performance testing. Version: 2.75 [ 74.262994] Initializing XFRM netlink socket [ 74.266177] NET: Registered protocol family 10 [ 74.336452] Segment Routing with IPv6 [ 74.342661] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver [ 74.351546] NET: Registered protocol family 17 [ 74.354665] NET: Registered protocol family 15 [ 74.359949] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this. [ 74.366920] can: controller area network core (rev 20170425 abi 9) [ 74.367833] NET: Registered protocol family 29 [ 74.368298] can: raw protocol (rev 20170425) [ 74.368634] can: broadcast manager protocol (rev 20170425 t) [ 74.369522] can: netlink gateway (rev 20170425) max_hops=1 [ 74.378032] Bluetooth: RFCOMM TTY layer initialized [ 74.387767] Bluetooth: RFCOMM socket layer initialized [ 74.388587] Bluetooth: RFCOMM ver 1.11 [ 74.390073] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 74.390350] Bluetooth: BNEP filters: protocol multicast [ 74.392858] Bluetooth: BNEP socket layer initialized [ 74.393358] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 74.393652] Bluetooth: HIDP socket layer initialized [ 74.399673] 9pnet: Installing 9P2000 support [ 74.401044] Key type dns_resolver registered [ 74.421226] registered taskstats version 1 [ 74.421496] Loading compiled-in X.509 certificates [ 74.442977] Btrfs loaded, crc32c=crc32c-generic [ 74.666822] ff000000.serial: ttyPS1 at MMIO 0xff000000 (irq = 41, base_baud = 10416666) is a xuartps [ 74.795976] ff010000.serial: ttyPS0 at MMIO 0xff010000 (irq = 42, base_baud = 2480158) is a xuartps [ 74.799738] console [ttyPS0] enabled [ 74.799738] console [ttyPS0] enabledclass="prettyprint” [ 74.800465] bootconsole [cdns0] disabled [ 74.800465] bootconsole [cdns0] disabled [ 74.894567] of-fpga-region fpga-full: FPGA Region probed [ 75.112631] xilinx-dpdma fd4c0000.dma: Xilinx DPDMA engine is probed [ 75.231591] xilinx-zynqmp-dma fd500000.dma: ZynqMP DMA driver Probe success [ 75.235442] xilinx-zynqmp-dma fd510000.dma: ZynqMP DMA driver Probe success [ 75.245188] xilinx-zynqmp-dma fd520000.dma: ZynqMP DMA driver Probe success [ 75.250096] xilinx-zynqmp-dma fd530000.dma: ZynqMP DMA driver Probe success [ 75.252498] xilinx-zynqmp-dma fd540000.dma: ZynqMP DMA driver Probe success [ 75.258769] xilinx-zynqmp-dma fd550000.dma: ZynqMP DMA driver Probe success [ 75.262052] xilinx-zynqmp-dma fd560000.dma: ZynqMP DMA driver Probe success [ 75.265587] xilinx-zynqmp-dma fd570000.dma: ZynqMP DMA driver Probe success [ 75.399407] xilinx-zynqmp-dma ffa80000.dma: ZynqMP DMA driver Probe success [ 75.409458] xilinx-zynqmp-dma ffa90000.dma: ZynqMP DMA driver Probe success [ 75.415652] xilinx-zynqmp-dma ffaa0000.dma: ZynqMP DMA driver Probe success [ 75.418641] xilinx-zynqmp-dma ffab0000.dma: ZynqMP DMA driver Probe success [ 75.451930] xilinx-zynqmp-dma ffac0000.dma: ZynqMP DMA driver Probe success [ 75.456971] xilinx-zynqmp-dma ffad0000.dma: ZynqMP DMA driver Probe success [ 75.460015] xilinx-zynqmp-dma ffae0000.dma: ZynqMP DMA driver Probe success [ 75.465705] xilinx-zynqmp-dma ffaf0000.dma: ZynqMP DMA driver Probe success [ 75.801770] xilinx-psgtr fd400000.zynqmp_phy: Lane:1 type:8 protocol:4 pll_locked:yes [ 76.932430] zynqmp_clk_divider_set_rate() set divider failed for ams_ref_div1, ret = -13 [ 79.519691] xilinx-dp-snd-codec fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0: Failed to get required clock freq [ 79.573503] xilinx-dp-snd-codec: probe of fd4a0000.zynqmp-display:zynqmp_dp_snd_codec0 failed with error -22 [ 79.579105] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm0: Xilinx DisplayPort Sound PCM probed [ 79.594130] xilinx-dp-snd-pcm zynqmp_dp_snd_pcm1: Xilinx DisplayPort Sound PCM probed [ 79.605374] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered [ 79.612089] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000 [ 79.637905] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [ 79.645409] [drm] No driver support for vblank timestamp query. [ 79.655586] xlnx-drm xlnx-drm.0: bound fd4a0000.zynqmp-display (ops 0xffffff8008bbeb78) [ 80.583571] Console: switching to colour frame buffer device 128x48 [ 80.613630] zynqmp-display fd4a0000.zynqmp-display: fb0: frame buffer device [ 80.623298] [drm] Initialized xlnx 1.0.0 20130509 for fd4a0000.zynqmp-display on minor 0 [ 80.627260] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed [ 80.647702] zynqmp_gpd_attach_dev() domain6 request failed for node 35: -13 [ 80.649750] cdns-spi ff040000.spi: failed to add to PM domain domain6: -13 [ 80.650471] cdns-spi: probe of ff040000.spi failed with error -13 [ 80.691301] zynqmp_gpd_attach_dev() domain7 request failed for node 36: -13 [ 80.693739] cdns-spi ff050000.spi: failed to add to PM domain domain7: -13 [ 80.694530] cdns-spi: probe of ff050000.spi failed with error -13 [ 80.904611] macb ff0e0000.ethernet: Not enabling partial store and forward [ 80.915485] macb: GEM doesn't support hardware ptp. [ 80.931931] libphy: MACB_mii_bus: probed [ 81.382199] Marvell 88E1118 ff0e0000.ethernet-ffffffff:07: attached PHY driver [Marvell 88E1118] (mii_bus:phy_addr=ff0e0000.ethernet-ffffffff:07, irq=POLL) [ 81.383992] macb ff0e0000.ethernet eth0: Cadence GEM rev 0x40070106 at 0xff0e0000 irq 29 (00:0a:35:00:22:01) [ 81.390069] xilinx-axipmon ffa00000.perf-monitor: Probed Xilinx APM [ 81.424960] xilinx-axipmon fd0b0000.perf-monitor: Probed Xilinx APM [ 81.431119] xilinx-axipmon fd490000.perf-monitor: Probed Xilinx APM [ 81.435641] xilinx-axipmon ffa10000.perf-monitor: Probed Xilinx APM [ 81.564454] dwc3-of-simple ff9d0000.usb0: dwc3_simple_set_phydata: Can't find usb3-phy [ 81.664160] dwc3 fe200000.dwc3: Failed to get clk 'ref': -2 [ 81.667181] WARNING: CPU: 2 PID: 22 at include/linux/dma-mapping.h:516 dwc3_alloc_event_buffers+0x138/0x1b8 [ 81.668084] Modules linked in: [ 81.668415] CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 4.19.0-xilinx-v2019.2 #1 [ 81.668809] Hardware name: xlnx,zynqmp (DT) [ 81.669543] Workqueue: events deferred_probe_work_func [ 81.669961] pstate: 60000005 (nZCv daif -PAN -UAO) [ 81.670287] pc : dwc3_alloc_event_buffers+0x138/0x1b8 [ 81.670590] lr : dwc3_alloc_event_buffers+0x6c/0x1b8 [ 81.672876] sp : ffffff80092bb6e0 [ 81.673090] x29: ffffff80092bb6e0 x28: 0000000000000000 [ 81.675595] x27: 0000000000000000 x26: 0000000000000000 [ 81.675957] x25: ffffffc07c4daa38 x24: 0000000000001000 [ 81.676173] x23: ffffffc078b14010 x22: ffffff8008b07000 [ 81.676386] x21: ffffffc07d0e1018 x20: ffffff8009128648 [ 81.676603] x19: ffffffc07c4daa18 x18: 0000000000000010 [ 81.676826] x17: 0000000000000000 x16: 0000000000000000 [ 81.677066] x15: ffffffffffffffff x14: ffffff8009128648 [ 81.677277] x13: ffffff80891c6f0f x12: ffffff80091c6f17 [ 81.677529] x11: 0000000000000001 x10: ffffff80091a4600 [ 81.677799] x9 : 0000000000000000 x8 : ffffffc049f66000 [ 81.678015] x7 : 0000000000000000 x6 : 000000000000003f [ 81.678231] x5 : 0000000000000040 x4 : ffffffc078b142a0 [ 81.678686] x3 : 0000000000000000 x2 : 0000000000000001 [ 81.679038] x1 : ffffffc07c4daa00 x0 : 0000000000000000 [ 81.681113] Call trace: [ 81.681569] dwc3_alloc_event_buffers+0x138/0x1b8 [ 81.682006] dwc3_probe+0x7b4/0xbb0 [ 81.682170] platform_drv_probe+0x50/0xa0 [ 81.682391] really_probe+0x1c8/0x280 [ 81.682557] driver_probe_device+0x54/0xe8 [ 81.682737] __device_attach_driver+0xb8/0xe8 [ 81.683374] bus_for_each_drv+0x78/0xc8 [ 81.683709] __device_attach+0xd4/0x130 [ 81.683882] device_initial_probe+0x10/0x18 [ 81.684048] bus_probe_device+0x90/0x98 [ 81.684212] device_add+0x334/0x608 [ 81.684399] of_device_add+0x58/0x68 [ 81.684617] of_platform_device_create_pdata+0xac/0x108 [ 81.684826] of_platform_bus_create+0x294/0x390 [ 81.684992] of_platform_populate+0x74/0xd8 [ 81.685146] dwc3_of_simple_probe+0x3fc/0x528 [ 81.685313] platform_drv_probe+0x50/0xa0 [ 81.685479] really_probe+0x1c8/0x280 [ 81.685652] driver_probe_device+0x54/0xe8 [ 81.685826] __device_attach_driver+0xb8/0xe8 [ 81.686005] bus_for_each_drv+0x78/0xc8 [ 81.686169] __device_attach+0xd4/0x130 [ 81.686332] device_initial_probe+0x10/0x18 [ 81.686499] bus_probe_device+0x90/0x98 [ 81.686669] deferred_probe_work_func+0x6c/0xa0class="prettyprint” [ 81.687725] process_one_work+0x1e4/0x340 [ 81.688013] worker_thread+0x248/0x488 [ 81.688289] kthread+0x124/0x128 [ 81.688523] ret_from_fork+0x10/0x18 [ 81.689250] ---[ end trace 1d57b809c22f3615 ]--- [ 81.878927] dwc3 fe200000.dwc3: swiotlb: coherent allocation failed, size=4096 [ 81.879681] CPU: 2 PID: 22 Comm: kworker/2:0 Tainted: G W 4.19.0-xilinx-v2019.2 #1 [ 81.881733] Hardware name: xlnx,zynqmp (DT) [ 81.882934] Workqueue: events deferred_probe_work_func [ 81.883688] Call trace: [ 81.883907] dump_backtrace+0x0/0x148 [ 81.886633] show_stack+0x14/0x20 [ 81.887828] dump_stack+0x90/0xb4 [ 81.889141] swiotlb_alloc+0x160/0x168 [ 81.890810] __dma_alloc+0xa8/0x1e0 [ 81.891075] dwc3_alloc_event_buffers+0xd0/0x1b8 [ 81.897032] dwc3_probe+0x7b4/0xbb0 [ 81.897197] platform_drv_probe+0x50/0xa0 [ 81.897353] really_probe+0x1c8/0x280 [ 81.897494] driver_probe_device+0x54/0xe8 [ 81.897901] __device_attach_driver+0xb8/0xe8 [ 81.898091] bus_for_each_drv+0x78/0xc8 [ 81.898410] __device_attach+0xd4/0x130 [ 81.898559] device_initial_probe+0x10/0x18 [ 81.898768] bus_probe_device+0x90/0x98 [ 81.901275] device_add+0x334/0x608 [ 81.901461] of_device_add+0x58/0x68 [ 81.904167] of_platform_device_create_pdata+0xac/0x108 [ 81.904489] of_platform_bus_create+0x294/0x390 [ 81.904882] of_platform_populate+0x74/0xd8 [ 81.905299] dwc3_of_simple_probe+0x3fc/0x528 [ 81.905683] platform_drv_probe+0x50/0xa0 [ 81.908408] really_probe+0x1c8/0x280 [ 81.909019] driver_probe_device+0x54/0xe8 [ 81.909878] __device_attach_driver+0xb8/0xe8 [ 81.910102] bus_for_each_drv+0x78/0xc8 [ 81.910279] __device_attach+0xd4/0x130 [ 81.910619] device_initial_probe+0x10/0x18 [ 81.910797] bus_probe_device+0x90/0x98 [ 81.911013] deferred_probe_work_func+0x6c/0xa0 [ 81.911308] process_one_work+0x1e4/0x340 [ 81.911804] worker_thread+0x248/0x488 [ 81.912670] kthread+0x124/0x128 [ 81.912819] ret_from_fork+0x10/0x18 [ 81.913884] dwc3 fe200000.dwc3: can't allocate event buffer [ 81.915698] dwc3 fe200000.dwc3: failed to allocate event buffers [ 81.917176] dwc3: probe of fe200000.dwc3 failed with error -12 [ 81.956932] zynqmp_gpd_attach_dev() domain10 request failed for node 23: -13 [ 81.960470] dwc3-of-simple ff9e0000.usb1: failed to add to PM domain domain10: -13 [ 81.962042] dwc3-of-simple: probe of ff9e0000.usb1 failed with error -13 [ 82.093512] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 31 [ 82.102565] cdns-wdt fd4d0000.watchdog: Xilinx Watchdog Timer with timeout 60s [ 82.109046] cdns-wdt ff150000.watchdog: Xilinx Watchdog Timer with timeout 10s [ 82.122949] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 277777 KHz [ 82.174958] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 299999 KHz [ 82.305416] zynqmp_gpd_attach_dev() domain12 request failed for node 39: -13 [ 82.305902] sdhci-arasan ff160000.mmc: failed to add to PM domain domain12: -13 [ 82.306356] sdhci-arasan: probe of ff160000.mmc failed with error -13 [ 82.610480] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit [ 82.800209] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered [ 82.830629] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered [ 82.883638] rtc_zynqmp ffa60000.rtc: setting system clock to 2020-01-11 22:24:42 UTC (1578781482) [ 82.886776] of_cfs_init [ 82.888200] of_cfs_init: OK [ 82.890145] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 83.003852] mmc0: Problem switching card into high-speed mode! [ 83.015011] mmc0: new SD card at address 4567 [ 83.024902] mmcblk0: mmc0:4567 QEMU! 488 MiB class="prettyprint” [ 83.103134] mmcblk0: p1 [ 83.124587] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered [ 83.748003] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 83.749869] clk: Not disabling unused clocks [ 83.750892] ALSA device list: [ 83.751202] No soundcards found. [ 83.761590] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 [ 83.763175] cfg80211: failed to load regulatory.db [ 83.891178] Freeing unused kernel memory: 832K [ 83.981452] Run /init as init process INIT: version 2.88 booting Starting udev [ 89.598758] udevd[1764]: starting version 3.2.5 [ 89.621828] random: udevd: uninitialized urandom read (16 bytes read) [ 89.630114] random: udevd: uninitialized urandom read (16 bytes read) [ 89.634939] random: udevd: uninitialized urandom read (16 bytes read) [ 90.018175] udevd[1765]: starting eudev-3.2.5 [ 91.217239] zocl: loading out-of-tree module taints kernel. [ 91.264278] [drm] Probing for xlnx,zocl [ 91.305258] [drm] FPGA programming device pcap founded. [ 91.306393] [drm] PR Isolation addr 0x0 [ 91.370134] [drm] Initialized zocl 2018.2.1 20180313 for amba:zyxclmm_drm on minor 1 [ 91.372750] urandom_read: 5 callbacks suppressed [ 91.374281] random: udevd: uninitialized urandom read (16 bytes read) [ 91.397673] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered [ 91.666951] random: udevd: uninitialized urandom read (16 bytes read) [ 92.862582] zynqmp_r5_remoteproc ff9a0000.zynqmp-rpu: RPU core_conf: split [ 92.867333] r5@0: DMA mask not set [ 92.867811] r5@0: assigned reserved memory node rproc@3ed400000 [ 92.919937] remoteproc remoteproc0: r5@0 is available [ 92.926008] xilinx-dp-snd-card fd4a0000.zynqmp-display:zynqmp_dp_snd_card: ASoC: CPU DAI (null) not registered Configuring packages on first boot.... (This may take several minutes. Please do not power off the machine.) Running postinst /etc/rpm-postinsts/100-xrt... [ 132.788022] INFO: Creating ICD entry for Xilinx Platform Running postinst /etc/rpm-postinsts/101-sysvinit-inittab... update-rc.d: /etc/init.d/run-postinsts exists during rc.d purge (continuing) Removing any system startup links for run-postinsts ... /etc/rcS.d/S99run-postinsts INIT: Entering runlevel: 5 Configuring network interfaces... [ 139.394424] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready udhcpc: started, v1.29.2 [ 140.753513] macb ff0e0000.ethernet eth0: link up (100/Full) [ 140.758326] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready udhcpc: sending discover udhcpc: sending select for 10.0.2.15 udhcpc: lease of 10.0.2.15 obtained, lease time 86400 /etc/udhcpc.d/50default: Adding DNS 10.0.2.3 done. Starting system message bus: dbus. Starting haveged: haveged: listening socket at 3 haveged: haveged starting up Starting Dropbear SSH server: Generating 2048 bit rsa key, this may take a while... haveged: haveged: ver: 1.9.4; arch: generic; vend: ; build: (gcc 8.2.0 CTV); collect: 128K haveged: haveged: cpu: (VC); data: 16K (D V); inst: 16K (D V); idx: 11/40; sz: 15528/64688 haveged: haveged: tot tests(BA8): A:1/1 B:1/1 continuous tests(B): last entropy estimate 7.9961 haveged: haveged: fills: 0, generated: 0 [ 149.787106] random: crng init done Public key portion is: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCUUZ6PYoNXKSh4Cs/x8OlM/0cvOgMFmiN6xtMNSN8iElcAvHOyisaN0Ehr1VAsCxylZaSA8jjz1XOxKj3InNWrLOjYXcNDCmZ+IK1fEnCgreSXVjeMNYxBqYnxRMZt9/iUnB8980W+qOop43TKJAcMTcCzymPfrc8iMqIjQ7xwTXik5S04K6a0VI8Ifxs/JtvcmWIOmoRmkI2ulI3LnYahDSgaXbhul48hZqZ+TS8368sp2EQX33LorKMlg8ToyRz/TM+sx24WG6KLTtsPv8SrzwXsmPleUDbcWdbQPFkWdc2EXiGnTIi3XzO5YHqAoOl4pnFqaWQhTJEs3UktxHFd root@petalinux Fingerprint: sha1!! 17:82:7b:35:1a:96:95:ee:61:83:c3:5b:4f:8b:91:ad:0d:b1:71:17 dropbear. Starting internet superserver: inetd. Starting syslogd/klogd: done Starting tcf-agent: OK PetaLinux 2019.2 petalinux /dev/ttyPS0 petalinux login: [ 174.796851] [drm] Pid 2219 opened device [ 180.596032] [drm] Pid 2229 closed device
大変貴重な情報をありがとうございます。Xilinxから出ているEmbedded Platform、例えばzcu102用のものではHW(実機)はrootfsはsdcardのセカンドパーティションになっているようにも見えますが、qemuが使えています。emulation用はramdiskをしようしているという作りなのでしょうか。。。
返信削除vitisが生成するエミュレータ用のデータ生成がramdisk向けのように見えます。zcu102は持ってないので試していませんが、チュートリアルからはramdiskを使うことが前提に見えます。
削除また、qemuでの動作はsd1を使う限りは問題なく動くと思いますので、zcu102は動作すると思います。