summaryrefslogtreecommitdiff
path: root/target-arm/cpu-qom.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-09-03 20:12:07 +0100
committerPeter Maydell <peter.maydell@linaro.org>2013-09-10 19:11:28 +0100
commitd14d42f19bf3dcef5c81ec2324843121f552a6fc (patch)
treee0a1cfeb24dfe19a2405baf15b07ec3857bfc832 /target-arm/cpu-qom.h
parenteaed129deaea393640cf6bff006cd5cec3b38d8f (diff)
downloadqemu-d14d42f19bf3dcef5c81ec2324843121f552a6fc.tar.gz
target-arm: Add new AArch64CPUInfo base class and subclasses
Create a new AArch64CPU class; all 64-bit capable ARM CPUs are subclasses of this. (Currently we only support one, the "any" CPU used by linux-user.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1378235544-22290-8-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'target-arm/cpu-qom.h')
-rw-r--r--target-arm/cpu-qom.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
index 9f47baebf8..fbe846e373 100644
--- a/target-arm/cpu-qom.h
+++ b/target-arm/cpu-qom.h
@@ -130,6 +130,18 @@ typedef struct ARMCPU {
uint32_t reset_auxcr;
} ARMCPU;
+#define TYPE_AARCH64_CPU "aarch64-cpu"
+#define AARCH64_CPU_CLASS(klass) \
+ OBJECT_CLASS_CHECK(AArch64CPUClass, (klass), TYPE_AARCH64_CPU)
+#define AARCH64_CPU_GET_CLASS(obj) \
+ OBJECT_GET_CLASS(AArch64CPUClass, (obj), TYPE_AArch64_CPU)
+
+typedef struct AArch64CPUClass {
+ /*< private >*/
+ ARMCPUClass parent_class;
+ /*< public >*/
+} AArch64CPUClass;
+
static inline ARMCPU *arm_env_get_cpu(CPUARMState *env)
{
return container_of(env, ARMCPU, env);