o "kexec -l bzImage" fails on i386 system with more than 4G of RAM. Error
message displayed is "Could not put setup code above the kernel parameters".
o Now with 64bit resource patch, memory more than 4G is exported through
/proc/iomem. locate_hole() is using local varibles of size unsigned long
and that truncates memory values at some placed and leads to undesired
results.
o hole_align is also unsigned long and which ends up resetting top 32 bits
of 64bit memory start field while alignment operation is done.
Signed-off-by: Vivek Goyal <[EMAIL PROTECTED]>
---
kexec/kexec.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff -puN kexec/kexec.c~kexec-tools-phys-mem-more-than-4G-fix kexec/kexec.c
--- kexec-tools-1.101/kexec/kexec.c~kexec-tools-phys-mem-more-than-4G-fix
2006-03-30 15:14:40.000000000 -0500
+++ kexec-tools-1.101-root/kexec/kexec.c 2006-03-30 15:43:23.000000000
-0500
@@ -193,8 +193,8 @@ unsigned long locate_hole(struct kexec_i
/* Perform a merge on the 2 sorted lists of memory ranges */
for (j = 0, i = 0; i < memory_ranges; i++) {
- unsigned long sstart, send;
- unsigned long mstart, mend;
+ unsigned long long sstart, send;
+ unsigned long long mstart, mend;
mstart = memory_range[i].start;
mend = memory_range[i].end;
if (memory_range[i].type != RANGE_RAM)
@@ -232,7 +232,7 @@ unsigned long locate_hole(struct kexec_i
if (start < hole_min) {
start = hole_min;
}
- start = (start + hole_align - 1) & ~(hole_align - 1);
+ start = (start + hole_align - 1) & ~((unsigned long
long)hole_align - 1);
if (end > mem_max) {
end = mem_max;
}
@@ -250,7 +250,7 @@ unsigned long locate_hole(struct kexec_i
hole_base = start;
break;
} else {
- hole_base = (end - hole_size) & ~(hole_align -
1);
+ hole_base = (end - hole_size) & ~((unsigned
long long)hole_align - 1);
}
}
}
_
_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot