mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
target/hexagon: Add vmstate representation
Reviewed-by: Taylor Simpson <ltaylorsimpson@gmail.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
This commit is contained in:
@@ -382,6 +382,9 @@ static void hexagon_cpu_class_init(ObjectClass *c, const void *data)
|
||||
cc->gdb_stop_before_watchpoint = true;
|
||||
cc->gdb_core_xml_file = "hexagon-core.xml";
|
||||
cc->disas_set_info = hexagon_cpu_disas_set_info;
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
dc->vmsd = &vmstate_hexagon_cpu;
|
||||
#endif
|
||||
cc->tcg_ops = &hexagon_tcg_ops;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,4 +31,8 @@ void hexagon_debug(CPUHexagonState *env);
|
||||
|
||||
extern const char * const hexagon_regnames[TOTAL_PER_THREAD_REGS];
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern const VMStateDescription vmstate_hexagon_cpu;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
32
target/hexagon/machine.c
Normal file
32
target/hexagon/machine.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "migration/vmstate.h"
|
||||
#include "cpu.h"
|
||||
|
||||
const VMStateDescription vmstate_hexagon_cpu = {
|
||||
.name = "cpu",
|
||||
.version_id = 1,
|
||||
.minimum_version_id = 1,
|
||||
.fields = (const VMStateField[]) {
|
||||
VMSTATE_UINT32_ARRAY(env.gpr, HexagonCPU, TOTAL_PER_THREAD_REGS),
|
||||
VMSTATE_UINT32_ARRAY(env.pred, HexagonCPU, NUM_PREGS),
|
||||
VMSTATE_UINT32_ARRAY(env.t_sreg, HexagonCPU, NUM_SREGS),
|
||||
VMSTATE_UINT32_ARRAY(env.greg, HexagonCPU, NUM_GREGS),
|
||||
VMSTATE_UINT32(env.next_PC, HexagonCPU),
|
||||
VMSTATE_UINT32(env.tlb_lock_state, HexagonCPU),
|
||||
VMSTATE_UINT32(env.k0_lock_state, HexagonCPU),
|
||||
VMSTATE_UINT32(env.tlb_lock_count, HexagonCPU),
|
||||
VMSTATE_UINT32(env.k0_lock_count, HexagonCPU),
|
||||
VMSTATE_UINT32(env.threadId, HexagonCPU),
|
||||
VMSTATE_UINT32(env.cause_code, HexagonCPU),
|
||||
VMSTATE_UINT32(env.wait_next_pc, HexagonCPU),
|
||||
VMSTATE_UINT64(env.t_cycle_count, HexagonCPU),
|
||||
|
||||
VMSTATE_END_OF_LIST()
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user