include/hw/ppc include/hw/pci-host: Drop extra typedefs
[qemu/armbru.git] / include / hw / ppc / pnv_core.h
blob3d75706e95dad06f2b1a618ef7acff736d3ad379
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.1 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"
25 #include "hw/ppc/pnv.h"
26 #include "qom/object.h"
28 #define TYPE_PNV_CORE "powernv-cpu-core"
29 OBJECT_DECLARE_TYPE(PnvCore, PnvCoreClass,
30 PNV_CORE)
32 struct PnvCore {
33 /*< private >*/
34 CPUCore parent_obj;
36 /*< public >*/
37 PowerPCCPU **threads;
38 uint32_t pir;
39 uint64_t hrmor;
40 PnvChip *chip;
42 MemoryRegion xscom_regs;
45 struct PnvCoreClass {
46 DeviceClass parent_class;
48 const MemoryRegionOps *xscom_ops;
51 #define PNV_CORE_TYPE_SUFFIX "-" TYPE_PNV_CORE
52 #define PNV_CORE_TYPE_NAME(cpu_model) cpu_model PNV_CORE_TYPE_SUFFIX
54 typedef struct PnvCPUState {
55 Object *intc;
56 } PnvCPUState;
58 static inline PnvCPUState *pnv_cpu_state(PowerPCCPU *cpu)
60 return (PnvCPUState *)cpu->machine_data;
63 #define TYPE_PNV_QUAD "powernv-cpu-quad"
64 OBJECT_DECLARE_SIMPLE_TYPE(PnvQuad, PNV_QUAD)
66 struct PnvQuad {
67 DeviceState parent_obj;
69 uint32_t quad_id;
70 MemoryRegion xscom_regs;
72 #endif /* PPC_PNV_CORE_H */