]>
git.proxmox.com Git - mirror_qemu.git/blob - include/hw/ppc/spapr_cpu_core.h
2 * sPAPR CPU core device.
4 * Copyright (C) 2016 Bharata B Rao <bharata@linux.vnet.ibm.com>
6 * This work is licensed under the terms of the GNU GPL, version 2 or later.
7 * See the COPYING file in the top-level directory.
9 #ifndef HW_SPAPR_CPU_CORE_H
10 #define HW_SPAPR_CPU_CORE_H
13 #include "hw/cpu/core.h"
14 #include "target/ppc/cpu-qom.h"
15 #include "target/ppc/cpu.h"
17 #define TYPE_SPAPR_CPU_CORE "spapr-cpu-core"
18 #define SPAPR_CPU_CORE(obj) \
19 OBJECT_CHECK(sPAPRCPUCore, (obj), TYPE_SPAPR_CPU_CORE)
20 #define SPAPR_CPU_CORE_CLASS(klass) \
21 OBJECT_CLASS_CHECK(sPAPRCPUCoreClass, (klass), TYPE_SPAPR_CPU_CORE)
22 #define SPAPR_CPU_CORE_GET_CLASS(obj) \
23 OBJECT_GET_CLASS(sPAPRCPUCoreClass, (obj), TYPE_SPAPR_CPU_CORE)
25 #define SPAPR_CPU_CORE_TYPE_NAME(model) model "-" TYPE_SPAPR_CPU_CORE
27 typedef struct sPAPRCPUCore
{
36 typedef struct sPAPRCPUCoreClass
{
37 DeviceClass parent_class
;
41 const char *spapr_get_cpu_core_type(const char *cpu_type
);
42 void spapr_cpu_set_entry_state(PowerPCCPU
*cpu
, target_ulong nip
, target_ulong r3
);
44 typedef struct sPAPRCPUState
{
46 uint64_t slb_shadow_addr
, slb_shadow_size
;
47 uint64_t dtl_addr
, dtl_size
;
50 static inline sPAPRCPUState
*spapr_cpu_state(PowerPCCPU
*cpu
)
52 return (sPAPRCPUState
*)cpu
->machine_data
;