summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
Diffstat (limited to 'kexec')
-rw-r--r--kexec/crashdump-elf.c4
-rw-r--r--kexec/kexec.c2
-rw-r--r--kexec/kexec.h6
3 files changed, 11 insertions, 1 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c
index b8bb686..045f6b5 100644
--- a/kexec/crashdump-elf.c
+++ b/kexec/crashdump-elf.c
@@ -152,7 +152,7 @@ int FUNC(struct kexec_info *info,
bufp += sizeof(PHDR);
phdr->p_type = PT_NOTE;
phdr->p_flags = 0;
- phdr->p_offset = phdr->p_paddr = notes_addr;
+ phdr->p_offset = phdr->p_paddr = notes_addr - K2_ALIAS_OFFSET;
phdr->p_vaddr = 0;
phdr->p_filesz = phdr->p_memsz = notes_len;
/* Do we need any alignment of segments? */
@@ -203,6 +203,8 @@ int FUNC(struct kexec_info *info,
continue;
mstart = range->start;
mend = range->end;
+ if (mend >= 0x100000000ULL)
+ continue;
if (!mstart && !mend)
continue;
phdr = (PHDR *) bufp;
diff --git a/kexec/kexec.c b/kexec/kexec.c
index cfd837c..2c696c6 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -883,10 +883,12 @@ static int my_shutdown(void)
*/
static int my_exec(void)
{
+if (1) {
if (xen_present())
xen_kexec_exec();
else
reboot(LINUX_REBOOT_CMD_KEXEC);
+}
/* I have failed if I make it here */
fprintf(stderr, "kexec failed: %s\n",
strerror(errno));
diff --git a/kexec/kexec.h b/kexec/kexec.h
index 26225d2..cd2e4b0 100644
--- a/kexec/kexec.h
+++ b/kexec/kexec.h
@@ -319,4 +319,10 @@ int xen_kexec_status(uint64_t kexec_flags);
extern unsigned long long get_kernel_sym(const char *text);
+/* Keystone2 definitions */
+
+#define K2_MEM_START 0x800000000ULL
+#define K2_MEM_2G_END 0x880000000ULL
+#define K2_ALIAS_OFFSET 0x780000000ULL
+
#endif /* KEXEC_H */