Allocate tftp temporary buffer from top of address space
authorAnton Blanchard <anton@samba.org>
Thu, 8 Jul 2010 19:03:42 +0000 (19:03 +0000)
committerTony Breeds <tony@bakeyournoodle.com>
Fri, 16 Jul 2010 05:51:57 +0000 (15:51 +1000)
We want the kernel and initrd to be as low as possible in the
address space. Allocate the temporary tftp region at the top
of the address space.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/fs_of.c

index 5961cfecd57a09b45702444f7628382541427aed..77113b14ed8bb68f1f8e83a8aacda769c2510d74 100644 (file)
@@ -44,7 +44,6 @@
 #include "errors.h"
 #include "debug.h"
 
-#define LOAD_BUFFER_POS                0x1000000
 #define LOAD_BUFFER_SIZE       0x1800000
 
 static int of_open(struct boot_file_t* file,
@@ -208,8 +207,7 @@ of_net_open(struct boot_file_t* file,
      }
 
 
-     file->buffer = prom_claim_chunk((void *)LOAD_BUFFER_POS,
-                                     LOAD_BUFFER_SIZE, 0);
+     file->buffer = prom_claim_chunk_top(LOAD_BUFFER_SIZE, 0);
      if (file->buffer == (void *)-1) {
          prom_printf("Can't claim memory for TFTP download\n");
          prom_close(file->of_device);