Skip to content

Commit

Permalink
kexec-bzImage64: support for loading bzImage using 64bit entry
Browse files Browse the repository at this point in the history
This is loader specific code which can load bzImage and set it up for
64bit entry.  This does not take care of 32bit entry or real mode entry.

32bit mode entry can be implemented if somebody needs it.

Signed-off-by: Vivek Goyal <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Michael Kerrisk <[email protected]>
Cc: Yinghai Lu <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Dave Young <[email protected]>
Cc: WANG Chao <[email protected]>
Cc: Baoquan He <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rhvgoyal authored and torvalds committed Aug 8, 2014
1 parent 12db556 commit 27f48d3
Show file tree
Hide file tree
Showing 7 changed files with 415 additions and 6 deletions.
6 changes: 6 additions & 0 deletions arch/x86/include/asm/kexec-bzimage64.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef _ASM_KEXEC_BZIMAGE64_H
#define _ASM_KEXEC_BZIMAGE64_H

extern struct kexec_file_ops kexec_bzImage64_ops;

#endif /* _ASM_KEXE_BZIMAGE64_H */
21 changes: 21 additions & 0 deletions arch/x86/include/asm/kexec.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <asm/page.h>
#include <asm/ptrace.h>
#include <asm/bootparam.h>

/*
* KEXEC_SOURCE_MEMORY_LIMIT maximum page get_free_page can return.
Expand Down Expand Up @@ -161,6 +162,26 @@ struct kimage_arch {
pmd_t *pmd;
pte_t *pte;
};

struct kexec_entry64_regs {
uint64_t rax;
uint64_t rbx;
uint64_t rcx;
uint64_t rdx;
uint64_t rsi;
uint64_t rdi;
uint64_t rsp;
uint64_t rbp;
uint64_t r8;
uint64_t r9;
uint64_t r10;
uint64_t r11;
uint64_t r12;
uint64_t r13;
uint64_t r14;
uint64_t r15;
uint64_t rip;
};
#endif

typedef void crash_vmclear_fn(void);
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,5 @@ ifeq ($(CONFIG_X86_64),y)

obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o
obj-y += vsmp_64.o
obj-$(CONFIG_KEXEC) += kexec-bzimage64.o
endif
Loading

0 comments on commit 27f48d3

Please sign in to comment.