aboutsummaryrefslogtreecommitdiff
path: root/target-i386/helper2.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-31 23:37:16 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-03-31 23:37:16 +0000
commit67b915a5dd52a05f8030cd9edc005effd9c8eea5 (patch)
tree247689b53ca52d7d9cb4fc9f7ff65f293b61e01a /target-i386/helper2.c
parentbb27c19087ff0847484c111cbaf56a3fa7103684 (diff)
downloadqemu-67b915a5dd52a05f8030cd9edc005effd9c8eea5.zip
qemu-67b915a5dd52a05f8030cd9edc005effd9c8eea5.tar.gz
qemu-67b915a5dd52a05f8030cd9edc005effd9c8eea5.tar.bz2
win32 port (initial patch by kazu)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@692 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper2.c')
-rw-r--r--target-i386/helper2.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/target-i386/helper2.c b/target-i386/helper2.c
index c9c9d7e..22e812e 100644
--- a/target-i386/helper2.c
+++ b/target-i386/helper2.c
@@ -24,7 +24,6 @@
#include <inttypes.h>
#include <signal.h>
#include <assert.h>
-#include <sys/mman.h>
#include "cpu.h"
#include "exec-all.h"
@@ -334,7 +333,7 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
if (!(env->cr[0] & CR0_PG_MASK)) {
pte = addr;
virt_addr = addr & TARGET_PAGE_MASK;
- prot = PROT_READ | PROT_WRITE;
+ prot = PAGE_READ | PAGE_WRITE;
page_size = 4096;
goto do_mapping;
}
@@ -409,17 +408,17 @@ int cpu_x86_handle_mmu_fault(CPUX86State *env, uint32_t addr,
}
/* the page can be put in the TLB */
- prot = PROT_READ;
+ prot = PAGE_READ;
if (pte & PG_DIRTY_MASK) {
/* only set write access if already dirty... otherwise wait
for dirty access */
if (is_user) {
if (ptep & PG_RW_MASK)
- prot |= PROT_WRITE;
+ prot |= PAGE_WRITE;
} else {
if (!(env->cr[0] & CR0_WP_MASK) ||
(ptep & PG_RW_MASK))
- prot |= PROT_WRITE;
+ prot |= PAGE_WRITE;
}
}