xref: /qemu/include/system/dump-arch.h (revision 9b72224f44612ddd5b434a1bccf79346946d11da)
1acb0ef58SBharata B Rao /*
2acb0ef58SBharata B Rao  * QEMU dump
3acb0ef58SBharata B Rao  *
4acb0ef58SBharata B Rao  * Copyright Fujitsu, Corp. 2011, 2012
5acb0ef58SBharata B Rao  *
6acb0ef58SBharata B Rao  * Authors:
7acb0ef58SBharata B Rao  *     Wen Congyang <wency@cn.fujitsu.com>
8acb0ef58SBharata B Rao  *
9acb0ef58SBharata B Rao  * This work is licensed under the terms of the GNU GPL, version 2 or later.
10acb0ef58SBharata B Rao  * See the COPYING file in the top-level directory.
11acb0ef58SBharata B Rao  *
12acb0ef58SBharata B Rao  */
13acb0ef58SBharata B Rao 
14acb0ef58SBharata B Rao #ifndef DUMP_ARCH_H
15acb0ef58SBharata B Rao #define DUMP_ARCH_H
16acb0ef58SBharata B Rao 
17acb0ef58SBharata B Rao typedef struct ArchDumpInfo {
18acb0ef58SBharata B Rao     int d_machine;           /* Architecture */
19acb0ef58SBharata B Rao     int d_endian;            /* ELFDATA2LSB or ELFDATA2MSB */
20acb0ef58SBharata B Rao     int d_class;             /* ELFCLASS32 or ELFCLASS64 */
218161befdSAndrew Jones     uint32_t page_size;      /* The target's page size. If it's variable and
228161befdSAndrew Jones                               * unknown, then this should be the maximum. */
23b6e05aa4SAndrew Jones     uint64_t phys_base;      /* The target's physmem base. */
24*9b72224fSJanosch Frank     void (*arch_sections_add_fn)(DumpState *s);
25*9b72224fSJanosch Frank     uint64_t (*arch_sections_write_hdr_fn)(DumpState *s, uint8_t *buff);
26*9b72224fSJanosch Frank     int (*arch_sections_write_fn)(DumpState *s, uint8_t *buff);
27acb0ef58SBharata B Rao } ArchDumpInfo;
28acb0ef58SBharata B Rao 
29acb0ef58SBharata B Rao struct GuestPhysBlockList; /* memory_mapping.h */
30acb0ef58SBharata B Rao int cpu_get_dump_info(ArchDumpInfo *info,
31acb0ef58SBharata B Rao                       const struct GuestPhysBlockList *guest_phys_blocks);
32acb0ef58SBharata B Rao ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
33acb0ef58SBharata B Rao 
34acb0ef58SBharata B Rao #endif
35