From patchwork Fri Jul 9 05:03:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 58335 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 947AAB7098 for ; Fri, 9 Jul 2010 15:11:52 +1000 (EST) Received: by ozlabs.org (Postfix, from userid 1010) id 90EA1B6F19; Fri, 9 Jul 2010 15:11:51 +1000 (EST) Message-Id: <20100709050342.440075772@samba.org> User-Agent: quilt/0.48-1 Date: Fri, 09 Jul 2010 15:03:42 +1000 From: Anton Blanchard To: yaboot-devel@lists.ozlabs.org Subject: [patch 12/14] Allocate tftp temporary buffer from top of address space References: <20100709050330.507659708@samba.org> Content-Disposition: inline; filename=move_tftp_load_buffer X-BeenThere: yaboot-devel@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Technical and development discussion regarding yaboot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: yaboot-devel-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Errors-To: yaboot-devel-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org 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 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);