summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/ppc/crashdump-powerpc.c7
-rw-r--r--kexec/arch/ppc/crashdump-powerpc.h8
-rw-r--r--kexec/arch/ppc/kexec-ppc.c5
3 files changed, 19 insertions, 1 deletions
diff --git a/kexec/arch/ppc/crashdump-powerpc.c b/kexec/arch/ppc/crashdump-powerpc.c
index 243721a..7c9dbff 100644
--- a/kexec/arch/ppc/crashdump-powerpc.c
+++ b/kexec/arch/ppc/crashdump-powerpc.c
@@ -95,11 +95,13 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
}
memset(crash_memory_range, 0, crash_rng_len);
+#ifndef CONFIG_BOOKE
/* create a separate program header for the backup region */
crash_memory_range[0].start = BACKUP_SRC_START;
crash_memory_range[0].end = BACKUP_SRC_END + 1;
crash_memory_range[0].type = RANGE_RAM;
memory_ranges++;
+#endif
dir = opendir(device_tree);
if (!dir) {
@@ -143,9 +145,10 @@ static int get_crash_memory_ranges(struct memory_range **range, int *ranges)
" excedeed the max limit\n");
goto err;
}
-
+#ifndef CONFIG_BOOKE
if (start == 0 && end >= (BACKUP_SRC_END + 1))
start = BACKUP_SRC_END + 1;
+#endif
cstart = crash_base;
cend = crash_base + crash_size;
@@ -310,6 +313,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
info->backup_src_start = BACKUP_SRC_START;
info->backup_src_size = BACKUP_SRC_SIZE;
+#ifndef CONFIG_BOOKE
/* Create a backup region segment to store backup data*/
sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1);
tmp = xmalloc(sz);
@@ -317,6 +321,7 @@ int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
info->backup_start = add_buffer(info, tmp, sz, sz, align,
0, max_addr, 1);
reserve(info->backup_start, sz);
+#endif
/* On powerpc memory ranges in device-tree is denoted as start
* and size rather than start and end, as is the case with
diff --git a/kexec/arch/ppc/crashdump-powerpc.h b/kexec/arch/ppc/crashdump-powerpc.h
index dc2772d..a377146 100644
--- a/kexec/arch/ppc/crashdump-powerpc.h
+++ b/kexec/arch/ppc/crashdump-powerpc.h
@@ -21,10 +21,18 @@ extern struct arch_options_t arch_options;
#define __pa(x) ((unsigned long)(x)-PAGE_OFFSET)
#define COMMAND_LINE_SIZE 512 /* from kernel */
+
+#ifdef CONFIG_BOOKE
+/* We don't need backup region in Book E */
+#define BACKUP_SRC_START 0x0000
+#define BACKUP_SRC_END 0x0000
+#define BACKUP_SRC_SIZE 0x0000
+#else
/* Backup Region, First 64K of System RAM. */
#define BACKUP_SRC_START 0x0000
#define BACKUP_SRC_END 0xffff
#define BACKUP_SRC_SIZE (BACKUP_SRC_END - BACKUP_SRC_START + 1)
+#endif
#define KDUMP_BACKUP_LIMIT BACKUP_SRC_SIZE
#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1)))
diff --git a/kexec/arch/ppc/kexec-ppc.c b/kexec/arch/ppc/kexec-ppc.c
index 4e3569f..57852dc 100644
--- a/kexec/arch/ppc/kexec-ppc.c
+++ b/kexec/arch/ppc/kexec-ppc.c
@@ -502,9 +502,14 @@ static int get_devtree_details(unsigned long kexec_flags)
if (crash_base + crash_size < mem_max)
mem_max = crash_base + crash_size;
+#ifndef CONFIG_BOOKE
add_usable_mem_rgns(0, crash_base + crash_size);
+ /* Reserve the region (KDUMP_BACKUP_LIMIT,crash_base) */
reserve(KDUMP_BACKUP_LIMIT,
crash_base-KDUMP_BACKUP_LIMIT);
+#else
+ add_usable_mem_rgns(crash_base, crash_size);
+#endif
}
/* reserve the initrd_start and end locations. */
memset(fname, 0, sizeof(fname));