On Thu, Jul 27, 2006 at 12:32:56PM -0600, Eric W. Biederman wrote:
>
> I have found a couple of moments and have been able to
> catch up with most of the backlog of patches for kexec-tools.
> There are several details I need to follow up on, and there is
> some testing I want to do to make certain everything is working.
>
> The primary kexec-tools archive is:
> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools.git
>
> An archive to hold versions before 1.101 is at:
> git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/kexec-tools-historic.git
>
> So far I have all version in there since 1.0 except 1.9, 1.92, and 1.93
> if someone happens to have a copy point me at it and I will update the
> history.
>
> Patches that hang out in quilt for a while can be annoying to import
> into git because their authorship information is not stored in an
> unambiguous way. git is general is much stricter about the format
> it's meta-data information is stored in.
>
> Maneesh in kdump10 there were two patches in particular that I have
> not sorted out their who wrote them. If you could help me sort that
> out I would appreciate it.
>
> ppc64-initrd-option.patch
> ppc64-kdump-device_tree-sort.patch
>
> Before I make a release here is my list of things I intend to look at:
> - Why we have defined the location of the crash backup region twice.
Hi Eric,
Are you referring to BACKUP_REGION_START and BACKUP_START declarations?
I am not sure why did I do that, may be somehow I thought that purgatory
code is not sharing the header files with main kexec code base.
Please have a look at the patch attached for i386. If this looks
fine, I shall generate the patches for x86_64 and ppc64 too.
Thanks & Regards
Vivek
Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]>
---
kexec-tools-1.101-vivek/kexec/arch/i386/crashdump-x86.c | 8 ++++----
kexec-tools-1.101-vivek/kexec/arch/i386/crashdump-x86.h | 7 ++++---
kexec-tools-1.101-vivek/purgatory/arch/i386/crashdump_backup.c | 8 +++-----
3 files changed, 11 insertions(+), 12 deletions(-)
diff -puN
purgatory/arch/i386/crashdump_backup.c~kexec-tools-backup-region-definition-fix
purgatory/arch/i386/crashdump_backup.c
---
kexec-tools-1.101/purgatory/arch/i386/crashdump_backup.c~kexec-tools-backup-region-definition-fix
2006-07-27 13:59:32.000000000 -0700
+++ kexec-tools-1.101-vivek/purgatory/arch/i386/crashdump_backup.c
2006-07-27 14:52:59.000000000 -0700
@@ -20,9 +20,7 @@
#include <stdint.h>
#include <string.h>
-
-#define BACKUP_REGION_SOURCE 0x00000000
-#define BACKUP_REGION_SIZE 0xa0000
+#include "../../../kexec/arch/i386/crashdump-x86.h"
/* Backup region start gets set after /proc/iomem has been parsed. */
/* We reuse the same code for x86_64 also so changing backup_start to
@@ -37,10 +35,10 @@ void crashdump_backup_memory(void)
{
void *dest, *src;
- src = (void *) BACKUP_REGION_SOURCE;
+ src = (void *) BACKUP_SRC_START;
if (backup_start) {
dest = (void *)(backup_start);
- memcpy(dest, src, BACKUP_REGION_SIZE);
+ memcpy(dest, src, BACKUP_SRC_SIZE);
}
}
diff -puN
kexec/arch/i386/crashdump-x86.h~kexec-tools-backup-region-definition-fix
kexec/arch/i386/crashdump-x86.h
---
kexec-tools-1.101/kexec/arch/i386/crashdump-x86.h~kexec-tools-backup-region-definition-fix
2006-07-27 14:08:55.000000000 -0700
+++ kexec-tools-1.101-vivek/kexec/arch/i386/crashdump-x86.h 2006-07-27
14:57:11.000000000 -0700
@@ -1,6 +1,7 @@
#ifndef CRASHDUMP_X86_H
#define CRASHDUMP_X86_H
+struct kexec_info;
int load_crashdump_segments(struct kexec_info *info, char *mod_cmdline,
unsigned long max_addr, unsigned long min_base);
@@ -14,8 +15,8 @@ int load_crashdump_segments(struct kexec
#define CRASH_MAX_MEMORY_RANGES (MAX_MEMORY_RANGES + 2)
/* Backup Region, First 640K of System RAM. */
-#define BACKUP_START 0x00000000
-#define BACKUP_END 0x0009ffff
-#define BACKUP_SIZE (BACKUP_END - BACKUP_START + 1)
+#define BACKUP_SRC_START 0x00000000
+#define BACKUP_SRC_END 0x0009ffff
+#define BACKUP_SRC_SIZE (BACKUP_SRC_END - BACKUP_SRC_START + 1)
#endif /* CRASHDUMP_X86_H */
diff -puN
kexec/arch/i386/crashdump-x86.c~kexec-tools-backup-region-definition-fix
kexec/arch/i386/crashdump-x86.c
---
kexec-tools-1.101/kexec/arch/i386/crashdump-x86.c~kexec-tools-backup-region-definition-fix
2006-07-27 14:53:23.000000000 -0700
+++ kexec-tools-1.101-vivek/kexec/arch/i386/crashdump-x86.c 2006-07-27
14:55:15.000000000 -0700
@@ -535,7 +535,7 @@ static int prepare_crash_memory_elf64_he
bufp += sizeof(Elf64_Phdr);
phdr->p_type = PT_LOAD;
phdr->p_flags = PF_R|PF_W|PF_X;
- if (mstart == BACKUP_START && mend == BACKUP_END)
+ if (mstart == BACKUP_SRC_START && mend == BACKUP_SRC_END)
phdr->p_offset = info->backup_start;
else
phdr->p_offset = mstart;
@@ -632,7 +632,7 @@ static int prepare_crash_memory_elf32_he
bufp += sizeof(Elf32_Phdr);
phdr->p_type = PT_LOAD;
phdr->p_flags = PF_R|PF_W|PF_X;
- if (mstart == BACKUP_START && mend == BACKUP_END)
+ if (mstart == BACKUP_SRC_START && mend == BACKUP_SRC_END)
phdr->p_offset = info->backup_start;
else
phdr->p_offset = mstart;
@@ -671,12 +671,12 @@ int load_crashdump_segments(struct kexec
sz = (sizeof(struct memory_range) * (KEXEC_MAX_SEGMENTS + 1));
memmap_p = xmalloc(sz);
memset(memmap_p, 0, sz);
- add_memmap(memmap_p, BACKUP_START, BACKUP_SIZE);
+ add_memmap(memmap_p, BACKUP_SRC_START, BACKUP_SRC_SIZE);
sz = crash_reserved_mem.end - crash_reserved_mem.start +1;
add_memmap(memmap_p, crash_reserved_mem.start, sz);
/* Create a backup region segment to store backup data*/
- sz = (BACKUP_SIZE + align - 1) & ~(align - 1);
+ sz = (BACKUP_SRC_SIZE + align - 1) & ~(align - 1);
tmp = xmalloc(sz);
memset(tmp, 0, sz);
info->backup_start = add_buffer(info, tmp, sz, sz, align,
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot