2012-04-06 16:39:03 +04:00
|
|
|
/*
|
2023-10-06 10:55:22 +03:00
|
|
|
* QEMU PowerPC CPU QOM header (target agnostic)
|
2012-04-06 16:39:03 +04:00
|
|
|
*
|
|
|
|
* Copyright (c) 2012 SUSE LINUX Products GmbH
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, see
|
|
|
|
* <http://www.gnu.org/licenses/lgpl-2.1.html>
|
|
|
|
*/
|
|
|
|
#ifndef QEMU_PPC_CPU_QOM_H
|
|
|
|
#define QEMU_PPC_CPU_QOM_H
|
|
|
|
|
2024-02-27 17:43:12 +03:00
|
|
|
#include "exec/gdbstub.h"
|
2019-07-09 18:20:52 +03:00
|
|
|
#include "hw/core/cpu.h"
|
2012-04-06 16:39:03 +04:00
|
|
|
|
|
|
|
#ifdef TARGET_PPC64
|
|
|
|
#define TYPE_POWERPC_CPU "powerpc64-cpu"
|
|
|
|
#else
|
|
|
|
#define TYPE_POWERPC_CPU "powerpc-cpu"
|
|
|
|
#endif
|
|
|
|
|
2022-02-14 19:08:40 +03:00
|
|
|
OBJECT_DECLARE_CPU_TYPE(PowerPCCPU, PowerPCCPUClass, POWERPC_CPU)
|
2012-04-06 16:39:03 +04:00
|
|
|
|
2023-06-27 14:51:21 +03:00
|
|
|
#define POWERPC_CPU_TYPE_SUFFIX "-" TYPE_POWERPC_CPU
|
|
|
|
#define POWERPC_CPU_TYPE_NAME(model) model POWERPC_CPU_TYPE_SUFFIX
|
|
|
|
|
2023-06-27 14:51:22 +03:00
|
|
|
#define TYPE_HOST_POWERPC_CPU POWERPC_CPU_TYPE_NAME("host")
|
|
|
|
|
2013-07-18 23:32:54 +04:00
|
|
|
#ifndef CONFIG_USER_ONLY
|
2014-05-01 14:37:09 +04:00
|
|
|
typedef struct PPCTimebase {
|
|
|
|
uint64_t guest_timebase;
|
|
|
|
int64_t time_of_the_day_ns;
|
2019-07-11 22:47:02 +03:00
|
|
|
bool runstate_paused;
|
2014-05-01 14:37:09 +04:00
|
|
|
} PPCTimebase;
|
|
|
|
|
2019-08-12 08:23:44 +03:00
|
|
|
extern const VMStateDescription vmstate_ppc_timebase;
|
2014-05-01 14:37:09 +04:00
|
|
|
|
|
|
|
#define VMSTATE_PPC_TIMEBASE_V(_field, _state, _version) { \
|
|
|
|
.name = (stringify(_field)), \
|
|
|
|
.version_id = (_version), \
|
|
|
|
.size = sizeof(PPCTimebase), \
|
|
|
|
.vmsd = &vmstate_ppc_timebase, \
|
|
|
|
.flags = VMS_STRUCT, \
|
|
|
|
.offset = vmstate_offset_value(_state, _field, PPCTimebase), \
|
|
|
|
}
|
2017-01-27 15:24:58 +03:00
|
|
|
|
2021-01-11 18:20:20 +03:00
|
|
|
void cpu_ppc_clock_vm_state_change(void *opaque, bool running,
|
2017-01-27 15:24:58 +03:00
|
|
|
RunState state);
|
2013-07-18 23:32:54 +04:00
|
|
|
#endif
|
|
|
|
|
2012-04-06 16:39:03 +04:00
|
|
|
#endif
|