Comments
Patch
@@ -90,7 +90,7 @@ static void pflash_timer (void *opaque)
pfl->wcycle = 2;
} else {
cpu_register_physical_memory(pfl->base, pfl->total_len,
- pfl->off | IO_MEM_ROMD | pfl->fl_mem);
+ pfl->off | IO_MEM_ROMD | IO_MEM_EXEC | pfl->fl_mem);
pfl->wcycle = 0;
}
pfl->cmd = 0;
@@ -247,7 +247,8 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
if (!pfl->wcycle) {
/* Set the device in I/O access mode */
- cpu_register_physical_memory(pfl->base, pfl->total_len, pfl->fl_mem);
+ cpu_register_physical_memory(pfl->base, pfl->total_len,
+ pfl->fl_mem | IO_MEM_EXEC);
}
switch (pfl->wcycle) {
@@ -403,7 +404,7 @@ static void pflash_write(pflash_t *pfl, target_phys_addr_t offset,
reset_flash:
cpu_register_physical_memory(pfl->base, pfl->total_len,
- pfl->off | IO_MEM_ROMD | pfl->fl_mem);
+ pfl->off | IO_MEM_ROMD | IO_MEM_EXEC | pfl->fl_mem);
pfl->bypass = 0;
pfl->wcycle = 0;
@@ -587,7 +588,7 @@ pflash_t *pflash_cfi01_register(target_phys_addr_t base, ram_addr_t off,
}
pfl->off = off;
cpu_register_physical_memory(base, total_len,
- off | pfl->fl_mem | IO_MEM_ROMD);
+ off | pfl->fl_mem | IO_MEM_ROMD | IO_MEM_EXEC);
pfl->bs = bs;
if (pfl->bs) {
@@ -75,7 +75,7 @@ struct pflash_t {
static void pflash_register_memory(pflash_t *pfl, int rom_mode)
{
- unsigned long phys_offset = pfl->fl_mem;
+ unsigned long phys_offset = pfl->fl_mem | IO_MEM_EXEC;
int i;
if (rom_mode)
Add the new IO_MEM_EXEC flag to all cfi01/02 memory regions to allow execution from them in any state. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> --- hw/pflash_cfi01.c | 9 +++++---- hw/pflash_cfi02.c | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-)