diff options
author | Russell King <rmk@arm.linux.org.uk> | 2016-03-14 22:29:08 +0000 |
---|---|---|
committer | Russell King <rmk@arm.linux.org.uk> | 2018-03-20 14:58:05 +0000 |
commit | 7c78356e8f45ded79ceb9625e4990f61298113ba (patch) | |
tree | 5df6b4b1c1e39431892b716916711c77544d7c9e /kexec | |
parent | f57f0bf8975d24fe1e7c4936fdfb5c3b123ab75f (diff) |
remaining TI changesti-keystone2
Diffstat (limited to 'kexec')
-rw-r--r-- | kexec/crashdump-elf.c | 4 | ||||
-rw-r--r-- | kexec/kexec.c | 2 | ||||
-rw-r--r-- | kexec/kexec.h | 6 |
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 */ |