Patchwork [12/14] Allocate tftp temporary buffer from top of address space

login
register
mail settings
Submitter Anton Blanchard
Date July 9, 2010, 5:03 a.m.
Message ID <20100709050342.440075772@samba.org>
Download mbox | patch
Permalink /patch/58335/
State Changes Requested
Headers show

Comments

Anton Blanchard - July 9, 2010, 5:03 a.m.
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>
---

Patch

Index: yaboot/second/fs_of.c
===================================================================
--- yaboot.orig/second/fs_of.c	2010-07-08 14:23:24.000000000 +1000
+++ yaboot/second/fs_of.c	2010-07-08 14:25:44.000000000 +1000
@@ -44,7 +44,6 @@ 
 #include "errors.h"
 #include "debug.h"
 
-#define LOAD_BUFFER_POS		0x1000000
 #define LOAD_BUFFER_SIZE	0x1000000
 
 static int of_open(struct boot_file_t* file, const char* dev_name,
@@ -166,8 +165,7 @@  of_net_open(struct boot_file_t* file, co
      }
 
 
-     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);