Comparing changes
Open a pull request
base repository: qemu/qemu
base: master
head repository: stevecheckoway/qemu
compare: pflash02
- 11 commits
- 5 files changed
- 2 contributors
Commits on Apr 19, 2019
-
capstone: Support capstone/capstone.h
Starting with version 4 of capstone, the header files live in the `$prefix/include/capstone` directory. This modifies the configure script to check for <capstone/capstone.h> if <capstone.h> cannot be found. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu>
-
block/pflash_cfi02: Add test for supported commands
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 <stephen.checkoway@oberlin.edu>
-
block/pflash_cfi02: Refactor, NFC intended
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 intended with this commit. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu>
Commits on Apr 26, 2019
-
block/pflash_cfi02: Fix command address comparison
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 <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Implement intereleaved flash devices
It's common for multiple narrow flash chips to be hooked up in parallel to support wider buses. For example, four 8-bit wide flash chips (x8) may be combined in parallel to produce a 32-bit wide device. Similarly, two 16-bit wide chips (x16) may be combined. This commit introduces `device-width` and `max-device-width` properties, similar to pflash_cfi01, with the following meanings: - `width`: The width of the logical, qemu device (same as before); - `device-width`: The width of an individual flash chip, defaulting to `width`; and - `max-device-width`: The maximum width of an individual flash chip, defaulting to `device-width`. Nothing needs to change to support reading such interleaved devices but commands (e.g., erase and programming) must be sent to all devices at the same time or else the various chips will be in different states. For example, a 4-byte wide logical device can be composed of four x8/x16 devices in x8 mode. That is, each device supports both x8 or x16 and they're being used in the byte, rather than word, mode. This configuration would have `width=4`, `device-width=1`, and `max-device-width=2`. In addition to commands being sent to all devices, guest firmware expects the status and CFI queries to be replicated for each device. (The one exception to the response replication is that each device gets to report its own status bit DQ7 while programming because its value depends on the value being programmed which will usually differ for each 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 Checkoway <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Implement nonuniform sector sizes
Some flash chips support sectors of different sizes. For example, the AMD AM29LV160DT has 31 64 kB sectors, one 32 kB sector, two 8 kB sectors, and a 16 kB sector, in that order. The AM29LV160DB has those in the reverse order. The `num-blocks` and `sector-length` properties work exactly as they did before: a flash device with uniform sector lengths. To get non-uniform sector lengths for up to four regions, the following properties may be set - region 0. `num-blocks0` and `sector-length0`; - region 1. `num-blocks1` and `sector-length1`; - region 2. `num-blocks2` and `sector-length2`; and - region 3. `num-blocks3` and `sector-length3`. If the uniform and nonuniform properties are set, then both must specify a flash device with the same total size. It would be better to disallow both being set, or make `num-blocks0` and `sector-length0` alias `num-blocks` and `sector-length`, but that would make testing currently impossible. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Fix CFI in autoselect mode
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 <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Fix reset command not ignored during erase
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 on going. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu>
-
block/pflash_cfi02: Implement multi-sector erase
After two unlock cycles and a sector erase command, the AMD flash chips start a 50 us erase time out. Any additional sector erase commands add a sector to be erased and restart the 50 us timeout. During the timeout, status bit DQ3 is cleared. After the time out, DQ3 is asserted during erasure. Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Implement erase suspend/resume
During a sector erase (but not a chip erase), the embeded erase program can be suspended. Once suspended, the sectors not selected for erasure may be read and programmed. Autoselect mode is allowed during erase suspend mode. Presumably, CFI queries are similarly allowed so this commit allows them 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 <stephen.checkoway@oberlin.edu> Acked-by: Thomas Huth <thuth@redhat.com>
-
block/pflash_cfi02: Use the chip erase time specified in the CFI table
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 Checkoway <stephen.checkoway@oberlin.edu>
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...pflash02