4
* Copyright (c) 2012 SUSE LINUX Products GmbH
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, see
18
* <http://www.gnu.org/licenses/gpl-2.0.html>
20
#ifndef QEMU_ARM_CPU_QOM_H
21
#define QEMU_ARM_CPU_QOM_H
25
#define TYPE_ARM_CPU "arm-cpu"
27
#define ARM_CPU_CLASS(klass) \
28
OBJECT_CLASS_CHECK(ARMCPUClass, (klass), TYPE_ARM_CPU)
29
#define ARM_CPU(obj) \
30
OBJECT_CHECK(ARMCPU, (obj), TYPE_ARM_CPU)
31
#define ARM_CPU_GET_CLASS(obj) \
32
OBJECT_GET_CLASS(ARMCPUClass, (obj), TYPE_ARM_CPU)
36
* @parent_reset: The parent class' reset handler.
40
typedef struct ARMCPUClass {
42
CPUClass parent_class;
45
void (*parent_reset)(CPUState *cpu);
54
typedef struct ARMCPU {
61
/* Coprocessor information */
64
/* The instance init functions for implementation-specific subclasses
65
* set these fields to specify the implementation-dependent values of
66
* various constant registers and reset values of non-constant
68
* Some of these might become QOM properties eventually.
69
* Field names match the official register names as defined in the
70
* ARMv7AR ARM Architecture Reference Manual. A reset_ prefix
71
* is used for reset values of non-constant registers; no reset_
72
* prefix means a constant register.
95
/* The elements of this array are the CCSIDR values for each cache,
96
* in the order L1DCache, L1ICache, L2DCache, L2ICache, etc.
100
uint32_t reset_auxcr;
103
static inline ARMCPU *arm_env_get_cpu(CPUARMState *env)
105
return ARM_CPU(container_of(env, ARMCPU, env));
108
#define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e))
110
void arm_cpu_realize(ARMCPU *cpu);
111
void register_cp_regs_for_features(ARMCPU *cpu);