Stephen Checkoway <stephen.checko...@oberlin.edu> writes: > On Feb 18, 2019, at 08:43, Thomas Huth <th...@redhat.com> wrote: > >>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).
Any chance you could do multiple region support, too? >>> 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); > > If I do that, will it be possible for the test to override the properties set > by pflash_cfi02_register? It looks like I should be able to use -global to > set properties that aren't set explicitly. Yes. Won't work for properties set by pflash_cfi02_register(), though. To test the full range of values there, you'd have to make them configurable somehow. We currently don't have a good way to do that. Please see Subject: Re: Configuring pflash devices for OVMF firmware Message-ID: <87mun8gd2x....@dusky.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2019-02/msg01734.html