[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Testing sysbus devices

From: Thomas Huth
Subject: Re: [Qemu-devel] Testing sysbus devices
Date: Mon, 18 Feb 2019 14:43:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0

On 18/02/2019 07.07, Stephen Checkoway wrote:
> Hi all,
> I've been working on some improvements to the pflash_cfi02 block device 
> (interleaved flash devices similar to pflash_cfi01, multi-sector erase, 
> nonuniform sector sizes, and some bug fixes and I'm planning on implementing 
> sector erase suspend/resume commands in the near future).
> There appear to be no existing tests for this device and I'm unsure what the 
> appropriate way to add tests for sysbus devices is. -device can't be used 
> because sysbus devices aren't user-creatable (and even if they were, creating 
> the device wouldn't be sufficient since it wouldn't connect it to the sysbus).
> Any suggestions would be appreciated.

I think you could use one of the machines that has a cfi02 on board. For
example: Write some random data to a temporary file. Run qemu with:

 QTestState *qts;
 qts = qtest_initf(" qemu-system-arm -M musicpal,accel=qtest "
                "-drive if=pflash,file=%s,format=raw", filename);

Then you should be able to access the device with the qtest_read/write
functions, e.g. use "qtest_memread(qts, 0x100000000ULL, ...)" to read
the contents of the device. I haven't tried that though, that's just my
quick assumption from looking at hw/arm/musicpal.c ...


reply via email to

[Prev in Thread] Current Thread [Next in Thread]