[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC 1/2] ARM: cpu: add "hivecs" property (high vectors
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [RFC 1/2] ARM: cpu: add "hivecs" property (high vectors on reset) |
Date: |
Sat, 7 Dec 2013 01:14:28 +0000 |
On 7 December 2013 00:55, Antony Pavlov <address@hidden> wrote:
> Signed-off-by: Antony Pavlov <address@hidden>
> ---
> target-arm/cpu-qom.h | 1 +
> target-arm/cpu.c | 13 +++++++++++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
> index b55306a..116320c 100644
> --- a/target-arm/cpu-qom.h
> +++ b/target-arm/cpu-qom.h
> @@ -128,6 +128,7 @@ typedef struct ARMCPU {
> uint32_t ccsidr[16];
> uint32_t reset_cbar;
> uint32_t reset_auxcr;
> + bool reset_hivecs;
> } ARMCPU;
>
> #define TYPE_AARCH64_CPU "aarch64-cpu"
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index d40f2a7..f838499 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -20,6 +20,7 @@
>
> #include "cpu.h"
> #include "qemu-common.h"
> +#include "hw/qdev-properties.h"
> #if !defined(CONFIG_USER_ONLY)
> #include "hw/loader.h"
> #endif
> @@ -119,6 +120,12 @@ static void arm_cpu_reset(CPUState *s)
> env->regs[15] = pc & ~1;
> }
> }
> +
> + if (cpu->reset_hivecs) {
> + uint32_t c1_sys = env->cp15.c1_sys;
> + env->cp15.c1_sys = c1_sys | (1 << 13);
> + }
You don't need to do this on every reset. You can just
set the bit in cpu->reset_sctlr at realize if reset_hivecs
is true, and then reset will just reset to the correct
value.
thanks
-- PMM
[Qemu-devel] [RFC 0/2] ARM: make possible to use high vectors for reset exception, Antony Pavlov, 2013/12/06
Re: [Qemu-devel] [RFC 1/2] ARM: cpu: add "hivecs" property (high vectors on reset),
Peter Maydell <=
[Qemu-devel] [RFC 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc, Antony Pavlov, 2013/12/06
Re: [Qemu-devel] [RFC 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc, Peter Crosthwaite, 2013/12/06
Re: [Qemu-devel] [RFC 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc, Antony Pavlov, 2013/12/07
Re: [Qemu-devel] [RFC 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc, Peter Maydell, 2013/12/07