Jia Liu | e67db06 | 2012-07-20 15:50:39 +0800 | [diff] [blame] | 1 | /* |
| 2 | * OpenRISC Machine |
| 3 | * |
| 4 | * Copyright (c) 2011-2012 Jia Liu <proljc@gmail.com> |
| 5 | * |
| 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. |
| 10 | * |
| 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. |
| 15 | * |
| 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/>. |
| 18 | */ |
| 19 | |
Peter Maydell | ed2decc | 2016-01-26 18:17:22 +0000 | [diff] [blame] | 20 | #include "qemu/osdep.h" |
Paolo Bonzini | 33c1187 | 2016-03-15 16:58:45 +0100 | [diff] [blame] | 21 | #include "qemu-common.h" |
| 22 | #include "cpu.h" |
Jia Liu | e67db06 | 2012-07-20 15:50:39 +0800 | [diff] [blame] | 23 | #include "hw/hw.h" |
| 24 | #include "hw/boards.h" |
Paolo Bonzini | 1e00b8d | 2016-03-15 12:51:18 +0100 | [diff] [blame] | 25 | #include "migration/cpu.h" |
Jia Liu | e67db06 | 2012-07-20 15:50:39 +0800 | [diff] [blame] | 26 | |
Andreas Färber | da69721 | 2013-02-02 13:59:05 +0100 | [diff] [blame] | 27 | static const VMStateDescription vmstate_env = { |
| 28 | .name = "env", |
| 29 | .version_id = 1, |
| 30 | .minimum_version_id = 1, |
Jia Liu | e67db06 | 2012-07-20 15:50:39 +0800 | [diff] [blame] | 31 | .fields = (VMStateField[]) { |
| 32 | VMSTATE_UINT32_ARRAY(gpr, CPUOpenRISCState, 32), |
| 33 | VMSTATE_UINT32(sr, CPUOpenRISCState), |
| 34 | VMSTATE_UINT32(epcr, CPUOpenRISCState), |
| 35 | VMSTATE_UINT32(eear, CPUOpenRISCState), |
| 36 | VMSTATE_UINT32(esr, CPUOpenRISCState), |
| 37 | VMSTATE_UINT32(fpcsr, CPUOpenRISCState), |
| 38 | VMSTATE_UINT32(pc, CPUOpenRISCState), |
| 39 | VMSTATE_UINT32(npc, CPUOpenRISCState), |
| 40 | VMSTATE_UINT32(ppc, CPUOpenRISCState), |
| 41 | VMSTATE_END_OF_LIST() |
| 42 | } |
| 43 | }; |
| 44 | |
Andreas Färber | da69721 | 2013-02-02 13:59:05 +0100 | [diff] [blame] | 45 | const VMStateDescription vmstate_openrisc_cpu = { |
| 46 | .name = "cpu", |
| 47 | .version_id = 1, |
| 48 | .minimum_version_id = 1, |
Andreas Färber | da69721 | 2013-02-02 13:59:05 +0100 | [diff] [blame] | 49 | .fields = (VMStateField[]) { |
| 50 | VMSTATE_CPU(), |
| 51 | VMSTATE_STRUCT(env, OpenRISCCPU, 1, vmstate_env, CPUOpenRISCState), |
| 52 | VMSTATE_END_OF_LIST() |
| 53 | } |
| 54 | }; |