Patchwork ARM7TDMI: Enable ARMv4T features

login
register
mail settings
Submitter Marek Vasut
Date Sept. 9, 2011, 12:22 a.m.
Message ID <1315527770-22318-1-git-send-email-marek.vasut@gmail.com>
Download mbox | patch
Permalink /patch/114004/
State New
Headers show

Comments

Marek Vasut - Sept. 9, 2011, 12:22 a.m.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 target-arm/helper.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Peter Maydell - Sept. 9, 2011, 7:52 a.m.
On 9 September 2011 01:22, Marek Vasut <marek.vasut@gmail.com> wrote:
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>  target-arm/helper.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 58cd99f..2f3e937 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -53,6 +53,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
>     env->cp15.c0_cpuid = id;
>     switch (id) {
>     case ARM_CPUID_ARM7TDMI:
> +        set_feature(env, ARM_FEATURE_V4T);
>         // set_feature(env, ARM_FEATURE_ABORT_BU);
>        // set_feature(env, ARM_FEATURE_NO_CP15);
>         break;

Did you mean to send this as part of a patch series or something?
Upstream qemu doesn't have any support for ARM7TDMI (and in particular
doesn't even define ARM_CPUID_ARM7TDMI), so this patch obviously
applies on top of something else...

-- PMM
Marek Vasut - Sept. 9, 2011, 9:06 a.m.
On Friday, September 09, 2011 09:52:42 AM Peter Maydell wrote:
> On 9 September 2011 01:22, Marek Vasut <marek.vasut@gmail.com> wrote:
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> >  target-arm/helper.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> > 
> > diff --git a/target-arm/helper.c b/target-arm/helper.c
> > index 58cd99f..2f3e937 100644
> > --- a/target-arm/helper.c
> > +++ b/target-arm/helper.c
> > @@ -53,6 +53,7 @@ static void cpu_reset_model_id(CPUARMState *env,
> > uint32_t id) env->cp15.c0_cpuid = id;
> >     switch (id) {
> >     case ARM_CPUID_ARM7TDMI:
> > +        set_feature(env, ARM_FEATURE_V4T);
> >         // set_feature(env, ARM_FEATURE_ABORT_BU);
> >        // set_feature(env, ARM_FEATURE_NO_CP15);
> >         break;
> 
> Did you mean to send this as part of a patch series or something?
> Upstream qemu doesn't have any support for ARM7TDMI (and in particular
> doesn't even define ARM_CPUID_ARM7TDMI), so this patch obviously
> applies on top of something else...

Ah damn, I just realized I have it on top of a patchset from some other person. 
I'll continue cleaning up the patchset, then submit the whole thing. Please 
ignore this one.

Cheers

> 
> -- PMM

Patch

diff --git a/target-arm/helper.c b/target-arm/helper.c
index 58cd99f..2f3e937 100644
--- a/target-arm/helper.c
+++ b/target-arm/helper.c
@@ -53,6 +53,7 @@  static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
     env->cp15.c0_cpuid = id;
     switch (id) {
     case ARM_CPUID_ARM7TDMI:
+        set_feature(env, ARM_FEATURE_V4T);
         // set_feature(env, ARM_FEATURE_ABORT_BU);
 	// set_feature(env, ARM_FEATURE_NO_CP15);
         break;