Age | Commit message (Collapse) | Author |
|
Note: This affects libhal/ks_token.c, which uses the keystore driver directly.
|
|
|
|
|
|
|
|
|
|
|
|
Wrong-block-type race condition errors went away after adding the WIP
check after flash write operations, then came back once (isolated
incident) while running a series of tests which had written enough
flash blocks that ks_flash may have finally had to erase something
rather than just zeroing.
Code inspection confirmed that the erase code was not waiting for WIP
to clear before exiting. Difficult to prove that this was the cause
of an unreproducible failure, but seems like a likely candidate given
previous behavior and change should be harmless, so adding it.
Timeout for this flag check is 2000 ms, which is what other
erase-related WIP flag checks were already using.
|
|
Absence of this check created a nasty race condition in
sw/libhal/ks_flash.c, which didn't show up until we had test code
which attempted to delete a long series of keys in quick succession.
I'm not aware of any sane reason why we would ever want to skip this
check, so it's unconditional and applies to all of the SPI flash code,
not just the keystore flash code.
|
|
|
|
|
|
|
|
Also add code to erase FPGA config memory and check status of FPGA_DONE.
|
|
Move the N25Q128 code to it's own file in order to be able to reuse it
for the keystore memory code.
|