summaryrefslogtreecommitdiff
path: root/target-openrisc
diff options
context:
space:
mode:
authorSebastian Macke <sebastian@macke.de>2013-10-22 02:12:39 +0200
committerJia Liu <proljc@gmail.com>2013-11-20 21:44:43 +0800
commit04359e6bb7f2841031aae645a770583f9c5df3cd (patch)
tree148f62e0f751b6158af427109ce603853575733d /target-openrisc
parentda1d77597b29f45bfd290d251ee459a2794112c6 (diff)
downloadqemu-04359e6bb7f2841031aae645a770583f9c5df3cd.tar.gz
target-openrisc: Remove executable flag for every page
Pages should be flagged executable only if the tlb executable flag is set or the mmu is off. Signed-off-by: Sebastian Macke <sebastian@macke.de> Reviewed-by: Jia Liu <proljc@gmail.com> Signed-off-by: Jia Liu <proljc@gmail.com>
Diffstat (limited to 'target-openrisc')
-rw-r--r--target-openrisc/mmu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-openrisc/mmu.c b/target-openrisc/mmu.c
index 22d7cbec18..dd487bd0d1 100644
--- a/target-openrisc/mmu.c
+++ b/target-openrisc/mmu.c
@@ -32,7 +32,7 @@ int cpu_openrisc_get_phys_nommu(OpenRISCCPU *cpu,
int *prot, target_ulong address, int rw)
{
*physical = address;
- *prot = PAGE_READ | PAGE_WRITE;
+ *prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC;
return TLBRET_MATCH;
}
@@ -187,7 +187,7 @@ int cpu_openrisc_handle_mmu_fault(CPUOpenRISCState *env,
if (ret == TLBRET_MATCH) {
tlb_set_page(env, address & TARGET_PAGE_MASK,
- physical & TARGET_PAGE_MASK, prot | PAGE_EXEC,
+ physical & TARGET_PAGE_MASK, prot,
mmu_idx, TARGET_PAGE_SIZE);
ret = 0;
} else if (ret < 0) {