Re: [Qemu-devel] [PULL 27/27] hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit

2019-07-08 Thread Stephen Checkoway
> On Jul 4, 2019, at 08:45, Philippe Mathieu-Daudé wrote: > > Cc'ing PPC/taihu_405ep and ARM/Digic4 maintainers. > > On 7/3/19 6:36 PM, Philippe Mathieu-Daudé wrote: >> On 7/3/19 6:20 PM, Stephen Checkoway wrote: >>>> On Jul 3, 2019, at 12:02, Philippe

Re: [Qemu-devel] [PULL 27/27] hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit

2019-07-03 Thread Stephen Checkoway
> On Jul 3, 2019, at 12:02, Philippe Mathieu-Daudé wrote: > > On 7/3/19 5:52 PM, Stephen Checkoway wrote: >> >> >>> On Jul 1, 2019, at 20:59, Philippe Mathieu-Daudé wrote: >>> >>> Parallel NOR flashes are limited to 16-bit bus accesses. &g

Re: [Qemu-devel] [PULL 27/27] hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit

2019-07-03 Thread Stephen Checkoway
aque, hwaddr offset, > uint64_t value, > static const MemoryRegionOps pflash_cfi02_ops = { > .read = pflash_read, > .write = pflash_write, > +.impl.max_access_size = 2, > .valid.min_access_size = 1, > .valid.max_access_size = 4, > .endianness = DEVICE_NATIVE_ENDIAN, > -- > 2.20.1 > -- Stephen Checkoway

Re: [Qemu-devel] [PATCH v5 02/28] hw/block/pflash: Simplify trace_pflash_io_read/write()

2019-06-27 Thread Stephen Checkoway
"offset:0x%04"PRIx64" width:%d value:0x%0*x > cmd:0x%02x wcycle:%u" > +pflash_io_write(uint64_t offset, int width, int fmt_width, uint32_t value, > uint8_t wcycle) "offset:0x%04"PRIx64" width:%d value:0x%0*x wcycle:%u" > pflash_data_read8(uint64_t offset, uint32_t value) "data offset:0x%04"PRIx64" > value:0x%02x" > pflash_data_read16(uint64_t offset, uint32_t value) "data > offset:0x%04"PRIx64" value:0x%04x" > pflash_data_read32(uint64_t offset, uint32_t value) "data > offset:0x%04"PRIx64" value:0x%08x" > -- > 2.20.1 > Either way, Signed-off-by: Stephen Checkoway (And please let me know if I'm doing code review incorrectly or if that should be Reviewed-by or whatever.) Cheers, Steve -- Stephen Checkoway

Re: [Qemu-devel] [PATCH v4 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-06-25 Thread Stephen Checkoway
> On Jun 25, 2019, at 04:32, Markus Armbruster wrote: > > Stephen Checkoway writes: > >>> On Jun 24, 2019, at 12:05, Philippe Mathieu-Daudé wrote: >>> >>>> On 6/22/19 2:25 PM, Philippe Mathieu-Daudé wrote: >>>> Hi Stephen, >>>

Re: [Qemu-devel] [PATCH v4 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-06-24 Thread Stephen Checkoway
> On Jun 24, 2019, at 12:05, Philippe Mathieu-Daudé wrote: > >> On 6/22/19 2:25 PM, Philippe Mathieu-Daudé wrote: >> Hi Stephen, >> >> This series haven't fall through the cracks, however it is taking me >> longer than expected to review it. >

[Qemu-devel] [PATCH v4 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-26 Thread Stephen Checkoway
as well. Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to determine the current state of sector erasure, these bits are properly implemented. Signed-off-by: Stephen Checkoway Acked-by: Thomas Huth --- hw/block/pflash_cfi02.c | 153

[Qemu-devel] [PATCH v4 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-26 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Chec

[Qemu-devel] [PATCH v4 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-26 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway Acked-by: Thomas Huth --- hw/block/pflash_cfi02.c | 94 +++ tests/pflash-cfi02-test.c | 59 ++-- 2 files changed, 131 insertions(+), 22 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block

[Qemu-devel] [PATCH v4 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-26 Thread Stephen Checkoway
ach device.) Testing is limited to 16-bit wide devices due to the current inability to override the properties set by `pflash_cfi02_register`, but multiple configurations are tested. Stop using global_qtest. Instead, package the qtest variable inside the FlashConfig structure. Signed-off-by: Stephen

[Qemu-devel] [PATCH v4 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-26 Thread Stephen Checkoway
would make testing currently impossible. Signed-off-by: Stephen Checkoway Acked-by: Thomas Huth --- hw/block/pflash_cfi02.c | 177 +--- tests/pflash-cfi02-test.c | 185 -- 2 files changed, 265 insertions(+), 97 deletions

[Qemu-devel] [PATCH v4 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-26 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway Acked-by: Thomas Huth --- hw/block/pflash_cfi02.c | 21

[Qemu-devel] [PATCH v4 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-26 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 221 +--- 1 file changed, 95 insertions(+), 126 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index f2c6201f81..4b7af71806 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw

[Qemu-devel] [PATCH v4 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-26 Thread Stephen Checkoway
Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway Acked-by: Thomas Huth --- hw/block

[Qemu-devel] [PATCH v4 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-26 Thread Stephen Checkoway
is on going. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index be10036886..cb1160eb35 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c

[Qemu-devel] [PATCH v4 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-26 Thread Stephen Checkoway
Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen Checkoway --- tests

[Qemu-devel] [PATCH v4 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-26 Thread Stephen Checkoway
. Changes from v3: - Replace err.h/err() with glib functions; and - Reformat qtest_initf lines. Stephen Checkoway (10): block/pflash_cfi02: Add test for supported commands block/pflash_cfi02: Refactor, NFC intended block/pflash_cfi02: Fix command address comparison block/pflash_cfi02: Implement

Re: [Qemu-devel] [PATCH v2] hw/char/escc: Lower irq when transmit buffer is filled

2019-04-19 Thread Stephen Checkoway
> On Apr 18, 2019, at 08:13, Philippe Mathieu-Daudé wrote: > > On 4/17/19 2:50 AM, Stephen Checkoway wrote: >> The SCC/ESCC will briefly stop asserting an interrupt when the >> transmit FIFO is filled. >> >> This code doesn't model the transmit FIFO/shi

[Qemu-devel] [PATCH v3] hw/char/escc: Lower irq when transmit buffer is filled

2019-04-19 Thread Stephen Checkoway
ently pending. Signed-off-by: Stephen Checkoway Reviewed-by: Philippe Mathieu-Daudé --- I added a sentence about the Z85C30 necessitating this to the commit message. hw/char/escc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/char/escc.c b/hw/char/escc.c index 628f5f81f7..c5b05

Re: [Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-18 Thread Stephen Checkoway
sector length and number of sectors - erase suspend supported -- Stephen Checkoway

Re: [Qemu-devel] [PATCH v3 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-18 Thread Stephen Checkoway
> On Apr 18, 2019, at 00:47, Thomas Huth wrote: > > On 18/04/2019 00.01, Stephen Checkoway wrote: >> Test the AMD command set for parallel flash chips. This test uses an >> ARM musicpal board with a pflash drive to test the following list of >> currently-supporte

[Qemu-devel] [PATCH v3 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-17 Thread Stephen Checkoway
is on going. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index be10036886..cb1160eb35 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c

[Qemu-devel] [PATCH v3 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-17 Thread Stephen Checkoway
ach device.) Testing is limited to 16-bit wide devices due to the current inability to override the properties set by `pflash_cfi02_register`, but multiple configurations are tested. Stop using global_qtest. Instead, package the qtest variable inside the FlashConfig structure. Signed-off-by: Stephen

[Qemu-devel] [PATCH v3 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-17 Thread Stephen Checkoway
Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 8

[Qemu-devel] [PATCH v3 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-17 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 94 +++ tests/pflash-cfi02-test.c | 59 ++-- 2 files changed, 131 insertions(+), 22 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index cb1160eb35

[Qemu-devel] [PATCH v3 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-17 Thread Stephen Checkoway
as well. Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to determine the current state of sector erasure, these bits are properly implemented. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 153 ++ tests/pflash-cfi02-test.c

[Qemu-devel] [PATCH v3 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-17 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Chec

[Qemu-devel] [PATCH v3 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-17 Thread Stephen Checkoway
Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen Checkoway --- tests

[Qemu-devel] [PATCH v3 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-17 Thread Stephen Checkoway
would make testing currently impossible. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 177 +--- tests/pflash-cfi02-test.c | 185 -- 2 files changed, 265 insertions(+), 97 deletions(-) diff --git a/hw/block

[Qemu-devel] [PATCH v3 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-17 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 21 + tests/pflash

[Qemu-devel] [PATCH v3 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-17 Thread Stephen Checkoway
. Stephen Checkoway (10): block/pflash_cfi02: Add test for supported commands block/pflash_cfi02: Refactor, NFC intended block/pflash_cfi02: Fix command address comparison block/pflash_cfi02: Implement intereleaved flash devices block/pflash_cfi02: Implement nonuniform sector sizes block

[Qemu-devel] [PATCH v3 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-17 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 221 +--- 1 file changed, 95 insertions(+), 126 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index f2c6201f81..4b7af71806 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw

Re: [Qemu-devel] [PATCH] hw/char/escc: Lower irq when transmit buffer is filled

2019-04-16 Thread Stephen Checkoway
escc_update_irq(s); which appears to do the right thing in my tests. Thank you, Steve -- Stephen Checkoway

[Qemu-devel] [PATCH v2] hw/char/escc: Lower irq when transmit buffer is filled

2019-04-16 Thread Stephen Checkoway
erted, no additional interrupts will ever fire. This fixes that situation by explicitly lowering the IRQ when a character is written to the buffer and no other interrupts are currently pending. Signed-off-by: Stephen Checkoway --- hw/char/escc.c | 7 +++ 1 file changed, 7 insertions(+) diff

Re: [Qemu-devel] [PATCH] hw/char/escc: Lower irq when transmit buffer is filled

2019-04-10 Thread Stephen Checkoway
On Apr 10, 2019, at 16:01, Philippe Mathieu-Daudé wrote: > On 3/6/19 12:01 PM, Paolo Bonzini wrote: >> On 05/03/19 06:10, Stephen Checkoway wrote: >>> The SCC/ESCC will briefly stop asserting an interrupt when the >>> transmit FIFO is filled. >>> >>&

Re: [Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-09 Thread Stephen Checkoway
that it is using unlock addresses 0x and 0x2AAA. My guess is this reflects a bug in some firmware and it should be using 0x555 and 0x2AA. I haven't seen any AMD pflash chips that used other unlock addresses, but I've only looked at about a dozen part sheets and I'm not sure w

Re: [Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-09 Thread Stephen Checkoway
Hi Phil, > On Apr 9, 2019, at 06:34, Philippe Mathieu-Daudé wrote: > > Hi Stephen, > > [Cc'ing Markus and Laszlo, we have similar interest in pflash01 testing] > > On 4/8/19 10:55 PM, Stephen Checkoway wrote: >> The goal of this patch series impleme

Re: [Qemu-devel] [PATCH 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-09 Thread Stephen Checkoway
qtest in there. The earlier patches would still use global_qtest. Would that be acceptable or would you prefer that global_qtest not appear in any of the patches? Or rather than putting it in the FlashConfig struct, I could just pass a separate parameter around. Whatever you prefer. -- Stephen Checkoway

[Qemu-devel] [PATCH v2 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-08 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Chec

[Qemu-devel] [PATCH v2 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-08 Thread Stephen Checkoway
as well. Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to determine the current state of sector erasure, these bits are properly implemented. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 153 ++ tests/pflash-cfi02-test.c

[Qemu-devel] [PATCH v2 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-08 Thread Stephen Checkoway
would make testing currently impossible. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 177 ++--- tests/pflash-cfi02-test.c | 179 +- 2 files changed, 265 insertions(+), 91 deletions(-) diff --git a/hw/block

[Qemu-devel] [PATCH v2 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-08 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 94 +++ tests/pflash-cfi02-test.c | 59 ++-- 2 files changed, 131 insertions(+), 22 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index cb1160eb35

[Qemu-devel] [PATCH v2 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-08 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 21 + tests/pflash

[Qemu-devel] [PATCH v2 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-08 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 221 +--- 1 file changed, 95 insertions(+), 126 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index f2c6201f81..4b7af71806 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw

[Qemu-devel] [PATCH v2 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-08 Thread Stephen Checkoway
ach device.) Testing is limited to 16-bit wide devices due to the current inability to override the properties set by `pflash_cfi02_register`, but multiple configurations are tested. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 270 +--- tests/pflash-cfi02-te

[Qemu-devel] [PATCH v2 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-08 Thread Stephen Checkoway
is on going. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index be10036886..cb1160eb35 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c

[Qemu-devel] [PATCH v2 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-08 Thread Stephen Checkoway
Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 8

[Qemu-devel] [PATCH v2 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-08 Thread Stephen Checkoway
Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen Checkoway --- tests

[Qemu-devel] [PATCH v2 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-08 Thread Stephen Checkoway
behavior, probably due to a bug in the firmware itself. Changes from v1: - Fix missing spaces around *, -, and ?. - Fix missing Signed-off-by line on patch 7 - Replace use of errc with g_printerr and exit Stephen Checkoway (10): block/pflash_cfi02: Add test for supported commands block

[Qemu-devel] [PATCH 08/10] block/pflash_cfi02: Implement multi-sector erase

2019-04-08 Thread Stephen Checkoway
. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 94 +++ tests/pflash-cfi02-test.c | 59 ++-- 2 files changed, 131 insertions(+), 22 deletions(-) diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index fa6929b9b6

[Qemu-devel] [PATCH 02/10] block/pflash_cfi02: Refactor, NFC intended

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Simplify and refactor for upcoming commits. In particular, pull out all of the code to modify the status into simple helper functions. Status handling becomes more complex once multiple chips are interleaved to produce a single device. No change in functionality is

[Qemu-devel] [PATCH 09/10] block/pflash_cfi02: Implement erase suspend/resume

2019-04-08 Thread Stephen Checkoway
as well. Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to determine the current state of sector erasure, these bits are properly implemented. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 153 ++ tests/pflash-cfi02-test.c

[Qemu-devel] [PATCH 03/10] block/pflash_cfi02: Fix command address comparison

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Most AMD commands only examine 11 bits of the address. This masks the addresses used in the comparison to 11 bits. The exceptions are word or sector addresses which use offset directly rather than the shifted offset, boff. Signed-off-by: Stephen Checkoway --- hw/block

[Qemu-devel] [PATCH 10/10] block/pflash_cfi02: Use the chip erase time specified in the CFI table

2019-04-08 Thread Stephen Checkoway
When erasing the chip, use the typical time specified in the CFI table rather than arbitrarily selecting 5 seconds. Since the currently unconfigurable value set in the table is 12, this means a chip erase takes 4096 ms so this isn't a big change in behavior. Signed-off-by: Stephen Chec

[Qemu-devel] [PATCH 04/10] block/pflash_cfi02: Implement intereleaved flash devices

2019-04-08 Thread Stephen Checkoway
ach device.) Testing is limited to 16-bit wide devices due to the current inability to override the properties set by `pflash_cfi02_register`, but multiple configurations are tested. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 270 +--- tests/pflash-cfi02-te

[Qemu-devel] [PATCH 01/10] block/pflash_cfi02: Add test for supported commands

2019-04-08 Thread Stephen Checkoway
From: Stephen Checkoway Test the AMD command set for parallel flash chips. This test uses an ARM musicpal board with a pflash drive to test the following list of currently-supported commands. - Autoselect - CFI - Sector erase - Chip erase - Program - Unlock bypass - Reset Signed-off-by: Stephen

[Qemu-devel] [PATCH 07/10] block/pflash_cfi02: Fix reset command not ignored during erase

2019-04-08 Thread Stephen Checkoway
When the flash device is performing a chip erase, all commands are ignored. When it is performing a sector erase, only the erase suspend command is valid, which is currently not supported. In particular, the reset command should not cause the device to reset to read array mode while programming is

[Qemu-devel] [PATCH 06/10] block/pflash_cfi02: Fix CFI in autoselect mode

2019-04-08 Thread Stephen Checkoway
After a flash device enters CFI mode from autoselect mode, the reset command returns the device to autoselect mode. An additional reset command is necessary to return to read array mode. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 21 + tests/pflash

[Qemu-devel] [PATCH 05/10] block/pflash_cfi02: Implement nonuniform sector sizes

2019-04-08 Thread Stephen Checkoway
would make testing currently impossible. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 177 ++--- tests/pflash-cfi02-test.c | 181 +- 2 files changed, 266 insertions(+), 92 deletions(-) diff --git a/hw/block

[Qemu-devel] [PATCH 00/10] block/pflash_cfi02: Implement missing AMD pflash functionality

2019-04-08 Thread Stephen Checkoway
behavior, probably due to a bug in the firmware itself. Stephen Checkoway (10): block/pflash_cfi02: Add test for supported commands block/pflash_cfi02: Refactor, NFC intended block/pflash_cfi02: Fix command address comparison block/pflash_cfi02: Implement intereleaved flash devices block

Re: [Qemu-devel] [PATCH] capstone: Support capstone/capstone.h

2019-04-01 Thread Stephen Checkoway
On Apr 1, 2019, at 21:28, Richard Henderson wrote: > Thanks. We should probably update our submodule to the v4 release as well. Is that something that you want with this patch? -- Stephen Checkoway

[Qemu-devel] [PATCH] capstone: Support capstone/capstone.h

2019-04-01 Thread Stephen Checkoway
Starting with version 4 of capstone, the header files live in the `$prefix/include/capstone` directory. This modifies the configure script to check for if cannot be found. Signed-off-by: Stephen Checkoway --- configure| 9 + include/disas/capstone.h | 4 2 files

Re: [Qemu-devel] [Qemu-trivial] [PATCH] block/pflash_cfi02: Fix memory leak and potential use-after-free

2019-03-06 Thread Stephen Checkoway
> On Mar 6, 2019, at 04:38, Laurent Vivier wrote: > > Applied to my trivial-patches branch. Great, thanks! Cheers, Steve

[Qemu-devel] [PATCH] hw/char/escc: Lower irq when transmit buffer is filled

2019-03-04 Thread Stephen Checkoway
erted, no additional interrupts will ever fire. This fixes that situation by explicitly lowering the IRQ when a character is written to the buffer. Signed-off-by: Stephen Checkoway --- hw/char/escc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/escc.c b/hw/char/escc.c index 628f5

Re: [Qemu-devel] x86 segment limits enforcement with TCG

2019-02-28 Thread Stephen Checkoway
e vast majority of x86 instructions access at most one segment, but off-hand, I can think of a handful that access two: - movs - cmps - push r/m32 - pop r/m32 - call m32 - call m16:m32 I'm not sure if there are others. -- Stephen Checkoway

Re: [Qemu-devel] x86 segment limits enforcement with TCG

2019-02-28 Thread Stephen Checkoway
to store 64-bits of data. If this store happens starting 4 bytes before the end of the segment, I believe this should either case #GP(0) or #SS(0), depending on the segment. But if the 64-bit store is broken into two 32-bit stores, the first may succeed and the second fail, leading to an inconsistent state. Do you have any thoughts on how this should be handled? Thank you, Steve -- Stephen Checkoway

Re: [Qemu-devel] x86 segment limits enforcement with TCG

2019-02-25 Thread Stephen Checkoway
roadly acceptable and the functionality is desired. If not, thank you Peter for answering my questions which enabled me to solve my problem. Cheers, Steve > On Feb 24, 2019, at 15:21, Stephen Checkoway > wrote: > > > >> On Feb 24, 2019, at 14:46, Peter Maydell wrote:

Re: [Qemu-devel] x86 segment limits enforcement with TCG

2019-02-24 Thread Stephen Checkoway
> On Feb 24, 2019, at 14:46, Peter Maydell wrote: > > On Sun, 24 Feb 2019 at 19:37, Stephen Checkoway > wrote: >> I think that something about adding the tcg_gen_brcond_tl is causing values >> to become dead and then qemu aborts. > > Yep -- all "TCG temp

[Qemu-devel] x86 segment limits enforcement with TCG

2019-02-24 Thread Stephen Checkoway
} for (i = 0; i < 4; ++i) { @@ -8482,6 +8515,7 @@ static void i386_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cpu) dc->T0 = tcg_temp_new(); dc->T1 = tcg_temp_new(); dc->A0 = tcg_temp_new(); +dc->A1 = tcg_temp_new(); dc->tmp0 = tcg_temp_new(); dc->tmp1_i64 = tcg_temp_new_i64(); -- Stephen Checkoway

Re: [Qemu-devel] Testing sysbus devices

2019-02-22 Thread Stephen Checkoway
k/pflash_cfi02.c#L154> and here <https://github.com/qemu/qemu/blob/master/hw/block/pflash_cfi02.c#L279>). If the chip size isn't a power of two, this breaks. -- Stephen Checkoway

Re: [Qemu-devel] Testing sysbus devices

2019-02-22 Thread Stephen Checkoway
ed (build-time constant). Gotcha, thanks for the info. It sounds like the code for the Intel command set chips (cfi01) and the AMD command set chips (cfi02) have different requirements for their use. Regards, Steve -- Stephen Checkoway

Re: [Qemu-devel] Testing sysbus devices

2019-02-21 Thread Stephen Checkoway
hub.com/qemu/qemu/compare/master...stevecheckoway:pflash02#diff-d33881bd0ef099e2f46ebd4797c653bcR738>.) Cheers, Steve -- Stephen Checkoway

Re: [Qemu-devel] Testing sysbus devices

2019-02-19 Thread Stephen Checkoway
are sector groups that can be locked/unlocked using high voltage. It seems easy enough to model this by configuring sectors as locked and refusing to erase or program them. Software command locking would probably involve implementing a few additional commands. I'm not sure what the others are. Which locking method do you need? -- Stephen Checkoway

[Qemu-devel] [PATCH] block/pflash_cfi02: Fix memory leak and potential use-after-free

2019-02-19 Thread Stephen Checkoway
Don't dynamically allocate the pflash's timer. But do use timer_del in an unrealize function to make sure that the timer can't fire after the pflash_t has been freed. Signed-off-by: Stephen Checkoway --- hw/block/pflash_cfi02.c | 15 +++ 1 file changed, 11 insertions(

Re: [Qemu-devel] Testing sysbus devices

2019-02-19 Thread Stephen Checkoway
On Feb 19, 2019, at 01:09, Markus Armbruster wrote: > Stephen Checkoway writes: > >> On Feb 18, 2019, at 13:08, Markus Armbruster wrote: >> >>> Any chance you could do multiple region support, too? >> >> Can you point me at the data sheet for a flas

Re: [Qemu-devel] Testing sysbus devices

2019-02-18 Thread Stephen Checkoway
On Feb 18, 2019, at 13:08, Markus Armbruster wrote: > Stephen Checkoway writes: > >> On Feb 18, 2019, at 08:43, Thomas Huth wrote: >> >>> On 18/02/2019 07.07, Stephen Checkoway wrote: >>>> Hi all, >>>> >>>> I'v

Re: [Qemu-devel] Testing sysbus devices

2019-02-18 Thread Stephen Checkoway
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. Thank you, -- Stephen Checkoway

[Qemu-devel] Testing sysbus devices

2019-02-18 Thread Stephen Checkoway
it wouldn't connect it to the sysbus). Any suggestions would be appreciated. Thank you, -- Stephen Checkoway