1 #ifndef _ASM_I386_DISKDUMP_H
2 #define _ASM_I386_DISKDUMP_H
5 * linux/include/asm-i386/diskdump.h
7 * Copyright (c) 2004 FUJITSU LIMITED
8 * Copyright (c) 2003 Red Hat, Inc. All rights reserved.
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2, or (at your option)
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #include <linux/elf.h>
30 #include <asm/crashdump.h>
32 const static int platform_supports_diskdump = 1;
34 struct disk_dump_sub_header {
35 elf_gregset_t elf_regs;
38 #define size_of_sub_header() ((sizeof(struct disk_dump_sub_header) + PAGE_SIZE - 1) / DUMP_BLOCK_SIZE)
40 #define write_sub_header() \
44 ELF_CORE_COPY_REGS(dump_sub_header.elf_regs, (&myregs)); \
45 clear_page(scratch); \
46 memcpy(scratch, &dump_sub_header, sizeof(dump_sub_header)); \
48 if ((ret = write_blocks(dump_part, 2, scratch, 1)) >= 0) \
49 ret = 1; /* size of sub header in page */; \
53 #endif /* __KERNEL__ */
55 #endif /* _ASM_I386_DISKDUMP_H */