13887d241SBalamuruhan S /* 23887d241SBalamuruhan S * QEMU PowerPC PowerNV Emulation of a few HOMER related registers 33887d241SBalamuruhan S * 43887d241SBalamuruhan S * Copyright (c) 2019, IBM Corporation. 53887d241SBalamuruhan S * 63887d241SBalamuruhan S * This library is free software; you can redistribute it and/or 73887d241SBalamuruhan S * modify it under the terms of the GNU Lesser General Public 83887d241SBalamuruhan S * License as published by the Free Software Foundation; either 93887d241SBalamuruhan S * version 2 of the License, or (at your option) any later version. 103887d241SBalamuruhan S * 113887d241SBalamuruhan S * This library is distributed in the hope that it will be useful, 123887d241SBalamuruhan S * but WITHOUT ANY WARRANTY; without even the implied warranty of 133887d241SBalamuruhan S * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 143887d241SBalamuruhan S * Lesser General Public License for more details. 153887d241SBalamuruhan S * 163887d241SBalamuruhan S * You should have received a copy of the GNU Lesser General Public 173887d241SBalamuruhan S * License along with this library; if not, see <http://www.gnu.org/licenses/>. 183887d241SBalamuruhan S */ 193887d241SBalamuruhan S 203887d241SBalamuruhan S #ifndef PPC_PNV_HOMER_H 213887d241SBalamuruhan S #define PPC_PNV_HOMER_H 223887d241SBalamuruhan S 233887d241SBalamuruhan S #include "hw/ppc/pnv.h" 24*db1015e9SEduardo Habkost #include "qom/object.h" 253887d241SBalamuruhan S 263887d241SBalamuruhan S #define TYPE_PNV_HOMER "pnv-homer" 27*db1015e9SEduardo Habkost typedef struct PnvHomer PnvHomer; 28*db1015e9SEduardo Habkost typedef struct PnvHomerClass PnvHomerClass; 293887d241SBalamuruhan S #define PNV_HOMER(obj) OBJECT_CHECK(PnvHomer, (obj), TYPE_PNV_HOMER) 303887d241SBalamuruhan S #define TYPE_PNV8_HOMER TYPE_PNV_HOMER "-POWER8" 313887d241SBalamuruhan S #define PNV8_HOMER(obj) OBJECT_CHECK(PnvHomer, (obj), TYPE_PNV8_HOMER) 323887d241SBalamuruhan S #define TYPE_PNV9_HOMER TYPE_PNV_HOMER "-POWER9" 333887d241SBalamuruhan S #define PNV9_HOMER(obj) OBJECT_CHECK(PnvHomer, (obj), TYPE_PNV9_HOMER) 343887d241SBalamuruhan S 35*db1015e9SEduardo Habkost struct PnvHomer { 363887d241SBalamuruhan S DeviceState parent; 373887d241SBalamuruhan S 383887d241SBalamuruhan S struct PnvChip *chip; 398f092316SCédric Le Goater MemoryRegion pba_regs; 403887d241SBalamuruhan S MemoryRegion regs; 41*db1015e9SEduardo Habkost }; 423887d241SBalamuruhan S 433887d241SBalamuruhan S #define PNV_HOMER_CLASS(klass) \ 443887d241SBalamuruhan S OBJECT_CLASS_CHECK(PnvHomerClass, (klass), TYPE_PNV_HOMER) 453887d241SBalamuruhan S #define PNV_HOMER_GET_CLASS(obj) \ 463887d241SBalamuruhan S OBJECT_GET_CLASS(PnvHomerClass, (obj), TYPE_PNV_HOMER) 473887d241SBalamuruhan S 48*db1015e9SEduardo Habkost struct PnvHomerClass { 493887d241SBalamuruhan S DeviceClass parent_class; 503887d241SBalamuruhan S 518f092316SCédric Le Goater int pba_size; 528f092316SCédric Le Goater const MemoryRegionOps *pba_ops; 533887d241SBalamuruhan S int homer_size; 543887d241SBalamuruhan S const MemoryRegionOps *homer_ops; 553887d241SBalamuruhan S 563887d241SBalamuruhan S hwaddr core_max_base; 57*db1015e9SEduardo Habkost }; 583887d241SBalamuruhan S 593887d241SBalamuruhan S #endif /* PPC_PNV_HOMER_H */ 60