kexec-tools: Test the range code on i386
This patch simply shows how the new range code works. My plan is to replace
get_crash_memory_ranges() with a few lines of generic range code.
Signed-off-by: Magnus Damm <[EMAIL PROTECTED]>
---
kexec/arch/i386/crashdump-x86.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
--- 0001/kexec/arch/i386/crashdump-x86.c
+++ work/kexec/arch/i386/crashdump-x86.c 2006-12-22 16:52:20.000000000
+0900
@@ -497,6 +497,26 @@ int load_crashdump_segments(struct kexec
unsigned long sz, elfcorehdr;
int nr_ranges, align = 1024;
struct memory_range *mem_range, *memmap_p;
+ struct range r;
+
+ range_init(&r);
+
+ if (get_iomem_range(&r) < 0) {
+ range_cleanup(&r);
+ return -1;
+ }
+
+ range_dump(&r, "after reading /proc/iomem");
+
+ if (range_set(&r, BACKUP_SRC_START, BACKUP_SRC_END,
+ RANGE_IOMEM_RAM) < 0) {
+ range_cleanup(&r);
+ return -1;
+ }
+
+ range_dump(&r, "after BACKUP modification");
+
+ range_cleanup(&r);
if (get_crash_memory_ranges(&mem_range, &nr_ranges) < 0)
return -1;
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot