Michael Walle | c6af569 | 2011-02-17 23:45:05 +0100 | [diff] [blame] | 1 | #include "hw/hw.h" |
| 2 | #include "hw/boards.h" |
| 3 | |
| 4 | static const VMStateDescription vmstate_cpu = { |
| 5 | .name = "cpu", |
| 6 | .version_id = CPU_SAVE_VERSION, |
| 7 | .minimum_version_id = 1, |
| 8 | .minimum_version_id_old = 1, |
| 9 | .fields = (VMStateField[]) { |
Andreas Färber | 6393c08 | 2012-03-14 01:38:22 +0100 | [diff] [blame] | 10 | VMSTATE_UINT32_ARRAY(regs, CPULM32State, 32), |
| 11 | VMSTATE_UINT32(pc, CPULM32State), |
| 12 | VMSTATE_UINT32(ie, CPULM32State), |
| 13 | VMSTATE_UINT32(icc, CPULM32State), |
| 14 | VMSTATE_UINT32(dcc, CPULM32State), |
| 15 | VMSTATE_UINT32(cc, CPULM32State), |
| 16 | VMSTATE_UINT32(eba, CPULM32State), |
| 17 | VMSTATE_UINT32(dc, CPULM32State), |
| 18 | VMSTATE_UINT32(deba, CPULM32State), |
| 19 | VMSTATE_UINT32_ARRAY(bp, CPULM32State, 4), |
| 20 | VMSTATE_UINT32_ARRAY(wp, CPULM32State, 4), |
Michael Walle | c6af569 | 2011-02-17 23:45:05 +0100 | [diff] [blame] | 21 | VMSTATE_END_OF_LIST() |
| 22 | } |
| 23 | }; |
| 24 | |
| 25 | void cpu_save(QEMUFile *f, void *opaque) |
| 26 | { |
| 27 | vmstate_save_state(f, &vmstate_cpu, opaque); |
| 28 | } |
| 29 | |
| 30 | int cpu_load(QEMUFile *f, void *opaque, int version_id) |
| 31 | { |
| 32 | return vmstate_load_state(f, &vmstate_cpu, opaque, version_id); |
| 33 | } |