Commit 856074ec70ffba4f1b8d73be88f3cfc782532156
1 parent
99ba31b4
fix for IO_MEM_ROMD support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2034 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
3 deletions
exec.c
... | ... | @@ -1513,9 +1513,11 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr, |
1513 | 1513 | te->addr_code = -1; |
1514 | 1514 | } |
1515 | 1515 | if (prot & PAGE_WRITE) { |
1516 | - if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM) { | |
1517 | - /* ROM: access is ignored (same as unassigned) */ | |
1518 | - te->addr_write = vaddr | IO_MEM_ROM; | |
1516 | + if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM || | |
1517 | + (pd & IO_MEM_ROMD)) { | |
1518 | + /* write access calls the I/O callback */ | |
1519 | + te->addr_write = vaddr | | |
1520 | + (pd & ~(TARGET_PAGE_MASK | IO_MEM_ROMD)); | |
1519 | 1521 | } else if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_RAM && |
1520 | 1522 | !cpu_physical_memory_is_dirty(pd)) { |
1521 | 1523 | te->addr_write = vaddr | IO_MEM_NOTDIRTY; | ... | ... |