qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v3 07/21] target-arm: Overwrite reset handle


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH RFC v3 07/21] target-arm: Overwrite reset handler for ti925t
Date: Tue, 7 Feb 2012 17:30:42 +0000

On 3 February 2012 02:59, Andreas Färber <address@hidden> wrote:
> The OMAPCP feature allows to switch between TI915T and TI925T via
> cp15 c15_ticonfig register. Move reset into ti925t-specific callback.
>
> Signed-off-by: Andreas Färber <address@hidden>
> Cc: Peter Maydell <address@hidden>
> ---
>  target-arm/cpu.c    |   18 ++++++++++++++++++
>  target-arm/helper.c |    1 -
>  2 files changed, 18 insertions(+), 1 deletions(-)
>
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index b794ec1..a6dbad3 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -99,6 +99,23 @@ typedef struct ARMCPUInfo {
>     void (*class_init)(ARMCPUClass *klass, const struct ARMCPUInfo *info);
>  } ARMCPUInfo;
>
> +static void ti925t_reset(CPU *c)
> +{
> +    ARMCPU *cpu = ARM_CPU(c);
> +    CPUARMState *env = &cpu->env;
> +
> +    arm_cpu_reset(c);
> +
> +    env->cp15.c0_cpuid = ARM_CPUID_TI925T; /* Depends on wiring. */
> +}

If/when I finish my cp15 cleanup series this will become unnecessary, because
c0_cpuid will just be another cp15 register among many which the CPU defines
in its init function somewhere (and the cp15 register struct will include
"reset value for this cp15 register" and arm_cpu_reset() will just enumerate
them all and set them to their reset values).

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]