Message ID | 1296010673-3841-1-git-send-email-gnurou@gmail.com |
---|---|
State | New |
Headers | show |
On Wed, Jan 26, 2011 at 11:57:53AM +0900, Alexandre Courbot wrote: > Update the PTEH register to contain the VPN at which an MMU > exception occured as specified by the SH4 reference. > > Signed-off-by: Alexandre Courbot <gnurou@gmail.com> > --- > target-sh4/helper.c | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) Thanks, applied. > diff --git a/target-sh4/helper.c b/target-sh4/helper.c > index 19b309b..8f8c66c 100644 > --- a/target-sh4/helper.c > +++ b/target-sh4/helper.c > @@ -453,6 +453,10 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw, > > if (ret != MMU_OK) { > env->tea = address; > + if (ret != MMU_DTLB_MULTIPLE && ret != MMU_ITLB_MULTIPLE) { > + env->pteh = (env->pteh & PTEH_ASID_MASK) | > + (address & PTEH_VPN_MASK); > + } > switch (ret) { > case MMU_ITLB_MISS: > case MMU_DTLB_MISS_READ: > -- > 1.7.3.5 > > >
diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 19b309b..8f8c66c 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -453,6 +453,10 @@ int cpu_sh4_handle_mmu_fault(CPUState * env, target_ulong address, int rw, if (ret != MMU_OK) { env->tea = address; + if (ret != MMU_DTLB_MULTIPLE && ret != MMU_ITLB_MULTIPLE) { + env->pteh = (env->pteh & PTEH_ASID_MASK) | + (address & PTEH_VPN_MASK); + } switch (ret) { case MMU_ITLB_MISS: case MMU_DTLB_MISS_READ:
Update the PTEH register to contain the VPN at which an MMU exception occured as specified by the SH4 reference. Signed-off-by: Alexandre Courbot <gnurou@gmail.com> --- target-sh4/helper.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)