]> xenbits.xensource.com Git - qemu-xen-4.4-testing.git/commitdiff
fix for IO_MEM_ROMD support
authorbellard <bellard>
Tue, 4 Jul 2006 09:47:34 +0000 (09:47 +0000)
committerbellard <bellard>
Tue, 4 Jul 2006 09:47:34 +0000 (09:47 +0000)
exec.c

diff --git a/exec.c b/exec.c
index dd42f77d8eda482d375aeb0fe9e1a1ff3327583e..88acff0917caa1d86a19b5e5f2c04d88656de91f 100644 (file)
--- 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;