fix for IO_MEM_ROMD support

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2034 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-07-04 09:47:34 +00:00
parent 99ba31b4fe
commit 856074ec70

8
exec.c
View File

@ -1513,9 +1513,11 @@ int tlb_set_page_exec(CPUState *env, target_ulong vaddr,
te->addr_code = -1; te->addr_code = -1;
} }
if (prot & PAGE_WRITE) { if (prot & PAGE_WRITE) {
if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM) { if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_ROM ||
/* ROM: access is ignored (same as unassigned) */ (pd & IO_MEM_ROMD)) {
te->addr_write = vaddr | IO_MEM_ROM; /* 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 && } else if ((pd & ~TARGET_PAGE_MASK) == IO_MEM_RAM &&
!cpu_physical_memory_is_dirty(pd)) { !cpu_physical_memory_is_dirty(pd)) {
te->addr_write = vaddr | IO_MEM_NOTDIRTY; te->addr_write = vaddr | IO_MEM_NOTDIRTY;