Xilinx / systemctlm-cosim-demo

QEMU libsystemctlm-soc co-simulation demos.
https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/862421112/Co-simulation
Other
131 stars 47 forks source link

ZYNQMP Demo Fails to boot Linux #30

Open sarmadsalman-RS opened 2 years ago

sarmadsalman-RS commented 2 years ago

I have compiled the Linux kernel with the lmac2 Lewiz driver but it fails to boot. Kernel gets stuck at: ledtrig-cpu: registered to indicate activity on CPUs

I have used the Rev1.0 DTB inside the /boot/dts/xilinx folder. Please let me know. Following is the command i have used for initializing QEMU: - /home/users/ssalman/QEMU/2/qemu/build/aarch64-softmmu/qemu-system-aarch64 -M arm-generic-fdt -hw-dtb /home/users/ssalman/QEMU/2/qemu/build/qemu-devicetrees/LATEST/SINGLE_ARCH/zcu102-arm.cosim.dtb -machine-path /home/users/ssalman/Regressions/Reg1/ZYNQ_MP/machine-zynqmp -serial mon:stdio -display none -netdev user,id=net0 -netdev user,id=net1 -netdev user,id=net2 -netdev user,id=net3 -netdev user,id=net4 -net nic,model=cadence_gem,netdev=net0 -net nic,model=cadence_gem,netdev=net1 -net nic,model=cadence_gem,netdev=net2 -net nic,model=cadence_gem,netdev=net3 -device remote-port-net,rp-adaptor0=/amba@0/cosim@0,rp-chan0=256,rp-chan1=266,netdev=net4 -m 2G -machine linux=yes -kernel /home/users/ssalman/QEMU/Linux_LMAC2/linux_for_aarch64/arch/arm64/boot/Image -dtb /home/users/ssalman/QEMU/Linux_LMAC2/linux_for_aarch64/arch/arm64/boot/dts/xilinx/zynqmp-zcu102-rev1.0.dtb -append "rdinit=/sbin/init console=ttyPS0 earlycon=cdns,mmio,0xFF000000,115200n8 nr_cpus=1 cma=256MiB"

SystemC command is like this: - SystemC/systemctlm-cosim-demo/zynqmp_lmac2_demo unix:/home/users/ssalman/Regressions/Reg1/ZYNQ_MP/machine-zynqmp/qemu-rport-_amba@0_cosim@0 1000000

