crash/vmcore.h
Dave Anderson 71a4f36767 Linux 4.18 kernels introduced a new CONFIG_PROC_VMCORE_DEVICE_DUMP
configuration in commit 2724273e8fd00b512596a77ee063f49b25f36507,
titled "vmcore: add API to collect hardware dump in second kernel",
in which device drivers may collect a device specific snapshot of the
hardware/firmware state of their underlying devices, and export the
data as a kdump ELF note with type NT_VMCOREDD.  This patch
recognizes the new ELF note(s) in both ELF and compressed kdump
vmcore dumpfiles.  The "help -[nD]" option shows basic information
about each note, and two new "dev" command options have been
introduced.  The "dev -V" option displays an indexed list of each
note, showing the device name, the dumpfile offset, and the size
of each note.  The "dev -v index [file]" option either dumps the
contents of a note to the display screen in a human-readable format,
or copies the note data directly to a specified file.
(surendra@chelsio.com)
2019-04-23 14:36:56 -04:00

37 lines
1.0 KiB
C

/*
* vmcore.h
*
* Copyright (C) 2019 Chelsio Communications. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _VMCORE_H
#define _VMCORE_H
#include <linux/types.h>
#ifndef NT_VMCOREDD
#define NT_VMCOREDD 0x700
#endif
#define VMCOREDD_NOTE_NAME "LINUX"
#define VMCOREDD_MAX_NAME_BYTES 44
struct vmcoredd_header {
__u32 n_namesz; /* Name size */
__u32 n_descsz; /* Content size */
__u32 n_type; /* NT_VMCOREDD */
__u8 name[8]; /* LINUX\0\0\0 */
__u8 dump_name[VMCOREDD_MAX_NAME_BYTES]; /* Device dump's name */
};
#endif /* _VMCORE_H */