]> git.proxmox.com Git - mirror_qemu.git/blob - include/hw/ppc/pnv_homer.h
Use DECLARE_*CHECKER* macros
[mirror_qemu.git] / include / hw / ppc / pnv_homer.h
1 /*
2 * QEMU PowerPC PowerNV Emulation of a few HOMER related registers
3 *
4 * Copyright (c) 2019, 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
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library 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 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
20 #ifndef PPC_PNV_HOMER_H
21 #define PPC_PNV_HOMER_H
22
23 #include "hw/ppc/pnv.h"
24 #include "qom/object.h"
25
26 #define TYPE_PNV_HOMER "pnv-homer"
27 typedef struct PnvHomer PnvHomer;
28 typedef struct PnvHomerClass PnvHomerClass;
29 DECLARE_OBJ_CHECKERS(PnvHomer, PnvHomerClass,
30 PNV_HOMER, TYPE_PNV_HOMER)
31 #define TYPE_PNV8_HOMER TYPE_PNV_HOMER "-POWER8"
32 DECLARE_INSTANCE_CHECKER(PnvHomer, PNV8_HOMER,
33 TYPE_PNV8_HOMER)
34 #define TYPE_PNV9_HOMER TYPE_PNV_HOMER "-POWER9"
35 DECLARE_INSTANCE_CHECKER(PnvHomer, PNV9_HOMER,
36 TYPE_PNV9_HOMER)
37
38 struct PnvHomer {
39 DeviceState parent;
40
41 struct PnvChip *chip;
42 MemoryRegion pba_regs;
43 MemoryRegion regs;
44 };
45
46
47 struct PnvHomerClass {
48 DeviceClass parent_class;
49
50 int pba_size;
51 const MemoryRegionOps *pba_ops;
52 int homer_size;
53 const MemoryRegionOps *homer_ops;
54
55 hwaddr core_max_base;
56 };
57
58 #endif /* PPC_PNV_HOMER_H */