And following is the boot sequence of the Linux kernel: - [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.8.0-123824-g8a88c94293e9 (ssalman@rslpt09.rapidsilicon.local) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #23 SMP PREEMPT Fri Aug 5 14:39:59 PKT 2022 [ 0.000000] Machine model: ZynqMP ZCU102 Rev1.0 [ 0.000000] earlycon: cdns0 at MMIO 0x00000000ff000000 (options '115200n8') [ 0.000000] printk: bootconsole [cdns0] enabled [ 0.000000] efi: UEFI not found. [ 0.000000] cma: Reserved 256 MiB at 0x0000000070000000 [ 0.000000] NUMA: No NUMA configuration found [ 0.000000] NUMA: Faking a node at [mem 0x0000000000000000-0x000000007fffffff] [ 0.000000] NUMA: NODE_DATA [mem 0x6fbde100-0x6fbdffff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x0000000000000000-0x000000003fffffff] [ 0.000000] DMA32 [mem 0x0000000040000000-0x000000007fffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x0000000000000000-0x000000007fffffff] [ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000007fffffff] [ 0.000000] psci: probing for conduit method from DT. [ 0.000000] psci: PSCIv0.2 detected in firmware. [ 0.000000] psci: Using standard PSCI v0.2 function IDs [ 0.000000] psci: Trusted OS migration not required [ 0.000000] Number of cores (4) exceeds configured maximum of 1 - clipping [ 0.000000] percpu: Embedded 23 pages/cpu s53912 r8192 d32104 u94208 [ 0.000000] Detected VIPT I-cache on CPU0 [ 0.000000] CPU features: detected: ARM erratum 845719 [ 0.000000] CPU features: detected: ARM erratum 843419 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: rdinit=/sbin/init console=ttyPS0 earlycon=cdns,mmio,0xFF000000,115200n8 nr_cpus=1 cma=256MiB [ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear) [ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear) [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off [ 0.000000] software IO TLB: mapped [mem 0x3bfff000-0x3ffff000] (64MB) [ 0.000000] Memory: 1699220K/2097152K available (13884K kernel code, 2170K rwdata, 7436K rodata, 5568K init, 481K bss, 135788K reserved, 262144K cma-reserved) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] rcu: Preemptible hierarchical RCU implementation. [ 0.000000] rcu: RCU event tracing is enabled. [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1. [ 0.000000] Trampoline variant of Tasks RCU enabled. [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies. [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0 [ 0.000000] GIC: Adjusting CPU interface base to 0x00000000f902f000 [ 0.000000] GIC: Using split EOI/Deactivate mode [ 0.000000] random: get_random_bytes called from start_kernel+0x310/0x4e4 with crng_init=0 [ 0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (phys). [ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns [ 0.000264] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns [ 0.026526] Console: colour dummy device 80x25 [ 0.034123] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000) [ 0.035022] pid_max: default: 32768 minimum: 301 [ 0.042204] LSM: Security Framework initializing [ 0.044999] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.045776] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear) [ 0.152632] rcu: Hierarchical SRCU implementation. [ 0.171723] EFI services will not be available. [ 0.176382] smp: Bringing up secondary CPUs ... [ 0.176883] smp: Brought up 1 node, 1 CPU [ 0.177064] SMP: Total of 1 processors activated. [ 0.179523] CPU features: detected: 32-bit EL0 Support [ 0.180030] CPU features: detected: CRC32 instructions [ 0.180234] CPU features: detected: 32-bit EL1 Support [ 0.778065] CPU: All CPU(s) started at EL2 [ 0.780014] alternatives: patching kernel code [ 0.809877] devtmpfs: initialized [ 0.856287] KASLR disabled due to lack of seed [ 0.864759] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns [ 0.867176] futex hash table entries: 256 (order: 2, 16384 bytes, linear) [ 0.889140] pinctrl core: initialized pinctrl subsystem [ 0.914698] thermal_sys: Registered thermal governor 'step_wise' [ 0.914830] thermal_sys: Registered thermal governor 'power_allocator' [ 0.922356] DMI not present or invalid. [ 0.948970] NET: Registered protocol family 16 [ 0.956737] DMA: preallocated 256 KiB GFP_KERNEL pool for atomic allocations [ 0.957691] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations [ 0.960030] DMA: preallocated 256 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations [ 0.962222] audit: initializing netlink subsys (disabled) [ 0.975475] audit: type=2000 audit(0.744:1): state=initialized audit_enabled=0 res=1 [ 0.999351] cpuidle: using governor menu [ 1.004445] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers. [ 1.008128] ASID allocator initialised with 65536 entries [ 1.024896] Serial: AMBA PL011 UART driver [ 1.191374] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages [ 1.192158] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages [ 1.193999] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages [ 1.194188] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages [ 1.241046] cryptd: max_cpu_qlen set to 1000 [ 1.289787] ACPI: Interpreter disabled. [ 1.304856] iommu: Default domain type: Translated [ 1.318352] vgaarb: loaded [ 1.324251] SCSI subsystem initialized [ 1.334738] usbcore: registered new interface driver usbfs [ 1.335472] usbcore: registered new interface driver hub [ 1.337876] usbcore: registered new device driver usb [ 1.341082] pps_core: LinuxPPS API ver. 1 registered [ 1.343301] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it [ 1.343835] PTP clock support registered [ 1.348419] EDAC MC: Ver: 3.0.0 [ 1.365509] FPGA manager framework [ 1.370287] Advanced Linux Sound Architecture Driver Initialized. [ 1.406684] clocksource: Switched to clocksource arch_sys_counter [ 1.419985] VFS: Disk quotas dquot_6.6.0 [ 1.420440] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 1.428065] pnp: PnP ACPI: disabled [ 1.506100] NET: Registered protocol family 2 [ 1.530699] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear) [ 1.533674] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear) [ 1.537238] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear) [ 1.540250] TCP: Hash tables configured (established 16384 bind 16384) [ 1.549182] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 1.551347] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear) [ 1.559583] NET: Registered protocol family 1 [ 1.583086] RPC: Registered named UNIX socket transport module. [ 1.583613] RPC: Registered udp transport module. [ 1.583776] RPC: Registered tcp transport module. [ 1.583930] RPC: Registered tcp NFSv4.1 backchannel transport module. [ 1.586545] PCI: CLS 0 bytes, default 64 [ 1.609053] hw perfevents: enabled with armv8_pmuv3 PMU driver, 5 counters available [ 1.611851] kvm [1]: IPA Size Limit: 40bits [ 1.625497] kvm [1]: vgic interrupt IRQ1 [ 1.631432] kvm [1]: Hyp mode initialized successfully [ 1.709029] Initialise system trusted keyrings [ 1.716318] workingset: timestamp_bits=44 max_order=19 bucket_order=0 [ 1.768685] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 1.777966] NFS: Registering the id_resolver key type [ 1.778811] Key type id_resolver registered [ 1.778964] Key type id_legacy registered [ 1.781048] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 1.783701] 9p: Installing v9fs 9p2000 file system support [ 1.872033] Key type asymmetric registered [ 1.872423] Asymmetric key parser 'x509' registered [ 1.872874] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245) [ 1.874939] io scheduler mq-deadline registered [ 1.875178] io scheduler kyber registered [ 1.926023] EINJ: ACPI disabled. [ 1.994970] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 2.016789] SuperH (H)SCI(F) driver initialized [ 2.020319] msm_serial: driver initialized [ 2.110013] loop: module loaded [ 2.115837] megasas: 07.714.04.00-rc1 [ 2.150579] libphy: Fixed MDIO Bus: probed [ 2.156434] tun: Universal TUN/TAP device driver, 1.6 [ 2.167361] thunder_xcv, ver 1.0 [ 2.168187] thunder_bgx, ver 1.0 [ 2.170024] nicpf, ver 1.0 [ 2.178273] hclge is initializing [ 2.179022] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version [ 2.181474] hns3: Copyright (c) 2017 Huawei Corporation. [ 2.184533] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 2.184790] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 2.185223] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k [ 2.187327] e1000e: Copyright(c) 1999 - 2015 Intel Corporation. [ 2.187916] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k [ 2.190044] igb: Copyright (c) 2007-2014 Intel Corporation. [ 2.190713] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k [ 2.193209] igbvf: Copyright (c) 2009 - 2012 Intel Corporation. [ 2.196298] sky2: driver version 1.30 [ 2.200299] VFIO - User Level meta-driver version: 0.3 [ 2.212846] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.213197] ehci-pci: EHCI PCI platform driver [ 2.213843] ehci-platform: EHCI generic platform driver [ 2.216481] ehci-orion: EHCI orion driver [ 2.218952] ehci-exynos: EHCI Exynos driver [ 2.221024] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 2.221638] ohci-pci: OHCI PCI platform driver [ 2.224131] ohci-platform: OHCI generic platform driver [ 2.226625] ohci-exynos: OHCI Exynos driver [ 2.233132] usbcore: registered new interface driver usb-storage [ 2.250906] i2c /dev entries driver [ 2.276048] CPUidle PSCI: Invalid PSCI power state 0x40000000 [ 2.278040] CPUidle PSCI: CPU 0 failed to PSCI idle [ 2.281162] sdhci: Secure Digital Host Controller Interface driver [ 2.282998] sdhci: Copyright(c) Pierre Ossman [ 2.286139] Synopsys Designware Multimedia Card Interface Driver [ 2.293937] sdhci-pltfm: SDHCI platform and OF driver helper [ 2.308074] ledtrig-cpu: registered to indicate activity on CPUs