|
@@ -7,6 +7,8 @@
|
|
#include <linux/linkage.h>
|
|
#include <linux/linkage.h>
|
|
#include <linux/compat.h>
|
|
#include <linux/compat.h>
|
|
#include <linux/ioport.h>
|
|
#include <linux/ioport.h>
|
|
|
|
+#include <linux/elfcore.h>
|
|
|
|
+#include <linux/elf.h>
|
|
#include <asm/kexec.h>
|
|
#include <asm/kexec.h>
|
|
|
|
|
|
/* Verify architecture specific macros are defined */
|
|
/* Verify architecture specific macros are defined */
|
|
@@ -31,6 +33,19 @@
|
|
#error KEXEC_ARCH not defined
|
|
#error KEXEC_ARCH not defined
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
+#define KEXEC_NOTE_HEAD_BYTES ALIGN(sizeof(struct elf_note), 4)
|
|
|
|
+#define KEXEC_CORE_NOTE_NAME "CORE"
|
|
|
|
+#define KEXEC_CORE_NOTE_NAME_BYTES ALIGN(sizeof(KEXEC_CORE_NOTE_NAME), 4)
|
|
|
|
+#define KEXEC_CORE_NOTE_DESC_BYTES ALIGN(sizeof(struct elf_prstatus), 4)
|
|
|
|
+/*
|
|
|
|
+ * The per-cpu notes area is a list of notes terminated by a "NULL"
|
|
|
|
+ * note header. For kdump, the code in vmcore.c runs in the context
|
|
|
|
+ * of the second kernel to combine them into one note.
|
|
|
|
+ */
|
|
|
|
+#define KEXEC_NOTE_BYTES ( (KEXEC_NOTE_HEAD_BYTES * 2) + \
|
|
|
|
+ KEXEC_CORE_NOTE_NAME_BYTES + \
|
|
|
|
+ KEXEC_CORE_NOTE_DESC_BYTES )
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* This structure is used to hold the arguments that are used when loading
|
|
* This structure is used to hold the arguments that are used when loading
|
|
* kernel binaries.
|
|
* kernel binaries.
|
|
@@ -136,7 +151,7 @@ extern struct kimage *kexec_crash_image;
|
|
/* Location of a reserved region to hold the crash kernel.
|
|
/* Location of a reserved region to hold the crash kernel.
|
|
*/
|
|
*/
|
|
extern struct resource crashk_res;
|
|
extern struct resource crashk_res;
|
|
-typedef u32 note_buf_t[MAX_NOTE_BYTES/4];
|
|
|
|
|
|
+typedef u32 note_buf_t[KEXEC_NOTE_BYTES/4];
|
|
extern note_buf_t *crash_notes;
|
|
extern note_buf_t *crash_notes;
|
|
|
|
|
|
|
|
|