[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v13 5/6] arm: store the config_base_register dur
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v13 5/6] arm: store the config_base_register during cpu_reset |
Date: |
Mon, 23 Jan 2012 14:41:07 +0000 |
On 20 January 2012 20:46, Mark Langsdorf <address@hidden> wrote:
> Long term, the config_base_register will be a QDM parameter. In the
> meantime, models that use it need to be able to preserve it across
> cpu_reset() calls.
>
> Signed-off-by: Mark Langsdorf <address@hidden>
> ---
> Changes from v1-v12
> Skipped
>
> target-arm/helper.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/target-arm/helper.c b/target-arm/helper.c
> index 00458fc..a14db43 100644
> --- a/target-arm/helper.c
> +++ b/target-arm/helper.c
> @@ -255,6 +255,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t
> id)
> void cpu_reset(CPUARMState *env)
> {
> uint32_t id;
> + uint32_t tmp = 0;
>
> if (qemu_loglevel_mask(CPU_LOG_RESET)) {
> qemu_log("CPU Reset (CPU %d)\n", env->cpu_index);
> @@ -262,9 +263,15 @@ void cpu_reset(CPUARMState *env)
> }
>
> id = env->cp15.c0_cpuid;
> + if (env->cp15.c15_config_base_address) {
> + tmp = env->cp15.c15_config_base_address;
> + }
> memset(env, 0, offsetof(CPUARMState, breakpoints));
> if (id)
> cpu_reset_model_id(env, id);
> + if (tmp) {
> + env->cp15.c15_config_base_address = tmp;
> + }
I don't think you need either of the conditionals here,
you can just save and restore it unconditionally.
-- PMM
- [Qemu-devel] [PATCH v13 0/6] arm: add support for Calxeda Highbank, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v13 4/6] arm_boot: support board IDs more than 16 bits wide, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v13 5/6] arm: store the config_base_register during cpu_reset, Mark Langsdorf, 2012/01/20
- Re: [Qemu-devel] [PATCH v13 5/6] arm: store the config_base_register during cpu_reset,
Peter Maydell <=
- [Qemu-devel] [PATCH v13 2/6] ahci: add support for non-PCI based controllers, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v13 3/6] arm: add secondary cpu boot callbacks to arm_boot.c, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v13 6/6] arm: SoC model for Calxeda Highbank, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v13 1/6] Add xgmac ethernet model, Mark Langsdorf, 2012/01/20
- [Qemu-devel] [PATCH v14 0/6] arm: add support for Calxeda Highbank, Mark Langsdorf, 2012/01/23