Hi Heinrich > From: Heinrich Schuchardt [mailto:xypron.g...@gmx.de] > Sent: Thursday, August 06, 2020 6:45 PM > To: Bin Meng; Rick Jian-Zhi Chen(陳建志) > Cc: U-Boot Mailing List > Subject: RISC-V: crash in riscv_get_time() > > Hello Rick, hello Bin, > > when I run qemu-riscv64_defconfig using > > qemu-system-riscv64 -machine virt -m 1G -nographic \ > -bios u-boot \ > -device virtio-net-device,netdev=net0 \ > -netdev user,id=net0,tftp=tftp > > a crash occurs in riscv_get_time() when executing readq(). > > $ qemu-system-riscv64 --version > QEMU emulator version 5.0.0 (Debian 1:5.0-13) > > Looking at doc/board/emulation/qemu-riscv.rst this should work. > > Is there something missing in the documentation? >
You can try this ./qemu-system-riscv64 -nographic -machine virt -bios u-boot -device virtio-net-device,netdev=net0 -netdev user,id=net0,tftp=tftp It can work as below: U-Boot 2020.10-rc1-00299-g89150a9 (Aug 06 2020 - 19:14:01 +0800) CPU: rv64imafdcsu Model: riscv-virtio,qemu DRAM: 128 MiB In: uart@10000000 Out: uart@10000000 Err: uart@10000000 Net: eth0: virtio-net#0 Hit any key to stop autoboot: 0 => help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure blkcache - block cache diagnostics and control boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootefi - Boots an EFI payload from memory bootelf - Boot from an ELF image in memory booti - boot Linux kernel 'Image' format from memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image cmp - memory compare coninfo - print console devices and information cp - memory copy cpu - display information about CPUs crc32 - checksum calculation dhcp - boot image via network using DHCP/TFTP protocol dm - Driver model low level access echo - echo args to console editenv - edit environment variable env - environment handling commands erase - erase FLASH memory exit - exit script ext2load - load binary file from a Ext2 filesystem ext2ls - list files in a directory (default /) ext4load - load binary file from a Ext4 filesystem ext4ls - list files in a directory (default /) ext4size - determine a file's size false - do nothing, unsuccessfully fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fatmkdir - create a directory fatrm - delete a file fatsize - determine a file's size fatwrite - write file into a dos filesystem fdt - flattened device tree utility commands flinfo - print FLASH memory information fstype - Look up a filesystem type fstypes - List supported filesystem types go - start application at address 'addr' gzwrite - unzip and write memory to block device help - print command description/usage iminfo - print header information for application image imxtract - extract a part of a multi-image itest - return true/false on integer compare ln - Create a symbolic link load - load binary file from a filesystem loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loadx - load binary file over serial line (xmodem mode) loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range ls - list files in a directory (default /) lzmadec - lzma uncompress a memory region md - memory display mm - memory modify (auto-incrementing address) mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) nvme - NVM Express sub-system panic - Panic with optional message part - disk partition related commands pci - list and access PCI Configuration Space ping - send ICMP ECHO_REQUEST to network host poweroff - Perform POWEROFF of the device printenv - print environment variables protect - enable or disable FLASH write protection pxe - commands to get and boot from pxe files reset - Perform RESET of the CPU run - run commands in an environment variable save - save file to a filesystem setenv - set environment variables setexpr - set environment variable as the result of eval expression showvar - print local hushshell variables size - determine a file's size sleep - delay execution for some time source - run script from memory sysboot - command to get and boot from syslinux files test - minimal test like /bin/sh tftpboot - boot image via network using TFTP protocol true - do nothing, successfully unlz4 - lz4 uncompress a memory region unzip - unzip a memory region version - print monitor, compiler and linker version virtio - virtio block devices sub-system => Thanks, Rick > Best regards > > Heinrich