]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/ppc/pnv_core.h
ppc: spapr: use generic cpu_model parsing
[mirror_qemu.git] / include / hw / ppc / pnv_core.h
1 /*
2 * QEMU PowerPC PowerNV CPU Core model
3 *
4 * Copyright (c) 2016, IBM Corporation.
5 *
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.
10 *
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.
15 *
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/>.
18 */
19 #ifndef _PPC_PNV_CORE_H
20 #define _PPC_PNV_CORE_H
21
22 #include "hw/cpu/core.h"
23
24 #define TYPE_PNV_CORE "powernv-cpu-core"
25 #define PNV_CORE(obj) \
26 OBJECT_CHECK(PnvCore, (obj), TYPE_PNV_CORE)
27 #define PNV_CORE_CLASS(klass) \
28 OBJECT_CLASS_CHECK(PnvCoreClass, (klass), TYPE_PNV_CORE)
29 #define PNV_CORE_GET_CLASS(obj) \
30 OBJECT_GET_CLASS(PnvCoreClass, (obj), TYPE_PNV_CORE)
31
32 typedef struct PnvCore {
33 /*< private >*/
34 CPUCore parent_obj;
35
36 /*< public >*/
37 void *threads;
38 uint32_t pir;
39
40 MemoryRegion xscom_regs;
41 } PnvCore;
42
43 typedef struct PnvCoreClass {
44 DeviceClass parent_class;
45 ObjectClass *cpu_oc;
46 } PnvCoreClass;
47
48 extern char *pnv_core_typename(const char *model);
49
50 #endif /* _PPC_PNV_CORE_H */