diff options
| author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-04 09:47:34 +0000 |
|---|---|---|
| committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2006-07-04 09:47:34 +0000 |
| commit | 856074ec70ffba4f1b8d73be88f3cfc782532156 (patch) | |
| tree | f6677feb75d74ba9f877b116ec302033b5c5466e | |
| parent | 99ba31b4fe905e6781e2c99c1e686370acc40ec6 (diff) | |
| download | focaccia-qemu-856074ec70ffba4f1b8d73be88f3cfc782532156.tar.gz focaccia-qemu-856074ec70ffba4f1b8d73be88f3cfc782532156.zip | |
fix for IO_MEM_ROMD support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2034 c046a42c-6fe2-441c-8c8c-71466251a162
| -rw-r--r-- | exec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/exec.c b/exec.c index dd42f77d8e..88acff0917 100644 --- a/exec.c +++ b/exec.c @@ -1513,9 +1513,11 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr, te->addr_code = -1; } if (prot & PAGE_WRITE) { - if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM) { - /* ROM: access is ignored (same as unassigned) */ - te->addr_write = vaddr | IO_MEM_ROM; + if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM || + (pd & IO_MEM_ROMD)) { + /* write access calls the I/O callback */ + te->addr_write = vaddr | + (pd & ~(TARGET_PAGE_MASK | IO_MEM_ROMD)); } else if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_RAM && !cpu_physical_memory_is_dirty(pd)) { te->addr_write = vaddr | IO_MEM_NOTDIRTY; |