提交 218951ef 编写于 作者: E Edgar E. Iglesias

CRIS: Segmented addressing only for kernel mode.

Segmented translation through the CRIS MMU is only done for
accesses in kernel mode. In user-mode, all accesses are treated
as paged regardless of the mode config in RW_MM_CFG.
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
上级 cef290b8
......@@ -172,8 +172,6 @@ void do_interrupt(CPUState *env)
env->dslot = 0;
}
env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4);
if (env->pregs[PR_CCS] & U_FLAG) {
/* Swap stack pointers. */
env->pregs[PR_USP] = env->regs[R_SP];
......@@ -182,6 +180,10 @@ void do_interrupt(CPUState *env)
/* Apply the CRIS CCS shift. Clears U if set. */
cris_shift_ccs(env);
/* Now that we are in kernel mode, load the handlers address. */
env->pc = ldl_code(env->pregs[PR_EBP] + ex_vec * 4);
D_LOG("%s isr=%x vec=%x ccs=%x pid=%d erp=%x\n",
__func__, env->pc, ex_vec,
env->pregs[PR_CCS],
......
......@@ -345,7 +345,7 @@ int cris_mmu_translate(struct cris_mmu_result *res,
}
seg = vaddr >> 28;
if (cris_mmu_segmented_addr(seg, env->sregs[SFR_RW_MM_CFG]))
if (!is_user && cris_mmu_segmented_addr(seg, env->sregs[SFR_RW_MM_CFG]))
{
uint32_t base;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册