Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
[qemu.git] / target-openrisc / machine.c
blobb4dc08dfe134fe6920c58b7492bb6d1f7beb96df
1 /*
2 * OpenRISC Machine
4 * Copyright (c) 2011-2012 Jia Liu <proljc@gmail.com>
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.
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.
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/>.
20 #include "qemu/osdep.h"
21 #include "hw/hw.h"
22 #include "hw/boards.h"
24 static const VMStateDescription vmstate_env = {
25 .name = "env",
26 .version_id = 1,
27 .minimum_version_id = 1,
28 .fields = (VMStateField[]) {
29 VMSTATE_UINT32_ARRAY(gpr, CPUOpenRISCState, 32),
30 VMSTATE_UINT32(sr, CPUOpenRISCState),
31 VMSTATE_UINT32(epcr, CPUOpenRISCState),
32 VMSTATE_UINT32(eear, CPUOpenRISCState),
33 VMSTATE_UINT32(esr, CPUOpenRISCState),
34 VMSTATE_UINT32(fpcsr, CPUOpenRISCState),
35 VMSTATE_UINT32(pc, CPUOpenRISCState),
36 VMSTATE_UINT32(npc, CPUOpenRISCState),
37 VMSTATE_UINT32(ppc, CPUOpenRISCState),
38 VMSTATE_END_OF_LIST()
42 const VMStateDescription vmstate_openrisc_cpu = {
43 .name = "cpu",
44 .version_id = 1,
45 .minimum_version_id = 1,
46 .fields = (VMStateField[]) {
47 VMSTATE_CPU(),
48 VMSTATE_STRUCT(env, OpenRISCCPU, 1, vmstate_env, CPUOpenRISCState),
49 VMSTATE_END_OF_LIST()