]>
Commit | Line | Data |
---|---|---|
dec9c2d4 | 1 | /* |
336588a2 | 2 | * QEMU ARM CPU QOM header (target agnostic) |
dec9c2d4 AF |
3 | * |
4 | * Copyright (c) 2012 SUSE LINUX Products GmbH | |
5 | * | |
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. | |
10 | * | |
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. | |
15 | * | |
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> | |
19 | */ | |
20 | #ifndef QEMU_ARM_CPU_QOM_H | |
21 | #define QEMU_ARM_CPU_QOM_H | |
22 | ||
2e5b09fd | 23 | #include "hw/core/cpu.h" |
dec9c2d4 AF |
24 | |
25 | #define TYPE_ARM_CPU "arm-cpu" | |
26 | ||
9295b1aa | 27 | OBJECT_DECLARE_CPU_TYPE(ARMCPU, ARMCPUClass, ARM_CPU) |
dec9c2d4 | 28 | |
bab52d4b PM |
29 | #define TYPE_ARM_MAX_CPU "max-" TYPE_ARM_CPU |
30 | ||
d14d42f1 | 31 | #define TYPE_AARCH64_CPU "aarch64-cpu" |
db1015e9 | 32 | typedef struct AArch64CPUClass AArch64CPUClass; |
8110fa1d EH |
33 | DECLARE_CLASS_CHECKERS(AArch64CPUClass, AARCH64_CPU, |
34 | TYPE_AARCH64_CPU) | |
d14d42f1 | 35 | |
9ab3ac5a PMD |
36 | #define ARM_CPU_TYPE_SUFFIX "-" TYPE_ARM_CPU |
37 | #define ARM_CPU_TYPE_NAME(name) (name ARM_CPU_TYPE_SUFFIX) | |
38 | ||
22036ae5 PMD |
39 | /* For M profile, some registers are banked secure vs non-secure; |
40 | * these are represented as a 2-element array where the first element | |
41 | * is the non-secure copy and the second is the secure copy. | |
42 | * When the CPU does not have implement the security extension then | |
43 | * only the first element is used. | |
44 | * This means that the copy for the current security state can be | |
45 | * accessed via env->registerfield[env->v7m.secure] (whether the security | |
46 | * extension is implemented or not). | |
47 | */ | |
48 | enum { | |
49 | M_REG_NS = 0, | |
50 | M_REG_S = 1, | |
51 | M_REG_NUM_BANKS = 2, | |
52 | }; | |
53 | ||
dec9c2d4 | 54 | #endif |