Re: add sp804 timer to virt 6.2 target

2024-10-25 Thread Peter Maydell
On Fri, 25 Oct 2024 at 06:42, yfliu2008  wrote:
> I am wondering if the qemu-system-arm v6.2 "virt" target allows one to add 
> memory mapped sp804 timer device? if so, what command line options shall be 
> used?

No; you can't add memory-mapped devices to a board
using command line options. Only C code in QEMU itself
can create and wire up memory-mapped devices like that.

(The intention with the "virt" board is that you should
use the CPU's own 'generic timer' functionality, which
is accessed via CPU system registers.)

thanks
-- PMM



MTD support for aarch64 virt?

2024-10-25 Thread William Tang
Hi,

Does qemu aarch64 virt support MTD? When I use "qemu-system-aarch64 -machine 
virt -cpu host -bios u-boot.bin -nographic -drive 
if=mtd,format=raw,file=/tmp/flash.img", it shows " machine type does not 
support if=mtd,bus=0,unit=0".  I want to simulate a device with SPI NAND flash, 
is there a machine support that? Any thoughts to support the flash in virt?

Regards,
William