target/mips: msa: Split helpers for DPADD_U.<H|W|D>
[qemu/ar7.git] / include / hw / ppc / pnv_core.h
blob113550eb7ffbf902480cdaebfb59ec1b6560dbce
1 /*
2 * QEMU PowerPC PowerNV CPU Core model
4 * Copyright (c) 2016, IBM Corporation.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public License
8 * as published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef PPC_PNV_CORE_H
21 #define PPC_PNV_CORE_H
23 #include "hw/cpu/core.h"
24 #include "target/ppc/cpu.h"
26 #define TYPE_PNV_CORE "powernv-cpu-core"
27 #define PNV_CORE(obj) \
28 OBJECT_CHECK(PnvCore, (obj), TYPE_PNV_CORE)
29 #define PNV_CORE_CLASS(klass) \
30 OBJECT_CLASS_CHECK(PnvCoreClass, (klass), TYPE_PNV_CORE)
31 #define PNV_CORE_GET_CLASS(obj) \
32 OBJECT_GET_CLASS(PnvCoreClass, (obj), TYPE_PNV_CORE)
34 typedef struct PnvChip PnvChip;
36 typedef struct PnvCore {
37 /*< private >*/
38 CPUCore parent_obj;
40 /*< public >*/
41 PowerPCCPU **threads;
42 uint32_t pir;
43 uint64_t hrmor;
44 PnvChip *chip;
46 MemoryRegion xscom_regs;
47 } PnvCore;
49 typedef struct PnvCoreClass {
50 DeviceClass parent_class;
52 const MemoryRegionOps *xscom_ops;
53 } PnvCoreClass;
55 #define PNV_CORE_TYPE_SUFFIX "-" TYPE_PNV_CORE
56 #define PNV_CORE_TYPE_NAME(cpu_model) cpu_model PNV_CORE_TYPE_SUFFIX
58 typedef struct PnvCPUState {
59 Object *intc;
60 } PnvCPUState;
62 static inline PnvCPUState *pnv_cpu_state(PowerPCCPU *cpu)
64 return (PnvCPUState *)cpu->machine_data;
67 #define TYPE_PNV_QUAD "powernv-cpu-quad"
68 #define PNV_QUAD(obj) \
69 OBJECT_CHECK(PnvQuad, (obj), TYPE_PNV_QUAD)
71 typedef struct PnvQuad {
72 DeviceState parent_obj;
74 uint32_t id;
75 MemoryRegion xscom_regs;
76 } PnvQuad;
77 #endif /* PPC_PNV_CORE_H */