summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-05-20 06:48:28 +0200
committerFabio M. Di Nitto <fdinitto@redhat.com>2008-05-20 06:48:28 +0200
commit40e16b685db3f9595da0e0956fca0d2216e9d89e (patch)
tree91aefd4e27530d33b5bf8ddc8bd649a3d3d76202
parentbaff29b681f5631bb5aea14e3e525cc5adf2b4a3 (diff)
downloadsilo-40e16b685db3f9595da0e0956fca0d2216e9d89e.tar.gz
Allow silo to load kernels up to 64Mb big.
As of 2.6.25-rc6, an "allyesconfig" kernel is around ~42MB in size. So we try to carve out up to 64MB of memory for the kernel. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
-rw-r--r--second/main.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/second/main.c b/second/main.c
index d5285bb..4f753b0 100644
--- a/second/main.c
+++ b/second/main.c
@@ -1205,12 +1205,16 @@ try_again:
unsigned int size;
unsigned char *mem;
- size = 0x800000;
- mem = (unsigned char *)image_memory_find(size);
-
- if (!mem) {
- size = 0x400000;
- mem = (unsigned char *)image_memory_find(size);
+ /* As of 2.6.25-rc6, an "allyesconfig" kernel is around
+ * ~42MB in size. So we try to carve out up to 64MB of
+ * memory for the kernel.
+ */
+ for (size = 64 * 1024 * 1024;
+ size >= 4 * 1024 * 1024;
+ size -= 4 * 1024 * 1024) {
+ mem = (unsigned char *)image_memory_find(size);
+ if (mem)
+ break;
}
if (mem) {