[PATCH 2/2] support loading kernels/initrds > 6MB

Leonardo Rangel lrangel at linux.vnet.ibm.com
Thu Oct 11 04:18:09 EST 2007


What you guys think of setting both KERNELADDR and LOAD_BUFFER_POS with
0x0 address and let prom_claim_chunk dinamically look for a free memory
chunck for TFTP buffer, kernel and initrd?

This way, if real-base is at 32MB, then we can put TFTP buffer, kernel
and initrd within first 32MB.

Otherwise, If real-base is at 12MB, the 16MB buffer will be placed at ~30MB
right after OF, and the kernel may be stored either within first 12MB or at
~45MB (right after TFTP buffer), depending on its size.

This way, it would possible to load small kernels (~10MB) at 0-12MB region
(kernels bigger than 10MB could only be over 45MB). This improves memory
utilization and may also we good for older machines, that seem to have issues
on handling kernels placed over 32MB (not sure about that,  
segher at Freenode#ppc64
told me so - does anyone have more information on that?).

regards,

Leo
Quoting Scott Moser <ssmoser at us.ibm.com>:

>   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.
>   The Fedora 7 kernel is now at 7.3MB.
>
>   I've successfully tested loading of these larger kernels on this on my
>   power5 and power6 systems and JS2[12] blades.
>
> diff --git a/second/fs_of.c b/second/fs_of.c
> index d0b2e5b..2c27a18 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);
> @@ -207,7 +206,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);
>
> _______________________________________________
> Yaboot-devel mailing list
> Yaboot-devel at ozlabs.org
> https://ozlabs.org/mailman/listinfo/yaboot-devel
>






More information about the Yaboot-devel mailing list