]> Git Repo - qemu.git/blob - target-cris/machine.c
io: add QIOChannelTLS class
[qemu.git] / target-cris / machine.c
1 /*
2  *  CRIS virtual CPU state save/load support
3  *
4  *  Copyright (c) 2012 Red Hat, Inc.
5  *  Written by Juan Quintela <[email protected]>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
19  */
20
21 #include "hw/hw.h"
22
23 static const VMStateDescription vmstate_tlbset = {
24     .name = "cpu/tlbset",
25     .version_id = 1,
26     .minimum_version_id = 1,
27     .fields = (VMStateField[]) {
28         VMSTATE_UINT32(lo, TLBSet),
29         VMSTATE_UINT32(hi, TLBSet),
30         VMSTATE_END_OF_LIST()
31     }
32 };
33
34 static const VMStateDescription vmstate_cris_env = {
35     .name = "env",
36     .version_id = 2,
37     .minimum_version_id = 2,
38     .fields = (VMStateField[]) {
39         VMSTATE_UINT32_ARRAY(regs, CPUCRISState, 16),
40         VMSTATE_UINT32_ARRAY(pregs, CPUCRISState, 16),
41         VMSTATE_UINT32(pc, CPUCRISState),
42         VMSTATE_UINT32(ksp, CPUCRISState),
43         VMSTATE_INT32(dslot, CPUCRISState),
44         VMSTATE_INT32(btaken, CPUCRISState),
45         VMSTATE_UINT32(btarget, CPUCRISState),
46         VMSTATE_UINT32(cc_op, CPUCRISState),
47         VMSTATE_UINT32(cc_mask, CPUCRISState),
48         VMSTATE_UINT32(cc_dest, CPUCRISState),
49         VMSTATE_UINT32(cc_src, CPUCRISState),
50         VMSTATE_UINT32(cc_result, CPUCRISState),
51         VMSTATE_INT32(cc_size, CPUCRISState),
52         VMSTATE_INT32(cc_x, CPUCRISState),
53         VMSTATE_INT32(locked_irq, CPUCRISState),
54         VMSTATE_INT32(interrupt_vector, CPUCRISState),
55         VMSTATE_INT32(fault_vector, CPUCRISState),
56         VMSTATE_INT32(trap_vector, CPUCRISState),
57         VMSTATE_UINT32_ARRAY(sregs[0], CPUCRISState, 16),
58         VMSTATE_UINT32_ARRAY(sregs[1], CPUCRISState, 16),
59         VMSTATE_UINT32_ARRAY(sregs[2], CPUCRISState, 16),
60         VMSTATE_UINT32_ARRAY(sregs[3], CPUCRISState, 16),
61         VMSTATE_UINT32(mmu_rand_lfsr, CPUCRISState),
62         VMSTATE_STRUCT_ARRAY(tlbsets[0][0], CPUCRISState, 16, 0,
63                              vmstate_tlbset, TLBSet),
64         VMSTATE_STRUCT_ARRAY(tlbsets[0][1], CPUCRISState, 16, 0,
65                              vmstate_tlbset, TLBSet),
66         VMSTATE_STRUCT_ARRAY(tlbsets[0][2], CPUCRISState, 16, 0,
67                              vmstate_tlbset, TLBSet),
68         VMSTATE_STRUCT_ARRAY(tlbsets[0][3], CPUCRISState, 16, 0,
69                              vmstate_tlbset, TLBSet),
70         VMSTATE_STRUCT_ARRAY(tlbsets[1][0], CPUCRISState, 16, 0,
71                              vmstate_tlbset, TLBSet),
72         VMSTATE_STRUCT_ARRAY(tlbsets[1][1], CPUCRISState, 16, 0,
73                              vmstate_tlbset, TLBSet),
74         VMSTATE_STRUCT_ARRAY(tlbsets[1][2], CPUCRISState, 16, 0,
75                              vmstate_tlbset, TLBSet),
76         VMSTATE_STRUCT_ARRAY(tlbsets[1][3], CPUCRISState, 16, 0,
77                              vmstate_tlbset, TLBSet),
78         VMSTATE_END_OF_LIST()
79     }
80 };
81
82 const VMStateDescription vmstate_cris_cpu = {
83     .name = "cpu",
84     .version_id = 1,
85     .minimum_version_id = 1,
86     .fields = (VMStateField[]) {
87         VMSTATE_CPU(),
88         VMSTATE_STRUCT(env, CRISCPU, 1, vmstate_cris_env, CPUCRISState),
89         VMSTATE_END_OF_LIST()
90     }
91 };
This page took 0.02798 seconds and 4 git commands to generate.