提交 04359e6b 编写于 作者: S Sebastian Macke 提交者: Jia Liu

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: NSebastian Macke <sebastian@macke.de>
Reviewed-by: NJia Liu <proljc@gmail.com>
Signed-off-by: NJia Liu <proljc@gmail.com>
上级 da1d7759
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册