2014-05-19 19:57:44 +02:00
|
|
|
/*
|
|
|
|
* QEMU dump
|
|
|
|
*
|
|
|
|
* Copyright Fujitsu, Corp. 2011, 2012
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Wen Congyang <wency@cn.fujitsu.com>
|
|
|
|
*
|
|
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
|
* See the COPYING file in the top-level directory.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DUMP_ARCH_H
|
|
|
|
#define DUMP_ARCH_H
|
|
|
|
|
|
|
|
typedef struct ArchDumpInfo {
|
2016-01-11 20:56:20 +01:00
|
|
|
int d_machine; /* Architecture */
|
|
|
|
int d_endian; /* ELFDATA2LSB or ELFDATA2MSB */
|
|
|
|
int d_class; /* ELFCLASS32 or ELFCLASS64 */
|
|
|
|
uint32_t page_size; /* The target's page size. If it's variable and
|
|
|
|
* unknown, then this should be the maximum. */
|
2016-01-11 20:56:21 +01:00
|
|
|
uint64_t phys_base; /* The target's physmem base. */
|
2022-10-17 13:32:10 +02:00
|
|
|
void (*arch_sections_add_fn)(DumpState *s);
|
|
|
|
uint64_t (*arch_sections_write_hdr_fn)(DumpState *s, uint8_t *buff);
|
|
|
|
int (*arch_sections_write_fn)(DumpState *s, uint8_t *buff);
|
2023-11-09 13:04:42 +01:00
|
|
|
void (*arch_cleanup_fn)(DumpState *s);
|
2014-05-19 19:57:44 +02:00
|
|
|
} ArchDumpInfo;
|
|
|
|
|
|
|
|
struct GuestPhysBlockList; /* memory_mapping.h */
|
|
|
|
int cpu_get_dump_info(ArchDumpInfo *info,
|
|
|
|
const struct GuestPhysBlockList *guest_phys_blocks);
|
|
|
|
ssize_t cpu_get_note_size(int class, int machine, int nr_cpus);
|
|
|
|
|
|
|
|
#endif
|