This series addresses the major problem lazy mode switching of the pflash_cfi02 currently has: code execution from this ROM can fail.
The reason for this was a conceptual issue that was papered over by a bug in the original implementation. Both are addressed here by - allowing code execution from marked I/O memory regions (specifically ROM devices) - performing the lazy switch back of cfi02 from reprogramming to ROM mode via a timer To recall why this effort is needed: Programming 7 MB of an 8 MB flash that does not support the unlock bypass command takes 5:40 minutes with this optimization and about 3 h (estimated, it became boring to wait for completion) without it. Jan Kiszka (4): cfi02: Fix a debug print Add support for execution from ROMs in IO device mode cfi: Mark flash memory executable cfi02: Use timer-based ROM mode switch cpu-common.h | 2 ++ exec-all.h | 2 +- exec.c | 2 +- hw/pflash_cfi01.c | 9 +++++---- hw/pflash_cfi02.c | 46 ++++++++++++++++++++++++++++++++++------------ 5 files changed, 43 insertions(+), 18 deletions(-)