From 4ba173298fa8630628c9014028fccc22e511d48a Mon Sep 17 00:00:00 2001 From: Paul Nasrat Date: Mon, 3 Dec 2007 12:39:06 +0000 Subject: [PATCH] move the tftp load space and use prom_claim_chunk to claim the memory. Growing kernels mean that the 6MB that was allotted is not enough. Patch from Scott Moser --- second/fs_of.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/second/fs_of.c b/second/fs_of.c index 76474ee..95c131d 100644 --- a/second/fs_of.c +++ b/second/fs_of.c @@ -44,9 +44,8 @@ #include "errors.h" #include "debug.h" -#define LOAD_BUFFER_POS 0x600000 -/* this cannot be safely increased any further */ -#define LOAD_BUFFER_SIZE 0x600000 +#define LOAD_BUFFER_POS 0x1000000 +#define LOAD_BUFFER_SIZE 0x1000000 static int of_open(struct boot_file_t* file, const char* dev_name, struct partition_t* part, const char* file_name); @@ -166,7 +165,9 @@ of_net_open(struct boot_file_t* file, const char* dev_name, return FILE_ERR_BAD_FSYS; } - file->buffer = prom_claim((void *)LOAD_BUFFER_POS, LOAD_BUFFER_SIZE, 0); + + file->buffer = prom_claim_chunk((void *)LOAD_BUFFER_POS, + LOAD_BUFFER_SIZE, 0); if (file->buffer == (void *)-1) { prom_printf("Can't claim memory for TFTP download\n"); prom_close(file->of_device); -- 2.39.2